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
mallIdString8ByteMerchant ID assigned by KICC
shopTransactionIdString60ByteMerchant Transaction ID (API Idempotency Key)
authorizationIdString60ByteAuthorization ID received after calling the registration window. Use the value exactly as received.
shopOrderNoString40ByteMerchant Order No. Use the value exactly as requested.
approvalReqDateString8ByteRequest Date (yyyyMMdd)
Request Example
{  
"mallId": "T5102001",
"shopOrderNo": "{Merchant Order No}",
"shopTransactionId": "{API Idempotency Key}",
"authorizationId": "{Authorization ID}",
"approvalReqDate": "{Request Date}"
}

Response

Parameters

Field NameTypeLengthRequiredDescription
resCdString4ByteResponse Code (Success: “0000”)
resMsgString1000ByteResponse Message
mallIdString8ByteMerchant ID assigned by KICC
shopTransactionIdString60ByteReturns 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
payMethodTypeCodeString2BytePayment Method Code (See Payment Method Codes)
cardInfoObjectCredit Card Result Info (See cardInfo below)

paymentInfo > cardInfo (Credit Card Result Info)

Field NameTypeLengthRequiredDescription
cardNoString20ByteBilling Key (Required for Payment Approval Request)
issuerCodeString3ByteIssuer Code (See Card Codes)
issuerNameString50ByteIssuer 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)