Payment Approval
This API requests the final payment approval using the information such as tokens obtained during the simple payment authentication stage.
Critical Implementation Guidelines
- Network Error/Timeout: If you do not receive a response due to a Read Timeout or Network Error, the transaction might have actually been approved. In such cases, you MUST call the Net-Cancel API to ensure data consistency.
- Amount Mismatch: If the approved amount in the response differs from the merchant's requested amount, you MUST initiate a cancellation.
- Internal Process Failure: If your internal database fails to process the result after a successful approval, you MUST cancel the transaction.
Request
Request URL
POST https://{API Domain}/smpy/kiccpay/reqAprv
Content-type: application/json; charset=utf-8
Caution
The final approval process may take time. Please set your client's network timeout to 30 seconds.
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| tid | String | 10Byte | ✅ | KICC Terminal ID |
| svcId | String | 10Byte | ✅ | KICC Simple Payment Service ID |
| bizrNo | String | 10Byte | ✅ | Merchant Business Registration Number |
| mercTrxNo | String | 40Byte | ✅ | Merchant Transaction Number (20Byte recommended) |
| tokenKey | String | 128Byte | ✅ | Token data received after authentication. Must encrypt the authorizationId (received in the auth response) using AES256. |
| alotMonth | String | 2Byte | ✅ | Installment Period (Default: "00" - Lump-sum) |
| trxAmt | Number | ✅ | Total Payment Amount | |
| vatAmt | Number | ✅ | VAT (Can be omitted if the total amount includes VAT) | |
| svcAmt | Number | Service Charge | ||
| taxFreeAmt | Number | Tax-free Amount | ||
| tranDt | String | 8Byte | ✅ | Merchant Transmission Date (yyyyMMdd) |
| tranTm | String | 6Byte | ✅ | Merchant Transmission Time (HH24MISS) |
| userData | String | 512Byte | Merchant Custom Data (Echo field) |
Request Example
{
"tid": "T123456789",
"svcId": "SVC_SIMPLE",
"bizrNo": "1234567890",
"mercTrxNo": "ORD_20231225_0001",
"tokenKey": "TOKEN_ABC123XYZ...",
"alotMonth": "00",
"trxAmt": 10000,
"vatAmt": 909,
"svcAmt": 0,
"taxFreeAmt": 0,
"tranDt": "20231225",
"tranTm": "120000",
"userData": "User_001"
}
Response
Parameters
| Field Name | Type | Length | Required | Description |
|---|---|---|---|---|
| respCd | String | 4Byte | ✅ | Result Code (Success: “0000”) |
| respMsg | String | 128Byte | ✅ | Result Message |
| tid | String | 10Byte | ✅ | KICC Terminal ID sent in request |
| svcId | String | 10Byte | ✅ | Service ID sent in request |
| bizrNo | String | 10Byte | ✅ | Merchant Business Registration Number |
| mercTrxNo | String | 20Byte | ✅ | Merchant Transaction Number |
| trxDt | String | 8Byte | ✅ | VAN Processing Request Date |
| trxTm | String | 6Byte | ✅ | VAN Processing Request Time |
| issFmCd | String | 4Byte | ✅ | Issuer Code (Refer to Card Codes) |
| issFmNm | String | 20Byte | ✅ | Issuer Name |
| purchFmCd | String | 4Byte | ✅ | Acquirer Code (Refer to Card Codes) |
| purchFmNm | String | 20Byte | ✅ | Acquirer Name |
| joShopNo | String | 15Byte | ✅ | Card Issuer Merchant Number |
| aprvDt | String | 8Byte | ✅ | Card Issuer Approval Date (yyyyMMdd) |
| aprvTm | String | 6Byte | ✅ | Card Issuer Approval Time (HH24MISS) |
| aprvNo | String | 10Byte | ✅ | Credit Approval Number |
| vanTrxNo | String | 12Byte | ✅ | VAN Unique Transaction Number |
| cardConfirmNo | String | 40Byte | ✅ | Masked Card Number |
Response Example
{
"respCd": "0000",
"respMsg": "Approval Success",
"tid": "T123456789",
"svcId": "SVC_SIMPLE",
"bizrNo": "1234567890",
"mercTrxNo": "ORD_20231225_0001",
"trxDt": "20231225",
"trxTm": "120001",
"issFmCd": "06",
"issFmNm": "KB Kookmin Card",
"purchFmCd": "06",
"purchFmNm": "KB Kookmin Card",
"joShopNo": "1234567890",
"aprvDt": "20231225",
"aprvTm": "120002",
"aprvNo": "12345678",
"vanTrxNo": "V12345678901",
"cardConfirmNo": "1234-56**-****-1234"
}