Skip to main content
POST
/
v1
/
payments
/
{id}
/
refund
Refund
curl --request POST \
  --url https://api.sandbox.zafapay.com/v1/payments/{id}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 5.5,
  "currency": "sgd",
  "reason": "Customer request"
}
'
{
  "id": "orf_xyz789",
  "transaction_id": "tx_abc123",
  "amount": "5.50",
  "status": "succeeded",
  "psp_refund_id": "re_xxxxx",
  "refund_fee": "1.00"
}

Authorizations

Authorization
string
header
required

Bearer authentication using access token

Path Parameters

id
string
required

Transaction ID

Example:

"tx_abc123"

Body

application/json
amount
number

Refund amount (supports up to 2 decimal places). If omitted, full refund is processed.

Example:

5.5

currency
string

Currency of the refund amount (3-letter ISO code). Use this when refunding in the original transaction currency (e.g., sgd) that differs from the settlement currency (e.g., usd). The amount will be automatically converted using the original exchange rate.

Example:

"sgd"

reason
string

Refund reason

Example:

"Customer request"

Response

Refund successful

id
string

Refund ID

Example:

"orf_xyz789"

transaction_id
string

Transaction ID

Example:

"tx_abc123"

amount
string

Refund amount (string format)

Example:

"5.50"

status
string

Refund status

Example:

"succeeded"

psp_refund_id
string

PSP refund ID

Example:

"re_xxxxx"

refund_fee
string

Refund fee (string format)

Example:

"1.00"