Real-time Transaction Lookup API
An API for looking up the status of individual transactions by payment method in real time.
Test Key Information
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.doNotes
NOTE
Real-time Transaction Lookup Guide
For the original transaction date, enter the request date at the time of the original transaction you wish to look up. Transactions within the range of the day before to the day after the transaction date can be queried.
- If the original transaction number is available, providing it will result in a more accurate query.
- Send a POST request with JSON data via Server-to-Server HTTP connection.
Request Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
params Object
└mchtIdAN(10)Alphanumeric, up to 10 bytes*Unique merchant ID assigned by Hecto Financial
Unique merchant ID assigned by Hecto Financial
nx_mid_il: Virtual account test└verAN(4)Alphanumeric, up to 4 bytes*Message version
Message version
*Fixed value
└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)
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*
SHA-256Hash value generated using SHA256(실시간 생성)Hash value generated using SHA256
NOTE
Hash Generation Combination
trdDt + trdTm + mchtId + mchtTrdNo + trdAmt (plaintext) + hashKey
└methodA(2)Alphabetic, up to 2 bytes*Payment method code (2 characters)
Payment method code (2 characters)
CA: Credit Card RA: Bank Transfer MP: Mobile Payment VA: Virtual Account TC: Teencash CG: Cultureland Gift Card (CultureCash) CP: Point Damoaa BG: Book Gift Card TM: T-Money SG: Smart Munhwa Gift Card WL: White Label KP: KakaoPay NP: NaverPay PC: Payco TS: TossPay└trdAmtN(12)Numeric, up to 12 bytes*Transaction amount (e.g. 1,000 KRW → 1000)
Transaction amount (e.g. 1,000 KRW → 1000)
└orgTrdDtN(8)Numeric, up to 8 bytes*Original transaction request date (YYYYMMDD)
Original transaction request date (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 number issued by Hecto Financial at the time of payment
Transaction number issued by Hecto Financial at the time of payment
Response Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
params Object
└mchtIdAN(10)Alphanumeric, up to 10 bytes*Merchant ID
nx_mid_ilMerchant ID
└verAN(4)Alphanumeric, up to 4 bytes*Message version
0A1MMessage version
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Order number from the request (bypass)
ORDER20211231100000Order number from the request (bypass)
└trdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction number
STFP_PGHMnx_mid_il00220623130711M1872705Hecto Financial transaction number
└trdDtN(8)Numeric, up to 8 bytes*Request date (YYYYMMDD)
20211231Request date (YYYYMMDD)
└trdTmN(6)Numeric, up to 6 bytes*Request time (HHMMSS)
100000Request time (HHMMSS)
└outStatCdAN(4)Alphanumeric, up to 4 bytes*Lookup API response status (success/failure of the request itself)
0021Lookup API response status (success/failure of the request itself)
0021: Lookup succeeded 0031: Lookup failed*Indicates whether the lookup request itself was processed successfully — not whether the looked-up transaction succeeded. Refer to outRsltCd for the actual status of the transaction.
└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Actual status of the looked-up transaction (result code)
0000Actual status of the looked-up transaction (result code)
0000: Normal transaction (virtual account: deposit success) 0001: Cancelled status (virtual account: refund status) 0009: Payment failed (failed payment record exists)*When outStatCd is success (0021), this reflects the actual status of the looked-up transaction; when it is failure (0031), it returns the error code for the failed lookup instead.
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Result message
Normal transactionResult message
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*Hash value from the request returned as-is
f395b6725a9a18...Hash value from the request returned as-is
└methodA(2)Alphabetic, up to 2 bytes*Payment method code (2 characters)
VAPayment method code (2 characters)
└trdAmtN(12)Numeric, up to 12 bytes*Transaction amount
1000Transaction amount
└cnclAmtN(12)Numeric, up to 12 bytesCancellation amount (0 if no cancellation exists)
1000Cancellation amount (0 if no cancellation exists)
Request Example
{
"params": {
"mchtId": "nx_mid_il",
"ver": "0A1M",
"mchtTrdNo": "PG_vbank_20210806075154649",
"trdDt": "20210806",
"trdTm": "080101"
},
"data": {
"pktHash": "996E651D9435700D54E0D69B5726B5489AD0691C3FC86BE572314D39A2AE8B6D",
"method": "VA",
"trdAmt": "500",
"orgTrdDt": "20210806",
"orgMchtTrdNo": "PG_vbank_20210806075154648",
"orgTrdNo": "STFP_PGVAnx_mid_il00210806075210M1853381"
}
}
Payment Method Codes
| Code | Payment Method |
|---|---|
| BG | Book Gift Card |
| CG | Cultureland Gift Card (CultureCash) |
| TC | Teencash |
| CP | Point Damoaa |
| WL | White Label |
| CA | Credit Card |
| MP | Mobile Payment |
| RA | Bank Transfer |
| VA | Virtual Account |
| TM | T-Money |
| SG | Smart Munhwa Gift Card |
| KP | KakaoPay |
| NP | NaverPay |
| PC | Payco |
| TS | TossPay |
Need technical support?
Code Samples
HectoFinancial GitHub