T-money Payment (Checkout Method)

The T-money checkout method allows customers to pay using the T-money balance they hold.

Test Key Information


API Information

POST/tmoney/main.do
Content-Typeapplication/x-www-form-urlencoded
테스트https://tbnpg.settlebank.co.kr/tmoney/main.do
운영https://npg.settlebank.co.kr/tmoney/main.do
NOTE

T-money Payment Features

T-money is a transit card-based electronic money. Unlike other gift cards, it supports the tax-free amount (taxFreeAmt) parameter.

Important Notes

T-money Payment Important Notes

If the T-money balance is less than the payment amount, the payment will not proceed.
  • Payment is only possible within the T-money balance.
  • Partial cancellation may not be available.
  • A tax-free amount (e.g., cup deposit) can be specified separately.

Request Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte

Required Parameters

└mchtIdAN(10)Alphanumeric, up to 10 bytes*
Unique merchant ID assigned by Hecto Financial
nx_mid_il: T-money
└methodAN(20)Alphanumeric, up to 20 bytes*
Payment type code
tmoney: T-money
└trdDtN(8)Numeric, up to 8 bytes*
Request date (yyyyMMdd)
└trdTmN(6)Numeric, up to 6 bytes*
Request time (HH24MISS)
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Unique order number generated by the merchant (no Korean characters)
└mchtNameAHN(100)Alphanumeric + Korean, up to 100 bytes*
Merchant name (Korean)
└mchtENameAN(100)Alphanumeric, up to 100 bytes*
Merchant name (English)
└pmtPrdtNmAHN(50)Alphanumeric + Korean, up to 50 bytes*
Payment product name
└trdAmtN(12)Numeric, up to 12 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Transaction amount
*If a cup deposit exists, set the transaction amount + cup deposit value.
└notiUrlAN(250)Alphanumeric, up to 250 bytes*
Webhook endpoint URL to receive payment results (server-to-server)
└nextUrlAN(250)Alphanumeric, up to 250 bytes*
URL to redirect to the payment result screen
*Redirected when a button inside the checkout is clicked. Check outStatCd to confirm payment success (0021) or failure (0031).
└cancUrlAN(250)Alphanumeric, up to 250 bytes*
URL to redirect when the customer clicks the X button in the checkout
*Browser close and back navigation are not detected.
└pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256(실시간 생성)
Hash value generated using SHA256
NOTE

Hash Generation Combination

mchtId + method + mchtTrdNo + trdDt + trdTm + trdAmt (plaintext) + hashKey

Optional Parameters

└taxFreeAmtN(12)Numeric, up to 12 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
Tax-free amount within the payment amount (cup deposit: 300 KRW)
*This tax-free amount field is only available for T-money payment.
└mchtCustNmAHN(30)Alphanumeric + Korean, up to 30 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
Customer name
└mchtCustIdAN(50)Alphanumeric, up to 50 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
Merchant customer ID
└custIpAN(15)Alphanumeric, up to 15 bytes
Customer IP address
└mchtParamAHN(4000)Alphanumeric + Korean, up to 4000 bytes
Merchant reserved field (returned as-is when results are delivered)
└prdtTermN(14)Numeric, up to 14 bytes
Product provision period (yyyyMMddHHmmss; if empty, displayed as a regular payment)

Response Parameters

Upon payment completion or failure, a redirect to nextUrl occurs; when the customer clicks the X button inside the checkout, a redirect to cancUrl occurs, and the following parameters are passed. Browser close and back navigation are not detected.

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte

Common Response

└mchtIdAN(10)Alphanumeric, up to 10 bytes*nx_mid_il
Merchant ID
└outStatCdAN(4)Alphanumeric, up to 4 bytes*0021
Transaction status code
0021: Success 0031: Failure
└outRsltCdAN(4)Alphanumeric, up to 4 bytes*0000
Result code
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Processed successfully.
Result message
└methodAN(20)Alphanumeric, up to 20 bytes*tmoney
Payment method
tmoney: T-money
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*TMONEY20211231100000
Merchant order number
└trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGCAnx_mid_il0211129135810M1494620
Hecto Financial transaction number
└trdAmtN(12)Numeric, up to 12 bytes*AES-256AES-256/ECB/PKCS5Padding1000
Transaction amount
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
└mchtCustIdAN(100)Alphanumeric, up to 100 bytesAES-256AES-256/ECB/PKCS5Paddingcustomer123
Merchant customer ID
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
└mchtParamAHN(4000)Alphanumeric + Korean, up to 4000 bytesname=HongGilDong&age=25
Merchant reserved field (the value received in the request is returned as-is)
└authDtN(14)Numeric, up to 14 bytes20211231100000
Approval datetime

Webhook (Payment Result)

After payment is completed, Hecto Financial sends a webhook to your server.

NOTE

Webhook Reference

For webhook parameters and processing methods for T-money payment results, see the Webhook document.
💬

Need technical support?

무엇이든 물어보세요