Refunds
Initiates a refund for an already captured or settled transaction. Each refund is treated as a new transaction of type REFUND
. Use GET /transactions
to retrieve its details.
Authorizations
Body
external_idstringRequiredExample:
A unique identifier (e.g., UUID) for this refund in your system. Used for idempotency checks and correlating the refund internally.
496de72d-d4a4-45eb-b426-3d04d2078a85
trx_idstringRequiredExample:
The unique ID of the original PAYMENT
transaction that you want to refund.
trx_01J5XCMDXCFXCAQ1BV8HVG6644
amountintegerRequiredExample:
The amount to refund, in the smallest currency unit (e.g., cents for USD).
5000
Responses
200
Details of the new refund transaction.
application/json
post
POST /refunds HTTP/1.1
Host: test.api.us.sanctuspay.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 110
{
"external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
"trx_id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
"amount": 5000
}
200
Details of the new refund transaction.
{
"id": "trx_01J5XCMDXCFXCAQ1BV8HVG6644",
"type": "PAYMENT",
"status": "AUTHORIZED",
"order_amount": 10000,
"order_currency": "USD",
"amount_authorized": 10000,
"amount_captured": 1,
"amount_voided": 1,
"amount_refunded": 1,
"external_id": "496de72d-d4a4-45eb-b426-3d04d2078a85",
"updated_at": "2024-09-05T05:05:25Z"
}
Was this helpful?