Cancel - API GPN
This API uses to cancel the paid transaction. If the transaction cancels before the settlement process is done, then that transaction will consider void, and that fund transaction will return to Your Customer.
The GPN API uses to cancel system for payments via GPN.
API Endpoint | /nicepay/direct/v2/cancel |
Request Method | POST |
Header | Content-Type: application/json |
Merchant Token | SHA256(timeStamp+iMid+tXid+amt+merchantKey) |
Code PayMethod
01 Credit Card
02 Virtual Account
03 Convenience Store
04 Direct Debit
05 E-Wallet
06 Payloan
08 QRIS
09 GPN
The following is a list of parameters for requesting integration of the cancel payment process on the GPN payment method. These parameters use via the API testing platform.
Parameter | Type | Size | Description | Example / Notes |
timeStamp Required | N | 14 | API Request Timestamp | 20180123100505 |
tXid Required | AN | 30 | Transaction ID | IONPAYTEST01202103311759347262 |
iMid Required | AN | 10 | Merchant ID | IONPAYTEST |
payMethod Required | N | 2 | Payment Method | 09 |
cancelType Required | N | 2 | Cancel Type | 1 |
merchantToken Required | AN | 255 | Merchant Token | 66141d60572e570045c4f3e9965f3452d511496841981e8a2af6a24a7038a119 |
amt Required | N | 12 | Payment Amount | 10000 |
cancelMsg | AN | 255 | Cancel Message | Request Cancel |
preauthToken | AN | 100 | Pre-authToken | |
referenceNo (Optional For CC) | ANS | 40 | Merchant Cancel No | CancelNo20160525000-52104 |
cancelServerIp | AN | 15 | Server IP | 127.0.0.1 |
cancelUserId | AN | 30 | User ID | admin |
cancelUserIp | AN | 15 | User IP | 127.0.0.1 |
cancelUserInfo | AN | 100 | User Information | Test Cancel |
cancelRetryCnt | N | 2 | Retry Count | 3 |
worker | AN | 10 | Worker | |
Following are the response parameters from the results of the request parameters for integration of the GPN to cancel.
Parameter | Type | Size | Description | Example / Notes |
resultCd | N | 4 | Result Code | 0000 |
resultMsg | AN | 255 | Result Message: Error Code | SUCCESS |
tXid | AN | 30 | Transaction ID | IONPAYTEST01202103311759347262 |
referenceNo | ANS | 40 | Merchant Order No | ord20210331170394 |
transDt | N | 8 | Transaction Date | 20210331 |
transTm | N | 6 | Transaction Time | 175934 |
amt | N | 12 | Amount | 10000 |
cancelReferenceNo (Optional For CC) | AN | 40 | Merchant Cancel No | CancelNo20160525000-52104 |