Skip to main content

Issue Billing Key

This API issues a Billing Key using the Authorization ID (authorizationId) received from the response of the Billing Key Registration Window.

Request​

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

Supports API Idempotency (See API Idempotency)

Caution

Since the final issuance of the Billing Key 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)
authorizationIdString60Byte✅Authorization ID received after calling the registration window. Use the value exactly as received.
shopOrderNoString40Byte✅Merchant Order No. Use the value exactly as requested.
approvalReqDateString8Byte✅Request Date (yyyyMMdd)
Request Example
{  
"mallId": "T5102001",
"shopOrderNo": "{Merchant Order No}",
"shopTransactionId": "{API Idempotency Key}",
"authorizationId": "{Authorization ID}",
"approvalReqDate": "{Request Date}"
}

Response​

Parameters​

Field NameTypeLengthRequiredDescription
resCdString4Byte✅Response Code (Success: “0000”)
resMsgString1000Byte✅Response Message
mallIdString8Byte✅Merchant ID assigned by KICC
shopTransactionIdString60Byte✅Returns the same value sent in the request
shopOrderNoString40ByteReturns the same value sent in the request
pgCnoString20BytePG Transaction ID
transactionDateString14ByteTransaction Date/Time (yyyyMMddHHmmss)
msgAuthValueString200ByteUsed to verify response integrity (See Message Authentication)
Contact sales representative for the Secret Key
paymentInfoObjectResult info by Payment Method (See paymentInfo below)

paymentInfo (Result info by Payment Method)​

Field NameTypeLengthRequiredDescription
payMethodTypeCodeString2Byte✅Payment Method Code (See Payment Method Codes)
cardInfoObjectCredit Card Result Info (See cardInfo below)

paymentInfo > cardInfo (Credit Card Result Info)​

Field NameTypeLengthRequiredDescription
cardNoString20Byte✅Billing Key (Required for Payment Approval Request)
issuerCodeString3Byte✅Issuer Code (See Card Codes)
issuerNameString50Byte✅Issuer Name
acquirerCodeString3ByteAcquirer Code (See Card Codes)
acquirerNameString50ByteAcquirer Name
cardGubunString1ByteCard Type: Credit(“N”), Check(“Y”), Gift(“G”)
cardBizGubunString1ByteCard Owner Type: Personal(“P”), Corporate(“C”), Other(“N”)
partCancelUsedString1BytePartial Cancellation Availability (Y/N)
subCardCdString3ByteBC Affiliate Card Code provided in the response
cardMaskNoString40ByteMasked Card Number (*)
Response Example
{
"resCd": "0000",
"resMsg": "Success",
"mallId": "{Requested Merchant ID}",
"pgCno": "{PG Transaction ID}",
"shopTransactionId": "{Requested API Idempotency Key}",
"shopOrderNo": "{Merchant Order No}",
"transactionDate": "20210326090200",
"msgAuthValue": "e06540df5ac28ac877fb4f063d06d5f9c3ee2a3a8820a888bfc8db1577a7fe",
"escrowUsed": "N",
"paymentInfo": {
"payMethodTypeCode": "11",
"cardInfo": {
"cardNo": "{Billing Key}",
"issuerCode": "029",
"issuerName": "Shinhan Card",
"acquirerCode": "029",
"acquirerName": "Shinhan Card",
"cardGubun": "N",
"cardBizGubun": "P",
"partCancelUsed": "Y",
"cardMaskNo": "54646500******01"
}
}
}

Message Authentication Value​

The Message Authentication Value is constructed by combining the fields below and hashing the result using HmacSHA256. (See Message Authentication)

pgCno(PG Transaction ID) + “|” + amount(Total Payment Amount) + “|” + transactionDate(Transaction Date/Time)