Refund a Transaction
Once a transaction has been completed, this API can be used to issue a refund, thereby clawing back funds from the payee and transferring them back to the payor. An optional amount can be specified to either issue a partial refund or add additional fees to the original amount. If the amount is not specified, the total transaction amount is refunded.
The refund requests are only accepted when the transaction has been processed or completed. If the transaction is in the CAPTURE_PENDING or CAPTURE_ACH_FAILED status, the refund will not be accepted.
A refund will be processed only after an individual or batch payout has been initiated. For transactions within a batch payout, GrailPay will collect all refund requests from the day and create a credit ACH from the processor’s bank account for the total amount of refunds processed that day.
Endpoint
Body Payload
{
"amount": 12000,
"client_reference_id": "refund_capture_25478"
}
Fields | Type | Is Required | Description |
---|---|---|---|
amount | int | Yes | Refund amount. |
client_reference_id | string | No |
Response Object
Note: Amounts and fees are expressed in cents.
{
"status": true,
"message": "",
"data": {
"uuid": "9be03fa2-bf19-415c-9fb6-eb903f7a0618",
"transaction_uuid": "9bdeaf2e-3b14-4e39-bbb0-ade2077e9439",
"amount": 12000,
"status": "REFUND_PENDING",
"created_at": "2024-04-23 12:13:46"
},
"errors": null,
"error_code": null
}
Errors and Warnings
Code | Message |
---|---|
401 | |
403 | |
422 |
Refund Statuses
Status | Description |
---|---|
REFUND_PENDING | The initial status, indicating that the refund request has not yet been processed. |
REFUND_CAPTURE_ACH_PENDING | The refund has been processed and a debit ACH transaction has been initiated from the payee or processor (reverse of payout). |
REFUND_ACH_PENDING | The debit ACH transaction is complete and a credit ACH transaction has been initiated to the payer (reverse of the transaction). |
REFUND_COMPLETE | The refund process is complete and the payer has received the money. |
REFUND_FAILED | The refund has failed due to some reason. |
Updated 30 days ago