Browse docs
API reference

Refunds

Refund all or part of a successful payment. Refunds carry their own reference, can be queried independently, and complete asynchronously.

Create a refund

POST/api/v1/refunds/create

Identify the original payment by either reference, and give the refund its own unique number.

FieldTypeRequiredDescription
original_order_nostringOne of twoStablePay order number of the original payment.
original_merchant_order_nostringOne of twoYour order number of the original payment.
merchant_refund_nostringYesYour refund number. Unique; used for idempotency.
refund_amountstringYesAmount to refund as a decimal string, e.g. 10.00, in the original currency.
reasonstringNoRefund reason.
notify_urlstringNoURL that receives the signed refund notification.
metadatastringNoOpaque passthrough.
{
  "original_merchant_order_no": "M202606240001",
  "merchant_refund_no": "MR202606240001",
  "refund_amount": "10.00",
  "reason": "customer requested",
  "notify_url": "https://merchant.example.com/callback/refund",
  "metadata": "refund=manual"
}
FieldTypeDescription
refund_nostringStablePay refund number.
merchant_refund_nostringYour refund number.
original_order_nostringOriginal StablePay order number.
original_merchant_order_nostringOriginal merchant order number.
statusstringPENDING, SUCCESS or FAILED.
refund_amountobjectcurrency and value.
reasonstringRefund reason.
psp_refund_nostringStablePay processing reference.
created_atstringCreation time.
updated_atstringLast update time.
200 · response
{
  "code": 0,
  "msg": "success",
  "data": {
    "refund_no": "R202606240001",
    "merchant_refund_no": "MR202606240001",
    "original_order_no": "O202606240001",
    "original_merchant_order_no": "M202606240001",
    "status": "SUCCESS",
    "refund_amount": {
      "currency": "USD",
      "value": "10.00"
    },
    "reason": "customer requested",
    "psp_refund_no": "SPR_R_001",
    "created_at": "2026-06-24T11:00:00Z",
    "updated_at": "2026-06-24T11:00:05Z"
  }
}
Request vs. response amount shape
You send refund_amount as a plain string; the response returns it as an amount object with currency and value.

The final outcome is delivered as a REFUND event to notify_url — see Webhooks.

Query a refund

POST/api/v1/refunds/query

Provide exactly one identifier.

FieldTypeRequiredDescription
refund_nostringOne of twoStablePay refund number.
merchant_refund_nostringOne of twoYour refund number.
{
  "merchant_refund_no": "MR202606240001"
}
FieldTypeDescription
refund_nostringStablePay refund number.
merchant_refund_nostringYour refund number.
original_order_nostringOriginal StablePay order number.
original_merchant_order_nostringOriginal merchant order number.
statusstringPENDING, SUCCESS or FAILED.
refund_amountobjectcurrency and value.
reasonstringRefund reason.
psp_refund_nostringStablePay processing reference.
created_atstringCreation time.
updated_atstringLast update time.
200 · response
{
  "code": 0,
  "msg": "success",
  "data": {
    "refund_no": "R202606240001",
    "merchant_refund_no": "MR202606240001",
    "original_order_no": "O202606240001",
    "original_merchant_order_no": "M202606240001",
    "status": "SUCCESS",
    "refund_amount": {
      "currency": "USD",
      "value": "10.00"
    },
    "reason": "customer requested",
    "psp_refund_no": "SPR_R_001",
    "created_at": "2026-06-24T11:00:00Z",
    "updated_at": "2026-06-24T11:00:05Z"
  }
}