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

1
{
2
"id":"9a0df7ef-b77f-4525-97e1-f41a98ad7f75",
3
"amount":10,
4
"reason":"Discount issued"
5
}
6
​
Copied!

Example Response

1
{
2
"data": {
3
"ID": "9a0df7ef-b77f-4525-97e1-f41a98ad7f75",
4
"MerchantID": "e6803b29-68a4-4c2a-b3ee-019dfad86c61",
5
"TransactionID": "c8b6a1fc-fa30-41b7-9dcc-26c90778d3da",
6
"ReturnResponse": {
7
"status":"PASS",
8
"responseCode":"A0000",
9
"responseMessage":"Success",
10
"achHostTransactionID":"1525193579",
11
"achHostTransactionStatus":"Accepted",
12
"achHostResponseCode":"0",
13
"achHostMessage":"Transaction refunded in the amount of $1.00",
14
"taskID":"3193629945",
15
"transactionID":"3062427945",
16
"transactionTimestamp":"2022-02-15T08:34:43",
17
"orderNumber":"3015748777",
18
"externalReferenceID":"3015748777",
19
"transactionAmount":"1.00",
20
"returnedAmount":"1.00",
21
"customerReceipt": "PRINTABLE RECEIPT",
22
"merchantReceipt": "PRINTABLE RECEIPT"
23
}
24
}
25
}
Copied!
Webhook event: PAYMENT_REFUNDED

Webhook Payload Example

1
{
2
event_uid: '3219ebc7e112790b88c3b619a4223967',
3
event: 'PAYMENT_REFUNDED',
4
data: {
5
account_id: 'e90c1de6-4e87-4c9e-bcbc-c535d6e349ec',
6
transaction_id: '415d9e62-1725-41e3-a6c0-1b7cc3153398',
7
return_response: {
8
status: 'PASS',
9
taskID: '57362230',
10
authCode: 'DSC633',
11
orderNumber: '70150570',
12
responseCode: 'A0000',
13
transactionID: '67574212',
14
returnedAmount: '10.00',
15
customerReceipt: '<Printable Customer Receipt>',
16
merchantReceipt: '<Printable Customer Receipt>',
17
responseMessage: 'Success',
18
hostResponseCode: '00',
19
externalReferenceID: '70150570',
20
hostReferenceNumber: '690753969761',
21
transactionTimestamp: '2022-02-04T21:10:49'
22
},
23
original_transaction_id: '353d6f10-c493-4606-9b34-dc864a7cedc9'
24
}
25
​
Copied!
​