Money out
Refund
POST /pgui/services/paymentServices/refund/initiate — JSON. You can also refund from the panel sales report.
Request
| Field | Required | Notes |
|---|---|---|
| APP_ID | Yes | Your APP_ID |
| TXN_ID | Yes | The sale TXN_ID |
| ORDER_ID | Yes | Must match that sale |
| AMOUNT | No | Minor units. Omit to refund whatever is still unrefunded |
| HASH | Yes | Include AMOUNT in the hash only if you send it |
JSON
{
"APP_ID": "1000221129001154",
"TXN_ID": "16-digit sale id",
"ORDER_ID": "S2S-001",
"AMOUNT": "500",
"HASH": "<128 hex>"
}Rules this server enforces
- Sale must exist for that APP_ID and ORDER_ID, kind SALE. Else
302. - Sale must be
RESPONSE_CODE=000andSTATUS=Captured. Else016. - AMOUNT must be a positive integer. Else
016. - Sum of refunds cannot exceed the sale amount. Else
013.
Response
Success is 000 + Captured. TXN_ID is a new refund id. ORDER_ID stays the sale order. Message text includes that order id.
JSON
{
"RESPONSE_CODE": "000",
"STATUS": "Captured",
"TXN_ID": "new refund id",
"ORDER_ID": "S2S-001",
"AMOUNT": "500",
"CURRENCY_CODE": "784",
"HASH": "…"
}There is no void API on this sandbox.
Refunds call the sale’s assigned adapter (plugin.refund). Missing keys fail closed except the sandbox simulator. See Processors.