Payment API
Sends an Open Banking payment request from the merchant server to the Hecto Financial server. Executes a direct debit against an account that has been registered through account enrollment. As a result of this API call, funds are transferred from the customer's account to the merchant's Open Banking master account.
API Information
POST/v2/api/pay/confirm
Content-Type
application/json테스트
https://tbnpay.settlebank.co.kr/v2/api/pay/confirm운영
https://npay.settlebank.co.kr/v2/api/pay/confirmRequest 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
└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.
└reqDtN(8)Numeric, up to 8 bytes*Request date.
Request date.
*yyyyMMdd
└reqTmN(6)Numeric, up to 6 bytes*Request time.
Request time.
*HH24MISS
└trdAmtN(13)Numeric, up to 13 bytes*Transaction amount.
Transaction amount.
*Amount to debit (transaction amount)
└bankCdN(3)Numeric, up to 3 bytes*Debit bank code.
Debit bank code.
*Registered customer's debit bank code
└custAcntKeyAN(50)Alphanumeric, up to 50 bytesCustomer account key.
Customer account key.
*Serial number of the registered direct debit account
└splAmtN(13)Numeric, up to 13 bytesSupply amount.
Supply amount.
└vatN(13)Numeric, up to 13 bytesVAT amount.
VAT amount.
└svcAmtN(13)Numeric, up to 13 bytesService charge.
Service charge.
└pmtPrdtNmAN(50)Alphanumeric, up to 50 bytesProduct name for the payment.
Product name for the payment.
*Name of the product being purchased
└custAcntSumryAN(7)Alphanumeric, up to 7 bytesBank statement description.
Bank statement description.
*Text that will appear on the customer's bank statement
└csrcIssReqYnA(1)Alphabetic, up to 1 bytesCash receipt issuance request.
Cash receipt issuance request.
Y: Issue cash receipt N: Do not issue cash receipt└csrcIssPsblYnA(1)Alphabetic, up to 1 bytesCash receipt issuance eligibility.
Cash receipt issuance eligibility.
Y: Cash receipt issuable transaction N: Cash receipt not issuable transaction└taxTypeCdA(1)Alphabetic, up to 1 bytesTax exemption status.
Tax exemption status.
Y: Tax-exempt N: Taxable*Required when csrcIssReqYn is Y
└csrcRegPrposYnN(1)Numeric, up to 1 bytesUsage type.
Usage type.
0: Income deduction 1: Expense proof*Required when csrcIssReqYn is Y
└csrcRegNoDivCdN(1)Numeric, up to 1 bytesIssuance information type.
Issuance information type.
1: Card 2: Resident registration number 3: Business registration number 4: Mobile number*Required when csrcIssReqYn is Y
└csrcRegNoAN(20)Alphanumeric, up to 20 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Issuance information value.Issuance information value.
*Actual value corresponding to csrcRegNoDivCd. Required when csrcIssReqYn is Y.
└addDdtTypeCdA(1)Alphabetic, up to 1 bytesAdditional deduction type.
Additional deduction type.
Y: Public transportation C: Books, cultural events└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) + order date + order time + transaction amount + debit bank code + auth key
└subCpnNmAN(40)Alphanumeric, up to 40 bytesSub-merchant name.
Sub-merchant name.
*Name of the sub-merchant where the transaction occurred
└subCpnNoAN(20)Alphanumeric, up to 20 bytesSub-merchant number.
Sub-merchant number.
*Number of the sub-merchant where the transaction occurred
└subCpnBizRegNoAN(10)Alphanumeric, up to 10 bytesSub-merchant business registration number.
Sub-merchant business registration number.
*Business registration number of the sub-merchant where the transaction occurred
└lastStlAcntDprNmAN(20)Alphanumeric, up to 20 bytesFinal settlement account holder name.
Final settlement account holder name.
*Bank statement description for the sub-merchant settlement account
└lastStlAcntBankCdAN(3)Alphanumeric, up to 3 bytesFinal settlement account bank code.
Final settlement account bank code.
*Sub-merchant settlement account bank code
└lastStlAcntNoAN(15)Alphanumeric, up to 15 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)Final settlement account number.Final settlement account number.
*Sub-merchant settlement account number, excluding "-"
Request Hash Code
| Item | Combined fields |
|---|---|
| pktHash value | Merchant ID + customer ID (plaintext) + order date + order time + transaction amount + debit bank code + 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
└outRsltMsgAN(200)Alphanumeric, up to 200 bytes*Result message.
Processed successfully.Result message.
*Error details are returned when an error occurs.
└trdNoAN(50)Alphanumeric, up to 50 bytes*Hecto Financial transaction reference number.
STFP_FIRM12345678901234567890Hecto Financial transaction reference number.
└trdAmtN(13)Numeric, up to 13 bytes*Transaction amount.
1000Transaction amount.
*Amount debited (transaction amount)
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Merchant order number.
OID201902210001Merchant order number.
*No Korean characters
└svcDivCdN(4)Numeric, up to 4 bytes*Service used for the payment.
Service used for the payment.
1: Firm banking 2: Open Banking*Service used for the payment (direct debit)
└obPsblYnAN(1)Alphanumeric, up to 1 bytesOpen Banking availability.
Open Banking availability.
Y: Available N: Unavailable*Whether the debit bank supports Open Banking
└macntNoAN(24)Alphanumeric, up to 24 bytes
AES-256AES-256/ECB/PKCS5PaddingMaster account number.Master account number.
*Master account number, excluding "-"
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
Request Example
{
"hdInfo": "SPAY_RP0W_1.0",
"mchtId": "midtest",
"mchtTrdNo": "OID201902210001",
"mchtCustId": "AES-encrypted customer ID",
"reqDt": "20191231",
"reqTm": "120000",
"trdAmt": "1000",
"bankCd": "004",
"custAcntKey": "d894kjd93kd9",
"splAmt": "0",
"vat": "0",
"svcAmt": "0",
"pmtPrdtNm": "Product name",
"custAcntSumry": "Kim Hecto",
"csrcIssReqYn": "N",
"csrcIssPsblYn": "N",
"custIp": "127.0.0.1",
"pktHash": "hash value"
}
Response Example
{
"outStatCd": "0021",
"outRsltCd": "0000",
"outRsltMsg": "Processed successfully.",
"trdNo": "STFP_FIRM12345678901234567890",
"trdAmt": "1000",
"mchtTrdNo": "OID201902210001",
"svcDivCd": "2",
"obPsblYn": "Y"
}
Need technical support?
Code Samples
HectoFinancial GitHub