Charge with Billkey API
An API for making payments using a billkey received from the credit card payment API or billkey issuance API.
Test Key Information
Important Notes
NOTE
Billkey Service Activation
The Billkey (tokenized recurring payment) service requires separate service activation. Contact your account manager.
- Use the billkey issued during the initial charge to process subsequent charges.
- Billkey payment is processed via server-to-server communication without any UI.
API Information
POST/spay/APICardActionPay.do
Content-Type
application/json테스트
https://tbgw.settlebank.co.kr/spay/APICardActionPay.do운영
https://gw.settlebank.co.kr/spay/APICardActionPay.doRequest 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
Unique merchant ID assigned by Hecto Financial
nxca_ks_gu: legacy-authenticated nxca_jt_bi: non-authenticated└verAN(4)Alphanumeric, up to 4 bytes*Message version
Message version
*Fixed value
└methodA(2)Alphabetic, up to 2 bytes*Payment method
Payment method
*Fixed value
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code
Business type code
*Fixed value
└encCdN(2)Numeric, up to 2 bytes*Encryption type code
Encryption type code
*Fixed value
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Unique order number generated by the merchant
Unique order number generated by the merchant
└trdDtN(8)Numeric, up to 8 bytes*Date the message is transmitted (YYYYMMDD)
Date the message is transmitted (YYYYMMDD)
└trdTmN(6)Numeric, up to 6 bytes*Time the message is transmitted (HHMMSS)
Time the message is transmitted (HHMMSS)
└mobileYnA(1)Alphabetic, up to 1 bytesMobile indicator
Mobile indicator
Y: Mobile web/app N: PC or other└osTypeA(1)Alphabetic, up to 1 bytesOS type
OS type
A: Android I: IOS W: Windows M: Mac E: Otherdata Object
└pktHashAN(200)Alphanumeric, up to 200 bytes*
SHA-256Hash value generated using SHA256(실시간 생성)Hash value generated using SHA256
NOTE
Hash Generation Combination
trdDt + trdTm + mchtId + mchtTrdNo + trdAmt (plaintext) + hashKey
└pmtprdNmAHN(128)Alphanumeric + Korean, up to 128 bytes*Product name for payment
Product name for payment
└mchtCustNmAHN(30)Alphanumeric + Korean, up to 30 bytes*Merchant customer name
Merchant customer name
└mchtCustIdAHN(50)Alphanumeric + Korean, up to 50 bytes*Merchant customer ID
Merchant customer ID
└emailAN(60)Alphanumeric, up to 60 bytesMerchant customer email address
Merchant customer email address
└billKeyAN(50)Alphanumeric, up to 50 bytes*Billkey issued during the initial charge
Billkey issued during the initial charge
└instmtMonN(2)Numeric, up to 2 bytes*Installment months (2 digits)
Installment months (2 digits)
00: Full payment 02~12: Corresponding number of months└crcCdA(3)Alphabetic, up to 3 bytes*Currency type
Currency type
KRW: Domestic payment USD: International payment└taxTypeCdA(1)Alphabetic, up to 1 bytesTax type. If blank, follows merchant configuration
Tax type. If blank, follows merchant configuration
N: Taxable Y: Tax-exempt G: Mixed taxation└trdAmtN(12)Numeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64Transaction amountTransaction amount
*Domestic payment: 1000, International payment: 150 (ex [$1.50] => integer representation [150])
└taxAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Taxable amount within the transaction amount (required for mixed taxation)Taxable amount within the transaction amount (required for mixed taxation)
└vatAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64VAT amount within the transaction amount (required for mixed taxation)VAT amount within the transaction amount (required for mixed taxation)
└taxFreeAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Tax-free amount within the transaction amount (required for mixed taxation)Tax-free amount within the transaction amount (required for mixed taxation)
└svcAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Credit card service chargeCredit card service charge
└notiUrlAN(250)Alphanumeric, up to 250 bytes*Webhook URL to receive the payment result sent from Hecto Financial to your server after payment completion
Webhook URL to receive the payment result sent from Hecto Financial to your server after payment completion
└mchtParamAHN(4000)Alphanumeric + Korean, up to 4000 bytesMerchant reserved field for entering additional order information
Merchant reserved field for entering additional order information
Response Parameters
params Object
└mchtIdAN(12)Alphanumeric, up to 12 bytes*Unique merchant ID assigned by Hecto Financial
nxca_jt_biUnique merchant ID assigned by Hecto Financial
└verAN(4)Alphanumeric, up to 4 bytes*Message version
0A19Message version
*Fixed value
└methodA(2)Alphabetic, up to 2 bytes*Payment method
CAPayment method
*Fixed value
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code
B0Business type code
*Fixed value
└encCdN(2)Numeric, up to 2 bytes*Encryption type code
23Encryption type code
*Fixed value
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Unique order number generated by the merchant
ORDER20211231100000Unique order number generated by the merchant
└trdNoAN(40)Alphanumeric, up to 40 bytes*Unique transaction number issued by Hecto Financial
STFP_PGCAnxca_jt_il0211129135810M1494620Unique transaction number issued by Hecto Financial
└trdDtN(8)Numeric, up to 8 bytes*Request date (YYYYMMDD)
20211231Request date (YYYYMMDD)
└trdTmN(6)Numeric, up to 6 bytes*Request time (HHMMSS)
100000Request time (HHMMSS)
└outStatCdAN(4)Alphanumeric, up to 4 bytes*Transaction status code (success/failure)
0021Transaction status code (success/failure)
0021: Success 0031: Failure└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Decline code. Detailed code provided when transaction status is '0031'
0000Decline code. Detailed code provided when transaction status is '0031'
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Result message (URL Encoding, UTF-8)
Processed successfully.Result message (URL Encoding, UTF-8)
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*Hash value from request returned as-is
Hash value from request returned as-is
└trdAmtN(12)Numeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5PaddingTransaction amount1000Transaction amount
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
└billKeyAN(50)Alphanumeric, up to 50 bytes*Value from request returned as-is
SBILL_0123456789Value from request returned as-is
└cardNoN(16)Numeric, up to 16 bytesMasked card number. Not provided by default; available only for specific merchants.
111122xxxxxx4444Masked card number. Not provided by default; available only for specific merchants.
└vldDtMonN(2)Numeric, up to 2 bytesExpiration date MM. Provided only for merchants using the Billkey (tokenized recurring payment) service.
12Expiration date MM. Provided only for merchants using the Billkey (tokenized recurring payment) service.
└vldDtYearN(2)Numeric, up to 2 bytesExpiration date YY. Provided only for merchants using the Billkey (tokenized recurring payment) service.
24Expiration date YY. Provided only for merchants using the Billkey (tokenized recurring payment) service.
└issrIdAN(4)Alphanumeric, up to 4 bytes*Card issuer identifier
NHCCard issuer identifier
└cardNmAHN(20)Alphanumeric + Korean, up to 20 bytes*Card company name
NH NongHyupCard company name
└cardKindAHN(50)Alphanumeric + Korean, up to 50 bytes*Card type
NH Check CardCard type
└ninstmtTypeCdA(1)Alphabetic, up to 1 bytes*Interest-free installment type
NInterest-free installment type
Y: Interest-free (partial, merchant) N: Regular installment, full payment└instmtMonN(2)Numeric, up to 2 bytesValue from request returned as-is
00Value from request returned as-is
└apprNoN(15)Numeric, up to 15 bytes*Card approval number
30001234Card approval number
Need technical support?
Code Samples
HectoFinancial GitHub