T-money Webhook

When a transaction is successfully completed, Hecto Financial sends a webhook to your server. For details, see the Webhook URL guide.

NOTE

What is notiUrl?

notiUrl is a server-to-server webhook endpoint that receives payment results directly from the Hecto Financial server. It does not go through the browser, allowing stable receipt of results.

Communication Specification

ItemDescription
MethodPOST
Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8
Response FormatPlain Text (OK or FAIL)

Cancellation Webhook Notice

Cancellation webhooks are not provided by default

T-money payment cancellation results are confirmed via API response, so cancellation webhooks are not sent by default. If you need cancellation webhooks, contact your sales representative or technical support (pgsupport@hecto.co.kr).

Webhook Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte
outStatCdAN(4)Alphanumeric, up to 4 bytes*0021
Transaction status
0021: Success
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGCAnx_mid_il0211129135810M1494620
Unique transaction number assigned by Hecto Financial
methodA(2)Alphabetic, up to 2 bytes*TM
Payment method
TM: T-money
bizTypeAN(2)Alphanumeric, up to 2 bytes*B0
Business type
B0: Payment C0: Cancellation
mchtIdAN(10)Alphanumeric, up to 10 bytes*nx_mid_il
Merchant ID assigned by Hecto Financial
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*TMONEY20211231100000
Unique order number generated by the merchant
mchtCustNmAHN(30)Alphanumeric + Korean, up to 30 bytesHong Gil-dong
Actual payer name
mchtNameAHN(20)Alphanumeric + Korean, up to 20 bytesHecto Financial
Actual seller name. If not provided at transaction request, the merchant name registered with Hecto Financial is used.
pmtprdNmAHN(128)Alphanumeric + Korean, up to 128 bytesTest Product
Product name ordered by the customer
trdDtmN(14)Numeric, up to 14 bytes*20211231100000
Transaction datetime. For approvals: approval datetime. For cancellations: cancellation datetime. Format: YYYYMMDDhhmmss
trdAmtN(12)Numeric, up to 12 bytes1000
Transaction amount
emailAN(60)Alphanumeric, up to 60 bytesHongGilDong@example.com
Merchant customer email
mchtCustIdAN(50)Alphanumeric, up to 50 bytesHongGilDong
Merchant customer ID
csrcIssNoAN(9)Alphanumeric, up to 9 bytes0123456789
Cash receipt approval number
mchtParamAHN(4000)Alphanumeric + Korean, up to 4000 bytesname=HongGilDong&age=25
Additional merchant information field. The value passed in the request is returned as-is.
pktHashAN(64)Alphanumeric, up to 64 bytes*a2d6d597d55d7c9b689baa2e08c1ddf0ce71f4248c5b9b59fe61bfbf949543e1
SHA256 hash value
NOTE

Hash Generation Combination

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

Webhook Response (Your Server → Hecto Financial)

Your server sends a response to Hecto Financial.

ResponseDescription
OKSuccess (uppercase). Processed as webhook received.
FAIL or othersRecognized as failure; resent up to the configured number of times per merchant. Sending stops after exceeding the resend deadline.

Response format note

The response must be plain text 'OK' only. If spaces or other characters are included, it will be considered a failure and resending will occur.

Hash Verification

Hash verification required

To check for data tampering, you must verify the hash data received via notiUrl. Only provide the service when the hash matches.
ItemCombination Fields
pktHashTransaction status code + transaction date + transaction time + merchant ID + merchant order number + transaction amount + hash key

Webhook Example

Payment Webhook (Hecto Financial → Your Server)

POST /your-noti-url HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=UTF-8

outStatCd=0021
&trdNo=STFP_PGTMnx_mid_il0211231100000M1234567
&method=TM
&bizType=B0
&mchtId=nx_mid_il
&mchtTrdNo=TMONEY20211231100000
&mchtCustNm=HongGilDong
&mchtName=HectoFinancial
&pmtprdNm=TestProduct
&trdDtm=20211231100000
&trdAmt=10000
&email=test@example.com
&mchtCustId=customer123
&mchtParam=
&pktHash=a2d6d597d55d7c9b689baa2e08c1ddf0ce71f4248c5b9b59fe61bfbf949543e1

Response (Your Server → Hecto Financial)

OK
💬

Need technical support?