Refund
Refund API is designed to issue refunds on an existing transaction. This API can't be used to issue standalone refunds or credits.
post
https://<PayEngine-host>
/api/payment/refund

Sample Request / Response

Request
Response

Example Request

{
"id":"9a0df7ef-b77f-4525-97e1-f41a98ad7f75",
"amount":10,
"reason":"Discount issued"
}
​

Example Response

{
"data": {
"ID": "9a0df7ef-b77f-4525-97e1-f41a98ad7f75",
"MerchantID": "e6803b29-68a4-4c2a-b3ee-019dfad86c61",
"TransactionID": "c8b6a1fc-fa30-41b7-9dcc-26c90778d3da",
"ReturnResponse": {
"status":"PASS",
"responseCode":"A0000",
"responseMessage":"Success",
"achHostTransactionID":"1525193579",
"achHostTransactionStatus":"Accepted",
"achHostResponseCode":"0",
"achHostMessage":"Transaction refunded in the amount of $1.00",
"taskID":"3193629945",
"transactionID":"3062427945",
"transactionTimestamp":"2022-02-15T08:34:43",
"orderNumber":"3015748777",
"externalReferenceID":"3015748777",
"transactionAmount":"1.00",
"returnedAmount":"1.00",
"customerReceipt": "PRINTABLE RECEIPT",
"merchantReceipt": "PRINTABLE RECEIPT"
}
}
}
Webhook event: PAYMENT_REFUNDED

Webhook Payload Example

{
event_uid: '3219ebc7e112790b88c3b619a4223967',
event: 'PAYMENT_REFUNDED',
data: {
account_id: 'e90c1de6-4e87-4c9e-bcbc-c535d6e349ec',
transaction_id: '415d9e62-1725-41e3-a6c0-1b7cc3153398',
return_response: {
status: 'PASS',
taskID: '57362230',
authCode: 'DSC633',
orderNumber: '70150570',
responseCode: 'A0000',
transactionID: '67574212',
returnedAmount: '10.00',
customerReceipt: '<Printable Customer Receipt>',
merchantReceipt: '<Printable Customer Receipt>',
responseMessage: 'Success',
hostResponseCode: '00',
externalReferenceID: '70150570',
hostReferenceNumber: '690753969761',
transactionTimestamp: '2022-02-04T21:10:49'
},
original_transaction_id: '353d6f10-c493-4606-9b34-dc864a7cedc9'
}
​
​
Copy link
On this page
post
Sample Request / Response