Account Enrollment API
Sends an account enrollment request from the merchant server to the Hecto Financial server. (Processes enrollment for both firm banking and Open Banking.)
Uses the transaction reference number (trdNo) returned from the 'ARS Authentication Confirmation' API to complete account enrollment (direct debit registration). The enrolled account can then be used for future payments (direct debit).
API Information
POST/v2/api/acnt/reg
Content-Type
application/json테스트
https://tbnpay.settlebank.co.kr/v2/api/acnt/reg운영
https://npay.settlebank.co.kr/v2/api/acnt/regRequest Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
└hdInfoAN(50)Alphanumeric, up to 50 bytes*Message information code.
Message information code.
*Fixed value
└mchtIdAN(8)Alphanumeric, up to 8 bytes*Unique Merchant ID assigned by Hecto Financial.
Unique Merchant ID assigned by Hecto Financial.
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Merchant order number.
Merchant order number.
*No Korean characters
└trdNoAN(50)Alphanumeric, up to 50 bytesHecto Financial transaction reference number.
Hecto Financial transaction reference number.
*Set the transaction reference number returned from ARS authentication. Required when authMthdCd is ARS.
└mchtCustIdAN(100)Alphanumeric, up to 100 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Unique customer ID or key provided by the merchant.Unique customer ID or key provided by the merchant.
└reqDtAN(8)Alphanumeric, up to 8 bytes*Request date.
Request date.
*yyyyMMdd
└reqTmAN(6)Alphanumeric, up to 6 bytes*Request time.
Request time.
*HH24MISS
└mchtCustNmAN(60)Alphanumeric, up to 60 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Account holder name.Account holder name.
*English/numeric/Korean (Korean: 3 bytes per character)
└uiiAN(6)Alphanumeric, up to 6 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Date of birth.Date of birth.
*Date of birth: yyMMdd. Business registration numbers are not supported.
└bankCdAN(3)Alphanumeric, up to 3 bytes*Bank code.
Bank code.
*Refer to the financial institution code table
└custAcntNoAN(15)Alphanumeric, up to 15 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Account number.Account number.
*Account number excluding "-", minimum 9 digits, maximum 15 digits
└authMthdCdAN(5)Alphanumeric, up to 5 bytesAuthentication method code.
Authentication method code.
WR: Written file ARS: ARS authentication PASS: PASS certificate*Direct debit consent method. Default: ARS
└custIpAN(15)Alphanumeric, up to 15 bytesCustomer IP address.
Customer IP address.
*The customer device's IP address, not the merchant server IP
└pktHashAN(200)Alphanumeric, up to 200 bytes*
SHA-256SHA-256 hash value.(실시간 생성)SHA-256 hash value.
*Merchant ID + customer ID (plaintext) + request date + request time + account number (plaintext) + auth key
└sexDivCdAN(1)Alphanumeric, up to 1 bytes*Gender code.
Gender code.
*First digit of the resident registration number back half
└ciAN(88)Alphanumeric, up to 88 bytes*Customer CI.
Customer CI.
└emailAN(100)Alphanumeric, up to 100 bytesCustomer email address.
Customer email address.
Request Hash Code
| Item | Combined fields |
|---|---|
| pktHash value | Merchant ID + customer ID (plaintext) + request date + request time + account number (plaintext) + auth key |
Response Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
└outStatCdAN(4)Alphanumeric, up to 4 bytes*Transaction status code (success/failure).
Transaction status code (success/failure).
0021: Success 0031: Failure└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Decline code.
Decline code.
*Refer to rejection code table. ST08: If the account is already enrolled, the enrolled account information is returned.
└outRsltMsgAN(300)Alphanumeric, up to 300 bytes*Result message.
Processed successfully.Result message.
*Error details are returned when an error occurs.
└mchtCustIdAN(100)Alphanumeric, up to 100 bytes*
AES-256AES-256/ECB/PKCS5PaddingUnique customer ID or key provided by the merchant.kimhectoUnique customer ID or key provided by the merchant.
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
└bankCdAN(3)Alphanumeric, up to 3 bytes*3-digit bank code.
0043-digit bank code.
└custAcntNoAN(15)Alphanumeric, up to 15 bytes*Account number (masked).
234*******123Account number (masked).
└custAcntKeyAN(50)Alphanumeric, up to 50 bytes*Customer account key — serial number of the registered direct debit account.
d894kjd93kd9Customer account key — serial number of the registered direct debit account.
└svcDivCdN(4)Numeric, up to 4 bytes*Service registered for direct debit.
Service registered for direct debit.
1: Firm banking 2: Open Banking 3: Firm banking and Open Banking└mchtTrdNoAN(100)Alphanumeric, up to 100 bytesMerchant order number.
OID201902210001Merchant order number.
*No Korean characters
└trdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction reference number.
STFP_FIRM12345678901234567890Hecto Financial transaction reference number.
└obPayerNoAN(30)Alphanumeric, up to 30 bytesOpen Banking payer number.
20220630123456789012Open Banking payer number.
*Customer payer number registered via Open Banking
└fintechUseNoAN(24)Alphanumeric, up to 24 bytesFintech usage number (fintechUseNo).
123456789012345678901234Fintech usage number (fintechUseNo).
*Open Banking user account identifier
└userSeqNoAN(10)Alphanumeric, up to 10 bytesUser sequence number.
1234567890User sequence number.
*Open Banking user identifier
└obRsltCdAN(4)Alphanumeric, up to 4 bytesOpen Banking account enrollment result.
Open Banking account enrollment result.
*Refer to rejection code table
Request Example
{
"hdInfo": "SPAY_RE0W_1.0",
"mchtId": "midtest",
"mchtTrdNo": "OID201902210001",
"trdNo": "T2019022100001",
"mchtCustId": "AES-encrypted customer ID",
"reqDt": "20191231",
"reqTm": "120000",
"mchtCustNm": "AES-encrypted account holder name",
"uii": "AES-encrypted date of birth",
"bankCd": "004",
"custAcntNo": "AES-encrypted account number",
"authMthdCd": "ARS",
"custIp": "127.0.0.1",
"pktHash": "hash value",
"sexDivCd": "1",
"ci": "customer CI value",
"email": "customer@example.com"
}
Response Example
{
"outStatCd": "0021",
"outRsltCd": "0000",
"outRsltMsg": "Processed successfully.",
"mchtCustId": "AES-encrypted customer ID",
"bankCd": "004",
"custAcntNo": "234*******123",
"custAcntKey": "d894kjd93kd9",
"svcDivCd": "2",
"mchtTrdNo": "OID201902210001",
"trdNo": "STFP_FIRM12345678901234567890",
"obPayerNo": "20220630123456789012",
"fintechUseNo": "123456789012345678901234",
"userSeqNo": "1234567890",
"obRsltCd": "0000"
}
Need technical support?
Code Samples
HectoFinancial GitHub