Credit
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/credit

Sample Request / Response

Request
Response

Example Request

1
{
2
"id": "9a0df7ef-b77f-4525-97e1-f41a98ad7f75",
3
"data": {
4
"transactionAmount": "110.00",
5
"cardToken": "card_sandbox_xxxx"
6
}
7
}
Copied!

Example Response

1
{
2
"data": {
3
"ID": "f34de6f6-233c-42e0-8c52-002ca76fa9ee",
4
"MerchantID": "8357832f-79c9-48fd-9647-d1dae251e434",
5
"TransactionID": "dcc9fc7b-9ab9-4e35-8f95-db61efcb3423",
6
"ReturnResponse": {
7
"status": "PASS",
8
"responseCode": "1",
9
"responseMessage": "SUCCESS",
10
"authCode": "",
11
"hostReferenceNumber": "7103469687",
12
"hostResponseCode": "100",
13
"taskID": "7103469687",
14
"transactionID": "7103469687",
15
"transactionTimestamp": "2022-03-30T15:04:29",
16
"transactionAmount": "3.00",
17
"processedAmount": "3.00",
18
"totalAmount": "3.00",
19
"addressVerificationCode": "",
20
"cardHolderVerificationCode": "N",
21
"cardType": "Visa",
22
"maskedCardNumber": "4xxxxxxxxxxx1111",
23
"customerReceipt": "",
24
"merchantReceipt": ""
25
}
26
}
27
}
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!