Payment Completion Notification (Webhook)
You can receive the payment completion result at the notifyUrl specified during transaction creation.
Your server must be implemented to handle this notification as described below.
Retry Policy & Fallback
- Retry Schedule: If KICC does not receive a success response (Ack) from your server, the notification will be resent at the following intervals:
- 2 min, 10 min, 1 hr, 2 hrs, 6 hrs, 15 hrs, then every 24 hrs.
- Note: This schedule is subject to change based on Alipay's policies.
- Fallback: If you do not receive a notification for a certain period, please use the Check Payment Status API to verify the transaction status.
Critical Requirements
- Registration: You must inform your KICC sales representative of your
notifyUrlbefore launching the service. - Integrity Check: If the
amountin the notification differs from your internal order amount, you MUST cancel the transaction immediately. - DB Failure: If you fail to update your database after receiving the notification, you MUST cancel the transaction.
- Timeout: Your server must respond to the notification within 30 seconds.
Firewall Settings
Please configure your server's firewall to allow inbound traffic from the following IPs.
| Environment | Source IP | Description |
|---|---|---|
| Production | 203.233.74.25 | INBOUND |
| Development | 203.233.74.22 | INBOUND |
Integration Guide
HTTP Header
The notification is sent as a POST request with the following header.
Header Info
POST https://{Your notifyUrl}
Content-type: application/json; charset=utf-8
HTTP Body (Incoming Request)
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| resCd | String | 4Byte | ✅ | Result Code (Success: "0000") |
| resMsg | String | 1000Byte | ✅ | Result Message |
| mallId | String | 8Byte | Merchant ID assigned by KICC | |
| shopOrderNo | String | 40Byte | Merchant Order No. | |
| pgCno | String | 20Byte | PG Transaction ID | |
| approvalDate | String | 14Byte | Approval Date/Time (yyyyMMddHHmmss) | |
| walletBrandName | String | 20Byte | Alipay Wallet Name (e.g., CONNECT_WALLET) | |
| amountInfo | Object | Payment Amount Info (See amountInfo below) |
amountInfo (Payment Amount Info)
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| currency | String | 2Byte | ✅ | Currency Code |
| amount | Number | ✅ | Payment Amount |
Response Requirement (Ack)
Your server must respond with a JSON object containing the result of your internal processing.
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| resCd | String | 4Byte | ✅ | Response Code (Success: "0000") |
| resMsg | String | 1000Byte | ✅ | Response Message (Failure reason if applicable) |
| pgCno | String | 20Byte | ✅ | PG Transaction ID (Echo back the received value) |
Response Example
{
// If processed successfully
"resCd": "0000",
"resMsg": "Success",
"pgCno": "{Received PG Transaction ID}"
// If internal processing failed
"resCd": "5001",
"resMsg": "Internal DB Error",
"pgCno": "{Received PG Transaction ID}"
}