Issue Billkey (Token) API

An API that issues only a billkey without making a payment. The issued billkey is used for subsequent charges.

Test Key Information

Important Notes

NOTE

Billkey Service Activation

The Billkey (tokenized recurring payment) service requires separate service activation. Contact your account manager.
  • Store the issued billkey and use it for subsequent charges.
  • The issued billkey is used in the Billkey Payment API.

API Information

POST/spay/APICardAuth.do
Content-Typeapplication/json
테스트https://tbgw.settlebank.co.kr/spay/APICardAuth.do
운영https://gw.settlebank.co.kr/spay/APICardAuth.do

Request Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte

params Object

mchtIdAN(12)Alphanumeric, up to 12 bytes*
Unique merchant ID assigned by Hecto Financial
nxca_ks_gu: legacy-authenticated
verAN(4)Alphanumeric, up to 4 bytes*
Message version
*Fixed value
methodA(2)Alphabetic, up to 2 bytes*
Payment method
*Fixed value
bizTypeAN(2)Alphanumeric, up to 2 bytes*
Business type code
*Fixed value (for billkey issuance)
encCdN(2)Numeric, up to 2 bytes*
Encryption type code
*Fixed value
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Unique order number generated by the merchant
trdDtN(8)Numeric, up to 8 bytes*
Date the message is transmitted (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*
Time the message is transmitted (HHMMSS)
mobileYnA(1)Alphabetic, up to 1 bytes
Mobile indicator
Y: Mobile web/app N: PC or other
osTypeA(1)Alphabetic, up to 1 bytes
OS type
A: Android I: IOS W: Windows M: Mac E: Other

data Object

pktHashAN(64)Alphanumeric, up to 64 bytes*SHA-256(실시간 생성)
Hash value generated using SHA256
NOTE

Hash Generation Combination

trdDt + trdTm + mchtId + mchtTrdNo + "0" + hashKey
cardNoN(128)Numeric, up to 128 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Card number, digits only
idntNoN(64)Numeric, up to 64 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
6-digit date of birth or 10-digit business registration number
vldDtMonN(24)Numeric, up to 24 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Card expiration date (month), digits only
vldDtYearN(24)Numeric, up to 24 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Card expiration date (year), digits only
cardPwdN(24)Numeric, up to 24 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
First 2 digits of card password
mchtCustNmAHN(30)Alphanumeric + Korean, up to 30 bytes
Customer name (Korean characters allowed)
mchtCustIdAHN(50)Alphanumeric + Korean, up to 50 bytes
Customer ID (Korean characters not allowed)
keyRegYnA(1)Alphabetic, up to 1 bytes*
Whether to issue a billkey after authentication
Y: Issue billkey N: Do not issue billkey

Response Parameters

params Object

mchtIdAN(12)Alphanumeric, up to 12 bytes*nxca_ks_gu
Unique merchant ID assigned by Hecto Financial
verAN(4)Alphanumeric, up to 4 bytes*0A19
Message version
*Fixed value
methodA(2)Alphabetic, up to 2 bytes*CA
Payment method
*Fixed value
bizTypeAN(2)Alphanumeric, up to 2 bytes*A4
Business type code
*Fixed value for billkey issuance
encCdN(2)Numeric, up to 2 bytes*23
Encryption type code
*Fixed value
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*PG_API20220920131039
Unique order number generated by the merchant
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGCAnxca_ks_gu0220921093117M1260999
Unique transaction number generated by Hecto Financial
trdDtN(8)Numeric, up to 8 bytes*20220921
Transaction date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*093117
Transaction time (HHMMSS)
outStatCdN(4)Numeric, up to 4 bytes*0021
Transaction status code (successful transaction: status=0021 + result code=0000)
0021: Success 0031: Failure
outRsltCdN(4)Numeric, up to 4 bytes*0000
Result code. 0000 for success, decline code otherwise
outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Processed successfully.
Result message

data Object

pktHashAN(64)Alphanumeric, up to 64 bytes*
Hash value from request returned as-is
cardNoN(128)Numeric, up to 128 bytes522112******1621
Card number (masked)
issrIdA(64)Alphabetic, up to 64 bytesHDC
Card issuer identifier
cardNmAH(20)Alpha + Korean, up to 20 bytesHyundai
Card company name
cardKindAN(50)Alphanumeric, up to 50 bytesHyundai MasterCard Personal
Card type
billKeyAN(40)Alphanumeric, up to 40 bytesSBILL_PGCAnxca_ks_gu20222609990921093117
Billkey returned when issuance request is Y. Used for subsequent charges.
*Store this billkey and use it in the billkey payment API.
💬

Need technical support?