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-Typeapplication/json
테스트https://tbnpay.settlebank.co.kr/v2/api/pay/confirm
운영https://npay.settlebank.co.kr/v2/api/pay/confirm

Request Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte
hdInfoAN(50)Alphanumeric, up to 50 bytes*
Message information code.
*Fixed value
mchtIdAN(8)Alphanumeric, up to 8 bytes*
Unique Merchant ID assigned by Hecto Financial.
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
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.
reqDtN(8)Numeric, up to 8 bytes*
Request date.
*yyyyMMdd
reqTmN(6)Numeric, up to 6 bytes*
Request time.
*HH24MISS
trdAmtN(13)Numeric, up to 13 bytes*
Transaction amount.
*Amount to debit (transaction amount)
bankCdN(3)Numeric, up to 3 bytes*
Debit bank code.
*Registered customer's debit bank code
custAcntKeyAN(50)Alphanumeric, up to 50 bytes
Customer account key.
*Serial number of the registered direct debit account
splAmtN(13)Numeric, up to 13 bytes
Supply amount.
vatN(13)Numeric, up to 13 bytes
VAT amount.
svcAmtN(13)Numeric, up to 13 bytes
Service charge.
pmtPrdtNmAN(50)Alphanumeric, up to 50 bytes
Product name for the payment.
*Name of the product being purchased
custAcntSumryAN(7)Alphanumeric, up to 7 bytes
Bank statement description.
*Text that will appear on the customer's bank statement
csrcIssReqYnA(1)Alphabetic, up to 1 bytes
Cash receipt issuance request.
Y: Issue cash receipt N: Do not issue cash receipt
csrcIssPsblYnA(1)Alphabetic, up to 1 bytes
Cash receipt issuance eligibility.
Y: Cash receipt issuable transaction N: Cash receipt not issuable transaction
taxTypeCdA(1)Alphabetic, up to 1 bytes
Tax exemption status.
Y: Tax-exempt N: Taxable
*Required when csrcIssReqYn is Y
csrcRegPrposYnN(1)Numeric, up to 1 bytes
Usage type.
0: Income deduction 1: Expense proof
*Required when csrcIssReqYn is Y
csrcRegNoDivCdN(1)Numeric, up to 1 bytes
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 bytesAES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)
Issuance information value.
*Actual value corresponding to csrcRegNoDivCd. Required when csrcIssReqYn is Y.
addDdtTypeCdA(1)Alphabetic, up to 1 bytes
Additional deduction type.
Y: Public transportation C: Books, cultural events
custIpAN(15)Alphanumeric, up to 15 bytes
Customer IP address.
*The customer device's IP address, not the merchant server IP
pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256(실시간 생성)
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 bytes
Sub-merchant name.
*Name of the sub-merchant where the transaction occurred
subCpnNoAN(20)Alphanumeric, up to 20 bytes
Sub-merchant number.
*Number of the sub-merchant where the transaction occurred
subCpnBizRegNoAN(10)Alphanumeric, up to 10 bytes
Sub-merchant business registration number.
*Business registration number of the sub-merchant where the transaction occurred
lastStlAcntDprNmAN(20)Alphanumeric, up to 20 bytes
Final settlement account holder name.
*Bank statement description for the sub-merchant settlement account
lastStlAcntBankCdAN(3)Alphanumeric, up to 3 bytes
Final settlement account bank code.
*Sub-merchant settlement account bank code
lastStlAcntNoAN(15)Alphanumeric, up to 15 bytesAES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)
Final settlement account number.
*Sub-merchant settlement account number, excluding "-"

Request Hash Code

ItemCombined fields
pktHash valueMerchant 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).
0021: Success 0031: Failure
outRsltCdAN(4)Alphanumeric, up to 4 bytes*
Decline code.
*Refer to rejection code table
outRsltMsgAN(200)Alphanumeric, up to 200 bytes*Processed successfully.
Result message.
*Error details are returned when an error occurs.
trdNoAN(50)Alphanumeric, up to 50 bytes*STFP_FIRM12345678901234567890
Hecto Financial transaction reference number.
trdAmtN(13)Numeric, up to 13 bytes*1000
Transaction amount.
*Amount debited (transaction amount)
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*OID201902210001
Merchant order number.
*No Korean characters
svcDivCdN(4)Numeric, up to 4 bytes*
Service used for the payment.
1: Firm banking 2: Open Banking
*Service used for the payment (direct debit)
obPsblYnAN(1)Alphanumeric, up to 1 bytes
Open Banking availability.
Y: Available N: Unavailable
*Whether the debit bank supports Open Banking
macntNoAN(24)Alphanumeric, up to 24 bytesAES-256AES-256/ECB/PKCS5Padding
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?