Refund
The refund transaction in our payment gateway is a function that receives and processes the necessary data to carry out a partial or full refund of a previously made payment. Below is a detailed description of this endpoint and how it is used to effectively manage refunds.
Important Notes
- The period during which refunds are allowed varies depending on the issuers and may be subject to specific time limits.
- Multiple refunds can be applied to the same payment, but they must not exceed the total amount of the original payment.
This endpoint receives the refund transaction data and returns the result.
Method: post
URL: http://{environment-domain}/api/v1/refund
HTTP Headers: Content-Type: application/json`
Add authentication headers
Example:
{
"id": "5c51bebd-5b21-4ef3-b980-d41eb0b83568",
"merchantId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
"terminalId": "3ae25846-d5fe-40cc-a311-eb2de5174c29",
"order": {
"merchantOrderId": "9a6ecf36-8265-11ee-b962-0242ac120002",
"amount": "100.00",
"currency": "484"
}
}
Field Description
Field | Description |
---|---|
id | Unique ID of the transaction assigned by the payment gateway. |
merchantId | Unique identifier for the merchant on the payment gateway, assigned when the account is created. |
terminalId | Unique identifier for the terminal, assigned when the account is created. |
order | Contains details about the purchase order. |
merchantOrderId | Unique identifier for the order assigned by the merchant. |
amount | Total amount of the order. |
currency | Currency code following the ISO 4217 standard. |
Example of successful response
Http code 200
{
"id": "63fa692e-66fe-47a0-acdd-50c13970d4f3",
"order": {
"id": "9a6ecf36-8265-11ee-b962-0242ac120002",
"amount": "100.00",
"currency": "484"
},
"payload": {
"paymentId": "4d0cbd45-bc39-4d17-96ef-34affa296bde",
"responseCode": "00",
"responseDescription": "Approved or completed successfully (if balances are available)",
"authorizationNumber": "280188",
"referenceNumber": "000027389440",
"status": "refund"
},
"isApproved": true,
"isFailure": false,
"errors": null
}
Field Description
Field | Description |
---|---|
id | Unique ID of the transaction assigned by the payment gateway. |
order | Contains details about the purchase order. |
merchantOrderId | Unique identifier for the order assigned by the merchant. |
amount | Total amount of the order. |
currency | Currency code following the ISO 4217 standard. |
payload | Contains detailed information about the transaction. |
paymentId | Unique identifier of the payment transaction. |
responseCode | Response code indicating the result of the transaction (in this case, "00" indicates approval). |
responseDescription | Description associated with the response code. |
authorizationNumber | Authorization number of the transaction. |
referenceNumber | Reference number associated with the transaction. |
status | Transaction status; in this case, "paid" indicates that the transaction was successfully completed. |
isApproved | Indicates whether the transaction was approved. In this example, it is "true," meaning the transaction was approved. |
isFailure | Indicates whether the transaction failed. In this example, it is "false," meaning the transaction did not fail. |
errors | Contains details such as error number and description, if any. In this case, it is "null," meaning no errors occurred in the transaction. |
Updated 3 months ago