Payment Callback Query
Note
Notify URL or Callback URL to inform server on transaction status after payment is made
Danger
Please ensure you have filled up the Callback URL in Merchant Portal
Response Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
appId |
String / Number | Yes | Merchant app ID. This is the same value as the merchant client_id. | 234234 |
orderId |
String | Yes | Order ID included in the callback wrapper for quick lookup before decrypting encryptedData. | 1234567890 |
merchantOrderId |
String | Yes | Merchant order ID included in the callback wrapper for quick lookup before decrypting encryptedData. | 1233423 |
encryptedData |
String | Yes | Encrypted data. Decrypt this value with CLIENT_SYMMETRIC_KEY; do not decrypt the outer code or message fields. |
a83cf72884cbbb....3ddf0744646e0cf0b482 |
Example Response
{
"appId": 234234,
"orderId": "1234567890",
"merchantOrderId": "1233423",
"encryptedData": "e4e9ac1120ed867a7af108af8b1ab918cbec6db7b4d7c29908085a73e2b29e97547da6eae91928b3330241f1fb898eebd8c3355105fdd5c68b6ceea761f41dc3085ed888d3c0473beef128ebd208c4f60299df64a622d04d21d81513c02e2d47bfcce2a6c246eabcc1c823aaf3d9133004cf7c4c08236395a05dc19a98c33a301c8b73d4e7fd33cd911619de86dfdb45"
}
Decrypt the encryptedData with CLIENT_SYMMETRIC_KEY
Symmetric decrypt the encryptedData, e4e9ac1120ed867a7af108af8b1ab918cbec6db7b4d7c29908085a73e2b29e97547da6eae91928b3330241f1fb898eebd8c3355105fdd5c68b6ceea761f41dc3085ed888d3c0473beef128ebd208c4f60299df64a622d04d21d81513c02e2d47bfcce2a6c246eabcc1c823aaf3d9133004cf7c4c08236395a05dc19a98c33a301c8b73d4e7fd33cd911619de86dfdb45
with CLIENT_SYMMETRIC_KEY, PCd1dlEmFnBXaVce06Pzp7Vike0oHnVJ
The result is in plaintext as
{
"data": {
"status": "SUCCESS",
"transaction": {
"id": 10310,
"amountPaid": 124.1,
"confirmedAt": "2022-10-28T16:15:58.314Z",
"paymentMethod": "CIMB_MY",
"commissionFee": 3.1025,
"remark": "Long Wan" // If its FPX related, have chance returned with buyer bank account name
},
"order": {
"id": "20220918020002",
"amount": 124.1,
"currencyType": "MYR"
},
"customer": {
"name": "114",
"phone": "0123456789",
"email": "longwan@gmail.com"
}
}
}
Decrypted Payload Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
data |
Object | Yes | Top-level object returned after decrypting the payment callback payload. | {...} |
data.status |
String | Yes | Current transaction status. Possible values include PAYING, PENDING, SUCCESS, and FAILED. |
SUCCESS |
data.transaction |
Object | Yes | Payment transaction details returned in the callback payload. | {...} |
data.transaction.id |
Number | Yes | SuperPay transaction ID for this callback event. | 10310 |
data.transaction.amountPaid |
Number | Yes | Total paid amount for the deposit transaction, including the transaction fee. | 124.1 |
data.transaction.confirmedAt |
String / Null | Yes | Timestamp when the payment was confirmed. This may be null before the transaction succeeds. |
2022-10-28T16:15:58.314Z |
data.transaction.paymentMethod |
String / Null | Yes | Payment method code used to complete the transaction. | CIMB_MY |
data.transaction.commissionFee |
Number | Yes | Transaction fee charged by SuperPay. | 3.1025 |
data.transaction.payer_name |
String / Null | No | Payer or buyer name returned by the payment provider; otherwise null. |
Long Wan |
data.transaction.remark |
String / Null | Yes | Customer name or transaction remark. | Long Wan |
data.transaction.failedRemark |
String / Null | Yes | Sanitized decline/failed reason. This is null when the transaction has not failed. |
Payment expired before the user completed it. |
data.order |
Object | Yes | Original merchant order details linked to the transaction. | {...} |
data.order.id |
String | Yes | Merchant order ID submitted when the order was created. | 20220918020002 |
data.order.amount |
Number | Yes | Original order amount requested by the merchant. | 124.1 |
data.order.currencyType |
String | Yes | Currency code for the order amount. | MYR |
data.customer |
Object | Yes | Customer details associated with the payment transaction. | {...} |
data.customer.name |
String / Null | Yes | Customer or payer name. | 114 |
data.customer.phone |
String / Null | Yes | Customer phone number. | 0123456789 |
data.customer.email |
String / Null | Yes | Customer email address. | longwan@gmail.com |