Cancel Registered Transaction
This API cancels a pre-registered (reserved) transaction. (e.g., Invalidating an SMS Payment Link before the customer pays).
Important Constraints
- Scope: You cannot cancel a transaction that has already been paid.
- Link Validity: Once cancelled, clicking the payment link will not initiate the payment process.
- Distinction: This API is NOT for refunding an approved payment. For refunds, please use the Cancel Payment API.
Request
Request URL
POST https://{API Domain}/directapi/trades/directSmsUrlPayCancel
Content-type: application/json; charset=utf-8
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| mallId | String | 8Byte | ✅ | Merchant ID assigned by KICC |
| reviseTypeCode | String | 2Byte | ✅ | Change Type Code Fixed at "10" |
| reviseSubTypeCode | String | 2Byte | ✅ | Change Sub-Type Code Fixed at "30" |
| pgCno | String | 20Byte | ✅ | Original PG Transaction ID (Generated at registration) |
| clientId | String | 32Byte | ✅ | Requestor ID (Merchant Admin Login ID) |
Request Example
{
"mallId": "{Merchant ID}",
"reviseTypeCode": "10",
"reviseSubTypeCode": "30",
"pgCno": "{PG Transaction ID}",
"clientId": "{Requestor ID}"
}
Response
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| resCd | String | 4Byte | ✅ | Response Code (Success: “0000”) |
| resMsg | String | 1000Byte | ✅ | Response Message |
| pgCno | String | 20Byte | Registered PG Transaction ID |
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"pgCno": "{PG Transaction ID}"
}