Payment Cancellation (VAN)
This API is used to perform a full cancellation of a completed transaction.
Request
Request URL
POST https://{API Domain}/appcardpay/v1/cancel.do
Content-type: application/json; charset=euc-kr
Note
Supports API Idempotency (See API Idempotency)
Critical: Timeout Handling
- The final cancellation process may take time; please set your client timeout to 30 seconds.
- If you do not receive a response due to a timeout or network error, you MUST check the status via Query Transaction Status using the original transaction ID and then proceed with the cancellation to avoid duplicate requests.
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| vanTid | String | 8Byte | ✅ | VAN Terminal ID |
| shopTransactionId | String | 60Byte | ✅ | Merchant Transaction ID (API Idempotency Key) |
| controlNo | String | 20Byte | ✅ | Original Approval KICC Transaction Sequence Number |
| approvalReqDate | String | 8Byte | ✅ | Original Approval Request Date (yyyyMMdd) |
| cancelReqDate | String | 8Byte | ✅ | Cancel Request Date (yyyyMMdd). Must be set to the current date. |
Request Example
{
"vanTid": "T5102001",
"shopTransactionId": "{API Idempotency Key}",
"controlNo": "{Original Transaction ID}",
"approvalReqDate": "{Original Request Date}",
"cancelReqDate": "{Current Date}"
}
Response
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| resCd | String | 4Byte | ✅ | Result Code (Success: “0000”) |
| resMsg | String | 1000Byte | ✅ | Result Message |
| shopTransactionId | String | 60Byte | ✅ | Returns the value sent in the cancellation request |
| vanTid | String | 8Byte | VAN Terminal ID | |
| cancelControlNo | String | 20Byte | KICC Transaction Sequence Number for the cancellation | |
| transactionDate | String | 14Byte | Transaction Date (yyyyMMddHHmmss) | |
| vanSerial | String | 20Byte | VAN Cancellation Transaction Serial Number | |
| amount | Number | Total Canceled Amount |
Response Example
{
"resCd": "0000",
"resMsg": "Cancel Success",
"vanTid": "{VAN Terminal ID}",
"shopTransactionId": "{API Idempotency Key}",
"cancelControlNo": "{Cancel Transaction ID}",
"transactionDate": "20210326090200",
"vanSerial": "{VAN Cancel Serial}",
"amount": 0
}