Void / Refund API

Void or refund an approved payment.


Void / Refund

Submit a full or partial void request for an approved payment.

API Information

POST/v1/api/pay/cancel
Content-Typeapplication/json; charset=UTF-8
테스트https://tbnpay.settlebank.co.kr/v1/api/pay/cancel
운영https://npay.settlebank.co.kr/v1/api/pay/cancel

Request Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte
hdInfoAN(50)Alphanumeric, up to 50 bytes*
Message information code.
*Fixed value
mchtIdAN(8)Alphanumeric, up to 8 bytes*
Merchant ID.
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Merchant void order number (not the original order number).
mchtCustIdAN(100)Alphanumeric, up to 100 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64 (Standard)
Customer ID.
mchtTrdDtAN(8)Alphanumeric, up to 8 bytes*
Void order date (yyyyMMdd).
mchtTrdTmAN(6)Alphanumeric, up to 6 bytes*
Void order time (HH24MISS).
trdAmtN(13)Numeric, up to 13 bytes*
Void / refund amount.
trdNoAN(50)Alphanumeric, up to 50 bytes*
Original transaction reference number (issued at the time of payment).
custAcntSumryAN(30)Alphanumeric, up to 30 bytes
Bank statement descriptor (Korean: 3 bytes per character).
splAmtN(13)Numeric, up to 13 bytes
Supply amount (pre-tax amount).
vatN(13)Numeric, up to 13 bytes
Value-added tax amount.
svcAmtN(13)Numeric, up to 13 bytes
Service charge amount.
custIpAN(15)Alphanumeric, up to 15 bytes
Customer IP address.
pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256(실시간 생성)
SHA-256 HMAC signature.
NOTE

Signature composition

mchtId + mchtCustId + mchtTrdDt + mchtTrdTm + trdAmt (plaintext) + trdNo + hashKey

Response Parameters

outStatCdAN(4)Alphanumeric, up to 4 bytes*0021
Transaction status code.
0021: Success 0031: Failure
outRsltCdAN(4)Alphanumeric, up to 4 bytes*0000
Decline code.
outRsltMsgAN(300)Alphanumeric, up to 300 bytes*Processed successfully.
Result message.
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*OID201902210001
Void order number.
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_FIRM12345678901234567890
Void transaction reference number.
trdAmtN(13)Numeric, up to 13 bytes*1000
Refunded amount.
💬

Need technical support?