Check Payment Status
This API is used to verify the payment approval status if you do not receive a payment completion notification within a certain timeframe.
Critical Integrity Checks
- Amount Mismatch: If the payment amount in the approval result differs from your requested amount, you MUST cancel the transaction immediately.
- DB Update Failure: If you fail to update your internal database after receiving a successful approval result, you MUST cancel the transaction.
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 Name | Type | Length | Required | Description |
|---|---|---|---|---|
| mallId | String | 8Byte | ✅ | Merchant ID assigned by KICC |
| shopTransactionId | String | 60Byte | ✅ | Merchant Transaction ID (API Idempotency Key) |
| pgCno | String | 60Byte | ✅ | Original Payment Transaction ID (Received in Transaction Creation Response) |
Request Example
{
// Check Payment Approval Status
"mallId": "{Merchant ID}",
"shopTransactionId": "{API Idempotency Key}",
"pgCno": "{Original Payment Transaction ID}"
}
Response
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| resCd | String | 4Byte | ✅ | Response Code |
| resMsg | String | 1000Byte | ✅ | Response Message |
| shopTransactionId | String | 60Byte | ✅ | Returns the value sent in the request |
| mallId | String | 8Byte | Merchant ID assigned by KICC | |
| shopOrderNo | String | 40Byte | Returns the value sent in the request | |
| pgCno | String | 60Byte | Payment Transaction ID | |
| approvalDate | String | 14Byte | WeChat Pay Approval Date/Time (yyyyMMddHHmmss) | |
| statusCd | String | 4Byte | Transaction Status Approved: “TS01” Full Cancel: “TS02” Partial Cancel: “TS06” Network Cancel (Void): “TS12” | |
| resDetailMsg | String | 1024Byte | Detailed error message from WeChat (URL encoded) | |
| amountInfo | Object | Payment Amount Info (See amountInfo below) |
amountInfo (Payment Amount Info)
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| currency | String | 2Byte | ✅ | Currency Code |
| totAmount | Number | ✅ | Total Payment Amount |
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"shopTransactionId": "{API Idempotency Key}",
"mallId": "{Merchant ID}",
"shopOrderNo": "{Merchant Order No}",
"pgCno": "{Original Payment Transaction ID}",
"approvalDate": "20230312000512",
"statusCd": "TS01",
"amountInfo": {
"currency": "KRW",
"totAmount": 1000
}
}