Skip to main content

Refund

Endpoint : POST https://api.zamplabs.com/payments/v1/refunds

In order to facilitate a refund, we request the merchant to share the payment session id against which the payment has been made, the currency of the refund and the amount to be refunded. Once the post call is made, the refund is initiated. The status of the refund is updated to the merchant with a callback.

Request Body

KeyValueDescriptionOptional
payment_session_idmerchant_8Gtnpzyion6rbcvwb7eP5xid_05_27This field denotes the session id against which a refund needs to be generatedN
reference_idReference of id on merchant's system. This is accepted as a string value.This helps us cross reference orders of merchant's systems associated with refundsY
amountNumeric value of the amount to be refundedIf left blank, the whole amount will be refunded. Otherwise, the amount mentioned in the request will be refundedY
remarksstring valueThis field can be used to add any remarks while initiating a refund requestY

Request JSON Representation :

{
"reference_id": "8Gtnpzyion6rbcvwb7eP5xid",
"payment_session_id": "merchant_8Gtnpzyion6rbcvwb7eP5xid_05_27",
"amount": 10,
"remarks": "Refund due to AML Failure",
}

Response Body

KeyValueDescription
idmerchant_8Gtnpzyion6rbcvwb7eP5xid_05_27This is the refund UUID. Please store this UUID as polling and callbacks of refunds will be made against this UUID
reference_idpshM776tAdmyMyZruPjXhK_08_26Reference id of the payment session whose refund was initiated
amountfloat64 valueAmount of the money that was refunded
currency_codeString valueCurrency in which refund is processed
remarksString valueRemarks used while initiating a refund.
statusinitiated, in_process, succeeded, failedStatus of the refund
failure_codeRefund Failure CodesFailure code in case refund is failed

Response JSON Representation :

{
"data": {
"id": "ReiHsjPSGKGscpAWJ38YyA_08_26",
"merchant_id": "9GtnphjB6rbcvwb7eP5xid_05_27",
"reference_id": "pshM776tAdmyMyZruPjXhK_08_26",
"amount": 10,
"currency_code": "USD",
"remarks": "Refund payment session",
"status": "initiated",
"failure_code":"",
"created_at": "2022-08-26T18:05:14.86225075Z",
"updated_at": "2022-08-26T18:05:14.862250868Z"
}
}