CheckoutRefund

Create a Refund

POST
/openapi/v1/payment-intents/{paymentIntentId}/refunds

Creates a refund for the specified Payment Intent. Partial and full refunds are supported. If you omit amount, the remaining refundable amount is refunded. A refund first enters PENDING_APPROVAL and is executed after operations approves it.

Returns HTTP 200 on success.

Authorization

bearerAuth
headerAuthorizationBearer <token>

The access_token obtained from POST /oauth2/token. Header format: Authorization: Bearer {accessToken}.

Path Parameters

paymentIntentId*string

Payment Intent ID, such as pi_MNOL0POUV8IDPXCD

Header Parameters

Idempotency-Key*string

A unique request identifier. Use a UUID or a unique business serial number. Reuse the same key when you retry the same business request. Use a different key for each different business request

Request Body

application/json
  1. body
destinationAddress*string

The on-chain destination address for the refund. It must be on the network of the original payment

amount?string

Refund amount in standard units, in the Payment Intent currency. The number of decimal places cannot exceed the currency precision. If omitted, the full remaining amount is refunded

reason?RefundReason

Refund reason.

  • DUPLICATE: Duplicate payment or duplicate order
  • FRAUDULENT: Fraud or risk reasons
  • REQUESTED_BY_CUSTOMER: The customer requested the refund
  • OTHER: Other reasons
Value in"DUPLICATE""FRAUDULENT""REQUESTED_BY_CUSTOMER""OTHER"
notes?string

Refund notes

metadata?

Custom merchant metadata

Response Body

Returns the Refund object.

application/json
  1. response
code?integer

Business status code

message?string
traceId?string

Request trace ID. Provide it when you contact technical support

data?

The Refund object.

curl -X POST 'https://api.test.stabofx.com/openapi/v1/payment-intents/string/refunds' \  -H 'Idempotency-Key: pi_20260511_0001' \  -H 'Content-Type: application/json' \  -d '{  "destinationAddress": "0x97535e309484738738877fa6f9a3bb8c62eae19a",  "amount": "10.00",  "reason": "REQUESTED_BY_CUSTOMER",  "notes": "Customer requested a partial refund.",  "metadata": {    "orderId": "order_202605110001"  }}'
Example Response
{  "code": 200,  "message": "OK",  "traceId": "6a0188c437f0973a0e940d0586d01c9e",  "data": {    "refundId": "re_IFWNVQP0O6EHB6KV",    "paymentIntentId": "pi_TZA3DEDJUNZLTUJ2",    "amount": "10.00",    "currency": "USD",    "status": "PENDING_APPROVAL",    "reason": "REQUESTED_BY_CUSTOMER",    "notes": "Customer requested a partial refund.",    "metadata": {      "orderId": "order_202605110001"    },    "createdAt": "2026-05-11T17:18:41+08:00"  }}