Skip to main content

Check Cancellation Status

This API is used to verify the cancellation status if you do not receive a cancellation completion notification within a certain timeframe.

Request​

Request URL
POST https://{API Domain}/api/trades/wechatpay/find
Content-type: application/json; charset=utf-8
Note

Supports API Idempotency (See API Idempotency)

Caution

Since retrieving the final status takes time, you must set the timeout to 30 seconds.

Parameters​

Field NameTypeLengthRequiredDescription
mallIdString8Byte✅Merchant ID assigned by KICC
shopTransactionIdString60Byte✅Merchant Transaction ID (API Idempotency Key)
pgCnoString60Byte✅Original Payment Transaction ID (Received in Transaction Creation Response)
cancelPgCnoString60Byte✅Cancellation Transaction ID (Received in Cancellation Request Response)
Request Example
{  
"mallId": "{Merchant ID}",
"shopTransactionId": "{API Idempotency Key}",
"pgCno": "{Original Payment Transaction ID}",
"cancelPgCno": "{Cancellation Transaction ID}"
}

Response​

Parameters​

Field NameTypeLengthRequiredDescription
resCdString4Byte✅Response Code
resMsgString1000Byte✅Response Message
shopTransactionIdString60Byte✅Returns the value sent in the request
mallIdString8ByteMerchant ID assigned by KICC
pgCnoString60ByteOriginal Payment Transaction ID
cancelPgCnoString60ByteCancellation Transaction ID
transactionDateString14ByteTransaction Date/Time (yyyyMMddHHmmss)
cancelStatusString4ByteTransaction Status
Approved: “TS01”
Full Cancel: “TS02”
Partial Cancel: “TS06”
Network Cancel (Void): “TS12”
resDetailMsgString1024ByteDetailed error message from WeChat (URL encoded)
amountInfoObjectCancellation Amount Info (See amountInfo below)

amountInfo (Cancellation Amount Info)​

Field NameTypeLengthRequiredDescription
currencyString2Byte✅Currency Code
totAmountNumber✅Total Cancellation Amount
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"shopTransactionId": "{API Idempotency Key}",
"mallId": "{Merchant ID}",
"pgCno": "{Original Payment Transaction ID}",
"cancelPgCno": "{Cancellation Transaction ID}",
"transactionDate": "20230312000512",
"cancelStatus": "TS02",
"amountInfo": {
"currency": "KRW",
"totAmount": 1000
}
}