Cancel - API Virtual Account
This API uses by Merchants to integrate the cancel system for virtual account payment methods. Transaction cancellation happens from either the Customer side or the Merchant.
- If the Customer changes their mind after proceeding with the order and requests cancellation from the Merchant before proceeding with the payment process.
- If there is a technical or non-technical issue when the Merchant processes the Customer's order.
Merchants can use this API so that the Virtual Account issue can't be used anymore.
Virtual Accounts can only canceled before being paid before the payment process is executed.
If the Customer has proceeded with the payment process, the paid bill can't be canceled or refunded to the Customer through API.
The Virtual Account cancel API is used for the cancel system on Virtual Account payment.
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 activating the cancel system on the Virtual Account payment method. These parameters are used via the API testing platform.
Parameter | Type | Size | Description | Example / Notes |
timeStamp Required | N | 14 | API Request | 20220623100659 |
tXid Required | AN | 30 | Transaction ID | NORMALTEST02202212150941111979 |
iMid Required | AN | 10 | Merchant ID | NORMALTEST |
payMethod Required | N | 2 | 02 | |
cancelType Required | N | 2 | | 1 |
merchantToken Required | AN | 255 | Merchant token | 94acd9768557df77de675b7b97658d6a743cc0675f4eb681c871c4e1b56c0b0f |
amt Required | N | 12 | Payment Amount | 10000 |
cancelMsg | AN | 255 | Cancel Message | Testing Cancel Of Virtual Account |
preauthToken | AN | 100 | Pre-authToken | d4ef98b26f917a697691807cf |
cancelServerIp | AN | 15 | Server IP | 127.0.0.1 |
cancelUserId | AN | 30 | User ID | |
cancelUserIp | AN | 15 | User IP | 127.0.0.1 |
cancelUserInfo | AN | 100 | User Information |
|
cancelRetryCnt | N | 2 | Retry Count | |
worker | AN | 10 | Worker | |
The following is a parameter response from the parameter request results for Cancel Virtual Account integration:
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 | NORMALTEST02202212150941111979 When Success |
referenceNo | ANS | 40 | Merchant Order No | ordNo20221215091261 When Success |
transDt | N | 8 | Transaction Date | 20221215 When Success |
transTm | N | 6 | Transaction Time | 094111 When Success |
description | AN | 255 | Description | Testing Cancel Of Virtual Account When Success
|
amt | N | 12 | Amount | 10000 When Success |