Skip to main content

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 NameTypeLengthRequiredDescription
mallIdString8ByteMerchant ID assigned by KICC
reviseTypeCodeString2ByteChange Type Code
Fixed at "10"
reviseSubTypeCodeString2ByteChange Sub-Type Code
Fixed at "30"
pgCnoString20ByteOriginal PG Transaction ID (Generated at registration)
clientIdString32ByteRequestor ID (Merchant Admin Login ID)
Request Example
{
"mallId": "{Merchant ID}",
"reviseTypeCode": "10",
"reviseSubTypeCode": "30",
"pgCno": "{PG Transaction ID}",
"clientId": "{Requestor ID}"
}

Response

Parameters

Field NameTypeLengthRequiredDescription
resCdString4ByteResponse Code (Success: “0000”)
resMsgString1000ByteResponse Message
pgCnoString20ByteRegistered PG Transaction ID
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"pgCno": "{PG Transaction ID}"
}