Payment Capture API
Process the actual payment server-to-server after payment checkout (UI) authentication is complete.
Sandbox Key Information
Important Notes
authTrdNo Required
Pass the trdNo (transaction reference number) from the payment checkout response as the authTrdNo parameter.
API Information
POST/whitelabel/v1/pay_confirm.do
Content-Type
application/json테스트
https://tbapi.settlebank.co.kr/whitelabel/v1/pay_confirm.do운영
https://api.settlebank.co.kr/whitelabel/v1/pay_confirm.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.
└verAN(4)Alphanumeric, up to 4 bytes*Message version.
Message version.
└methodA(2)Alphabetic, up to 2 bytes*Payment method.
Payment method.
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code.
Business type code.
└encCdN(2)Numeric, up to 2 bytes*Encryption type code.
Encryption type code.
└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*Request date (yyyyMMdd).
Request date (yyyyMMdd).
└trdTmN(6)Numeric, up to 6 bytes*Request time (HHmmss).
Request time (HHmmss).
└mobileYnA(1)Alphabetic, up to 1 bytesMobile flag.
Mobile flag.
Y: Mobile web/app N: PC└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 SHA-256.(실시간 생성)Hash value generated using SHA-256.
*trdDt + trdTm + mchtId + mchtTrdNo + trdAmt(plaintext) + hash key
└mchtCustIdAN(100)Alphanumeric, up to 100 bytes*Merchant customer ID.
Merchant customer ID.
└authTrdNoAN(40)Alphanumeric, up to 40 bytes*Transaction reference number from the payment checkout response (trdNo).
Transaction reference number from the payment checkout response (trdNo).
└trdAmtAN(12)Alphanumeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64Transaction amount.Transaction amount.
Response Parameters
params Object
└mchtIdAN(12)Alphanumeric, up to 12 bytes*Merchant ID.
pg_testMerchant ID.
└verAN(4)Alphanumeric, up to 4 bytes*Message version.
0A18Message version.
*Fixed value
└methodA(2)Alphabetic, up to 2 bytes*Payment method.
WLPayment method.
*Fixed value
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code.
B9Business 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*Merchant order number.
ORDER20260107143000Merchant order number.
└outStatCdAN(4)Alphanumeric, up to 4 bytes*Transaction status code.
0021Transaction status code.
0021: Success 0031: Failure└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Rejection code (detailed code on failure).
0000Rejection code (detailed code on failure).
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Result message.
Processed successfully.Result message.
└trdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction reference number (required for void).
STFP_PGCApg_test0000260107143100M1234567Hecto Financial transaction reference number (required for void).
└trdDtN(8)Numeric, up to 8 bytes*Transaction date.
20260107Transaction date.
└trdTmN(6)Numeric, up to 6 bytes*Transaction time.
143100Transaction time.
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*The hash value echoed back from the request. Compare against the hash generated at request time to verify data integrity.
The hash value echoed back from the request. Compare against the hash generated at request time to verify data integrity.
NOTE
Hash Verification
The pktHash in the response is identical to the hash sent in the request. Verify data integrity by comparing it against the hash you generated (trdDt + trdTm + mchtId + mchtTrdNo + trdAmt(plaintext) + hashKey).
└mchtCustIdAN(100)Alphanumeric, up to 100 bytes*Merchant customer ID.
honggildongMerchant customer ID.
└authTrdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction reference number.
STFP_PGCApg_test0000260107143000M1717578Hecto Financial transaction reference number.
└payMethodAN(2)Alphanumeric, up to 2 bytes*Payment method code.
CAPayment method code.
CA: Credit card RP: Simple cash payment└fnNmHA(20)HA, up to 20 bytesCard issuer name (credit card only).
KookminCard issuer name (credit card only).
└fnCdAN(4)Alphanumeric, up to 4 bytesCard issuer code (credit card only).
KBCCard issuer code (credit card only).
└svcDivCdN(1)Numeric, up to 1 bytesSimple cash payment integration type.
1Simple cash payment integration type.
1: Firm banking 2: Open banking└trdAmtAN(12)Alphanumeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5PaddingTransaction amount.vqIWIiimsJ5efjSJpfnnTw==Transaction amount.
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
Request Example
{
"params": {
"mchtId": "pg_test",
"ver": "0A18",
"method": "WL",
"bizType": "B9",
"encCd": "23",
"mchtTrdNo": "ORDER20260107143000",
"trdDt": "20260107",
"trdTm": "143000",
"mobileYn": "N",
"osType": "W"
},
"data": {
"pktHash": "197884af9f63bcd2d9792cd5cd39f7b1e7525e88888e2cee28f64fa23bf53312",
"mchtCustId": "honggildong",
"authTrdNo": "STFP_PGCApg_test0000260107143000M1717578",
"trdAmt": "vqIWIiimsJ5efjSJpfnnTw=="
}
}
Response Example
{
"params": {
"mchtId": "pg_test",
"ver": "0A18",
"method": "WL",
"bizType": "B9",
"encCd": "23",
"mchtTrdNo": "ORDER20260107143000",
"trdNo": "STFP_PGCApg_test0000260107143100M1234567",
"trdDt": "20260107",
"trdTm": "143100",
"outStatCd": "0021",
"outRsltCd": "0000",
"outRsltMsg": "Processed successfully."
},
"data": {
"pktHash": "197884af9f63bcd2d9792cd5cd39f7b1e7525e88888e2cee28f64fa23bf53312",
"mchtCustId": "honggildong",
"authTrdNo": "STFP_PGCApg_test0000260107143000M1717578",
"trdAmt": "vqIWIiimsJ5efjSJpfnnTw==",
"payMethod": "CA",
"fnNm": "Kookmin",
"fnCd": "KBC"
}
}
Need technical support?
Code Samples
HectoFinancial GitHub