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-Typeapplication/json
테스트https://tbgw.settlebank.co.kr/spay/APITrdcheck.do
운영https://gw.settlebank.co.kr/spay/APITrdcheck.do

Notes

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
nx_mid_il: Virtual account test
verAN(4)Alphanumeric, up to 4 bytes*
Message version
*Fixed value
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Unique order number generated by the merchant
trdDtN(8)Numeric, up to 8 bytes*
Request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*
Request time (HHMMSS)

data Object

pktHashAN(64)Alphanumeric, up to 64 bytes*SHA-256(실시간 생성)
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)
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)
orgTrdDtN(8)Numeric, up to 8 bytes*
Original transaction request date (YYYYMMDD)
orgMchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Merchant order number of the original transaction
orgTrdNoAN(40)Alphanumeric, up to 40 bytes
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*nx_mid_il
Merchant ID
verAN(4)Alphanumeric, up to 4 bytes*0A1M
Message version
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*ORDER20211231100000
Order number from the request (bypass)
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGHMnx_mid_il00220623130711M1872705
Hecto Financial transaction number
trdDtN(8)Numeric, up to 8 bytes*20211231
Request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*100000
Request time (HHMMSS)
outStatCdAN(4)Alphanumeric, up to 4 bytes*0021
Lookup 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*0000
Actual 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*Normal transaction
Result message

data Object

pktHashAN(64)Alphanumeric, up to 64 bytes*f395b6725a9a18...
Hash value from the request returned as-is
methodA(2)Alphabetic, up to 2 bytes*VA
Payment method code (2 characters)
trdAmtN(12)Numeric, up to 12 bytes*1000
Transaction amount
cnclAmtN(12)Numeric, up to 12 bytes1000
Cancellation 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

CodePayment Method
BGBook Gift Card
CGCultureland Gift Card (CultureCash)
TCTeencash
CPPoint Damoaa
WLWhite Label
CACredit Card
MPMobile Payment
RABank Transfer
VAVirtual Account
TMT-Money
SGSmart Munhwa Gift Card
KPKakaoPay
NPNaverPay
PCPayco
TSTossPay
💬

Need technical support?