Cancel Virtual Account API

An API to cancel an issued virtual account. Used to cancel an issuance before a deposit has been made.

Test Key Information


API Information

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

Important Notes

Issuance Cancel Notice

Issuance cancellation is not possible for virtual accounts where a deposit has already been completed. Cancellation is only possible before a deposit is made.
  • Only virtual accounts without a completed deposit can be cancelled.
  • A cancelled virtual account can no longer be used.
  • The original transaction number and virtual account number must be entered accurately.

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
methodA(2)Alphabetic, up to 2 bytes*
Payment method
*Fixed value (VA: Virtual Account)
bizTypeAN(2)Alphanumeric, up to 2 bytes*
Business type code
*Fixed value (A2: Issuance Cancel)
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 for the issuance cancel
trdDtN(8)Numeric, up to 8 bytes*
Cancel request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*
Cancel 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(64)Alphanumeric, up to 64 bytes*SHA-256(실시간 생성)
Hash value generated using SHA256
NOTE

Hash Generation Combination

trdDt + trdTm + mchtId + mchtTrdNo + "0" + hashKey
orgTrdNoAN(40)Alphanumeric, up to 40 bytes*
Transaction number issued by Hecto Financial at the time of issuance
vAcntNoN(20)Numeric, up to 20 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Previously issued virtual account number

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*VA
Payment method
bizTypeAN(2)Alphanumeric, up to 2 bytes*A2
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*STBK_0123456789
Hecto Financial transaction number
trdDtN(8)Numeric, up to 8 bytes*20211231
Cancel request date (YYYYMMDD)
trdTmN(6)Numeric, up to 6 bytes*120000
Cancel 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...
Returns the hash value from the request as-is
orgTrdNoAN(40)Alphanumeric, up to 40 bytesSTFP_PGVAnx_mid_il00210806075210M1853381
Transaction number issued by Hecto Financial at the time of issuance
acntTypeN(1)Numeric, up to 1 bytes4
Virtual account type
4: 010 Virtual Account null: Others
vAcntNoN(16)Numeric, up to 16 bytes*AES-256AES-256/ECB/PKCS5Padding1234567890
Previously issued virtual account number
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.

Webhook (Hecto Financial → Merchant)

When issuance cancellation is complete, Hecto Financial sends a webhook to your server.

Webhook Parameters

outStatCdN(4)Numeric, up to 4 bytes*0021
Transaction status
0021: Success
trdNoAN(40)Alphanumeric, up to 40 bytes*STFP_PGVAnx_mid_il0211129135810M1494620
Unique transaction number assigned by Hecto Financial
methodA(2)Alphabetic, up to 2 bytes*VA
Payment method
VA: Virtual Account
bizTypeAN(2)Alphanumeric, up to 2 bytes*A2
Business type
A2: Issuance Cancel
mchtIdAN(12)Alphanumeric, up to 12 bytes*nx_mid_il
Merchant ID
mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*ORDER20211231100000
Merchant order number
trdDtmN(14)Numeric, up to 14 bytes*20211231100000
Transaction date and time (YYYYMMDDhhmmss)
orgTrdNoAN(40)Alphanumeric, up to 40 bytesSTFP_PGVAnx_mid_il0211129135810M1494620
Original transaction number
orgTrdDtN(8)Numeric, up to 8 bytes20211231
Original transaction date
pktHashAN(64)Alphanumeric, up to 64 bytes*a2d6d597d55d7c9b...
Hash value (transaction status code + transaction date + transaction time + merchant ID + merchant order number + transaction amount + hash key)

Webhook Response

The merchant sends a response to Hecto Financial.

ResponseDescription
"OK"On success (uppercase)
"FAIL"On failure (uppercase; webhook is resent when responding with FAIL)
OthersRecognized as abnormal failure; webhook is resent up to the configured number of times
💬

Need technical support?