Cancel Bank Transfer API

This API processes full or partial cancellation of a bank transfer payment transaction.

Test Key Information


API Information

POST/spay/APICancel.do
Content-Typeapplication/json
테스트https://tbgw.settlebank.co.kr/spay/APICancel.do
운영https://gw.settlebank.co.kr/spay/APICancel.do

Important Notes

Bank Transfer Cancellation Important Notes

Bank transfer cancellation is divided into same-day cancellation and next-day-or-later refund. From the day after payment, a separate refund process is required.
  • Same-day cancellation: Cancellation is available on the day of payment. Note that only full cancellation is available on the same day.
  • Next-day-or-later refund: From the day after payment, a refund process is required and is handled on a business day basis.
  • Partial cancellation: Available only for next-day-or-later refunds. Request by incrementing the cancellation sequence (cnclOrd) sequentially.
  • The bank statement description for payment cancellation varies depending on bank policy.

Request Parameters

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

params Object

mchtIdAN(12)Alphanumeric, up to 12 bytes*
Unique merchant ID assigned by Hecto Financial
nx_mid_il: Bank Transfer Test
verAN(4)Alphanumeric, up to 4 bytes*
Message version
*Fixed value
methodA(2)Alphabetic, up to 2 bytes*
Payment method
*Fixed value (RA: Bank Transfer)
bizTypeAN(2)Alphanumeric, up to 2 bytes*
Business type code
*Fixed value (C0: Cancellation)
encCdN(2)Numeric, up to 2 bytes*
Encryption type code
*Fixed value
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*
Unique order number generated by the merchant
trdDtN(8)Numeric, up to 8 bytes*
Cancellation request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*
Cancellation request time (HHMMSS)
mobileYnA(1)Alphabetic, up to 1 bytes
Mobile indicator
Y: Mobile web/app N: PC or other
osTypeA(1)Alphabetic, up to 1 bytes
OS type
A: Android I: iOS W: Windows M: Mac E: Other

data Object

pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256(실시간 생성)
Hash value generated using SHA256
NOTE

Hash Generation Combination

trdDt + trdTm + mchtId + mchtTrdNo + cnclAmt (plaintext) + hashKey
orgTrdNoAN(40)Alphanumeric, up to 40 bytes*
Transaction number issued by Hecto Financial at the time of payment
crcCdA(3)Alphabetic, up to 3 bytes*
Currency code
*Fixed value
cnclOrdN(3)Numeric, up to 3 bytes*
Cancellation sequence (starts from 001; use 002 for the second partial cancellation)
cnclAmtN(12)Numeric, up to 12 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Cancellation amount
taxTypeCdA(1)Alphabetic, up to 1 bytes
Tax exemption status
N: Taxable Y: Tax-exempt G: Mixed tax
taxAmtN(12)Numeric, up to 12 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
Taxable amount in the cancellation amount (required for mixed tax)
vatAmtN(12)Numeric, up to 12 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
VAT amount in the cancellation amount (required for mixed tax)
taxFreeAmtN(12)Numeric, up to 12 bytesAES-256AES-256/ECB/PKCS5Padding + Base64
Tax-exempt amount in the cancellation amount (required for mixed tax)
cnclRsnAHN(255)Alphanumeric + Korean, up to 255 bytes
Cancellation reason

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*0A19
Message version
methodA(2)Alphabetic, up to 2 bytes*RA
Payment method
bizTypeAN(2)Alphanumeric, up to 2 bytes*C0
Business type code
encCdN(2)Numeric, up to 2 bytes*23
Encryption type code
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*ORDER20211231100000
Merchant order number
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGRAnxra_jt_il0211129135810M1494620
Hecto Financial transaction number
trdDtN(8)Numeric, up to 8 bytes*20211231
Cancellation request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*100000
Cancellation request time (HHMMSS)
outStatCdAN(4)Alphanumeric, up to 4 bytes*0021
Transaction status code (success/failure)
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

data Object

pktHashAN(64)Alphanumeric, up to 64 bytes*f395b6725a9a18...
Hash value from the request returned as-is
orgTrdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGRAnxra_jt_il0211129135810M1494620
Transaction number issued by Hecto Financial at the time of payment
cnclAmtN(12)Numeric, up to 12 bytes*AES-256AES-256/ECB/PKCS5Padding1000
Cancellation amount
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
blcAmtN(12)Numeric, up to 12 bytes*AES-256AES-256/ECB/PKCS5Padding0
Remaining cancellable balance based on transaction number after successful cancellation
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
💬

Need technical support?