Real-Time Transaction Inquiry API
Retrieve the status of an original transaction in real time.
Sandbox Key Information
Important Notes
NOTE
Single Transaction Status Inquiry by Payment Method
Enter the date of the original transaction request as the original transaction date. (Transactions within one day before and after the transaction date can be queried.)
- If the original transaction reference number is available, passing
orgTrdNoas an additional parameter improves query accuracy.
API Information
POST/spay/APITrdcheck.do
Content-Type
application/json테스트
https://tbgw.settlebank.co.kr/spay/APITrdcheck.do운영
https://gw.settlebank.co.kr/spay/APITrdcheck.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.
*Fixed value
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Unique transaction reference number generated by the merchant for this inquiry request.
Unique transaction reference number generated by the merchant for this inquiry request.
└trdDtN(8)Numeric, up to 8 bytes*Date this message is being sent (YYYYMMDD).
Date this message is being sent (YYYYMMDD).
└trdTmN(6)Numeric, up to 6 bytes*Time this message is being sent (HHMMSS).
Time this message is being sent (HHMMSS).
data Object
└pktHashAN(200)Alphanumeric, up to 200 bytes*
SHA-256Hash value generated using SHA-256.(실시간 생성)Hash value generated using SHA-256.
*Transaction date + Transaction time + Merchant ID + Merchant order number + Transaction amount (plaintext) + Hash key
└methodA(2)Alphabetic, up to 2 bytes*Payment method code.
Payment method code.
WL: White-Label*Fixed value
└trdAmtN(12)Numeric, up to 12 bytes*Transaction amount (plaintext).
Transaction amount (plaintext).
*KRW 1,000 → 1000
└orgTrdDtN(8)Numeric, up to 8 bytes*Request date of the original payment transaction (YYYYMMDD).
Request date of the original payment transaction (YYYYMMDD).
└orgMchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Merchant order number of the original transaction.
Merchant order number of the original transaction.
└orgTrdNoAN(40)Alphanumeric, up to 40 bytesTransaction reference number issued by Hecto Financial at the time of payment.
Transaction reference number issued by Hecto Financial at the time of payment.
Response 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.
pg_testUnique Merchant ID assigned by Hecto Financial.
└verAN(4)Alphanumeric, up to 4 bytes*Message version.
0A1MMessage version.
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Order number from the request, echoed back.
WLINFO20260107143000Order number from the request, echoed back.
└trdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction reference number.
STFP_PGCApg_test0000260107143000M1717578Hecto Financial transaction reference number.
└trdDtN(8)Numeric, up to 8 bytes*Date this message was sent (YYYYMMDD).
20260107Date this message was sent (YYYYMMDD).
└trdTmN(6)Numeric, up to 6 bytes*Time this message was sent (HHMMSS).
143000Time this message was sent (HHMMSS).
└outStatCdN(4)Numeric, up to 4 bytes*Transaction status code.
0021Transaction status code.
0021: Success 0031: Failure*Confirmed success: status = 0021 AND result code = 0000
└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Result code.
0000Result code.
0000: Normal transaction (for virtual account: deposit successful) 0001: Voided (for virtual account: refunded) 0009: Payment failed*For other rejection codes, refer to the rejection code table.
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Result message.
정상거래Result message.
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*The hash value echoed back from the request.
996E651D9435700D54E0D69B5726B5489AD0691C3FC86BE572314D39A2AE8B6DThe hash value echoed back from the request.
└methodA(2)Alphabetic, up to 2 bytes*Payment method code.
WLPayment method code.
WL: White-Label└trdAmtN(12)Numeric, up to 12 bytes*Transaction amount.
1000Transaction amount.
└cnclAmtN(12)Numeric, up to 12 bytesVoid amount (KRW 0 if no void exists).
0Void amount (KRW 0 if no void exists).
Request Example
{
"params": {
"mchtId": "pg_test",
"ver": "0A1M",
"mchtTrdNo": "WLINFO20260107143000",
"trdDt": "20260107",
"trdTm": "143000"
},
"data": {
"pktHash": "996E651D9435700D54E0D69B5726B5489AD0691C3FC86BE572314D39A2AE8B6D",
"method": "WL",
"trdAmt": "1000",
"orgTrdDt": "20260107",
"orgMchtTrdNo": "ORDER20260107143000",
"orgTrdNo": "STFP_PGCApg_test0000260107143000M1717578"
}
}
Response Example
{
"params": {
"mchtId": "pg_test",
"ver": "0A1M",
"mchtTrdNo": "WLINFO20260107143000",
"trdNo": "STFP_PGCApg_test0000260107143000M1717578",
"trdDt": "20260107",
"trdTm": "143000",
"outStatCd": "0021",
"outRsltCd": "0000",
"outRsltMsg": "정상거래"
},
"data": {
"pktHash": "996E651D9435700D54E0D69B5726B5489AD0691C3FC86BE572314D39A2AE8B6D",
"method": "WL",
"trdAmt": "1000",
"cnclAmt": "0"
}
}
Need technical support?
Code Samples
HectoFinancial GitHub