Top-up Void API
Voids a completed Money top-up or Points issuance transaction.
API Information
POST/v1/approval/charge/cancel
Content-Type
application/json테스트
https://tb-mps-api.hectofinancial.co.kr/v1/approval/charge/cancel운영
https://mps-api.hectofinancial.co.kr/v1/approval/charge/cancelVoid Types
| Division Code | Type | Description |
|---|---|---|
| MC | Money top-up void | Voids a Money top-up transaction (partial void not available) |
| PC | Points issuance void | Voids a Points issuance transaction (partial void available) |
Request Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
└custNoAN(20)Alphanumeric, up to 20 bytes*Prepaid member number.
Prepaid member number.
*Unique prepaid member number assigned by Hecto Financial.
└mTrdNoAN(50)Alphanumeric, up to 50 bytes*Merchant transaction reference number.
Merchant transaction reference number.
*Transaction reference number generated by the merchant (no Korean characters).
└orgTrdNoAN(50)Alphanumeric, up to 50 bytes*Original transaction approval number.
Original transaction approval number.
*Original transaction approval number issued by Hecto Financial.
└orgTrdDtAN(8)Alphanumeric, up to 8 bytes*Original transaction date.
Original transaction date.
*yyyyMMdd format.
└divCdAN(2)Alphanumeric, up to 2 bytes*Division code.
Division code.
MC: Money top-up void PC: Points issuance void└blcAmtAN(7)Alphanumeric, up to 7 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64Current balance.Current balance.
*Money or Points balance. AES-256/ECB/PKCS5Padding encryption required. For Money void, provide the Money balance.
└reqDtAN(8)Alphanumeric, up to 8 bytesRequest date.
Request date.
*yyyyMMdd format. If omitted, the server date is used automatically.
└reqTmAN(6)Alphanumeric, up to 6 bytesRequest time.
Request time.
*HHmmss format. If omitted, the server time is used automatically.
└trdSumryAN(50)Alphanumeric, up to 50 bytesTransaction summary.
Transaction summary.
*Reason for the top-up void.
└mResrvField1AN(255)Alphanumeric, up to 255 bytesMerchant reserve field 1.
Merchant reserve field 1.
*Transmitted in plaintext. Do not include sensitive personal information.
└mResrvField2AN(255)Alphanumeric, up to 255 bytesMerchant reserve field 2.
Merchant reserve field 2.
*Transmitted in plaintext. Do not include sensitive personal information.
└mResrvField3AN(255)Alphanumeric, up to 255 bytesMerchant reserve field 3.
Merchant reserve field 3.
*Transmitted in plaintext. Do not include sensitive personal information.
└cnclAmtAN(7)Alphanumeric, up to 7 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Void request amount.Void request amount.
*Used only for partial void of a Points issuance transaction. AES-256/ECB/PKCS5Padding encryption required. If omitted, the full amount is voided.
└pktHashAN(200)Alphanumeric, up to 200 bytes*
SHA-256SHA-256 hash value.(실시간 생성)SHA-256 hash value.
*Signature composition: prepaid member number + merchant ID + merchant transaction reference number + original transaction approval number + original transaction date + hash key.
Response Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
└rsltCdAN(4)Alphanumeric, up to 4 bytes*Result code.
0000Result code.
0000: Success Other: Failure└rsltMsgAN(255)Alphanumeric, up to 255 bytes*Result message.
SuccessResult message.
rsltObj (Response Object)
└custNoAN(20)Alphanumeric, up to 20 bytes*Prepaid member number.
2400001605Prepaid member number.
└mtrdNoAN(50)Alphanumeric, up to 50 bytes*Merchant transaction reference number.
ORDER20240716Merchant transaction reference number.
*No Korean characters.
└trdNoAN(50)Alphanumeric, up to 50 bytes*Transaction approval number.
24071616270200002193Transaction approval number.
*Transaction approval number issued by Hecto Financial.
└trdAmtN(7)Numeric, up to 7 bytes*Transaction amount.
10000Transaction amount.
└custBdnFeeAmtN(7)Numeric, up to 7 bytes*Customer-borne fee amount.
0Customer-borne fee amount.
└mnyBlcN(7)Numeric, up to 7 bytes*Money balance.
15000Money balance.
*Money balance after the transaction.
└pntBlcAN(7)Alphanumeric, up to 7 bytes*Points balance.
0Points balance.
*Points balance after the transaction.
└trdDtAN(8)Alphanumeric, up to 8 bytes*Transaction date.
20241212Transaction date.
*yyyyMMdd format.
└trdTmAN(6)Alphanumeric, up to 6 bytes*Transaction time.
192035Transaction time.
*HHmmss format.
└pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256 hash value.
SHA-256 hash value.
*Signature composition: prepaid member number + merchant ID + merchant transaction reference number + Hecto Financial transaction approval number + transaction amount + hash key.
Request Examples
Money Top-up Void (Full Void)
{
"custNo": "2400001605",
"mTrdNo": "ORDER20240716",
"orgTrdNo": "24071616270200002193",
"orgTrdDt": "20241010",
"divCd": "MC",
"blcAmt": "AES-encrypted balance",
"trdSumry": "Customer changed mind",
"pktHash": "hash value"
}
Points Issuance Partial Void
{
"custNo": "2400001605",
"mTrdNo": "ORDER20240716",
"orgTrdNo": "24071616270200002193",
"orgTrdDt": "20241010",
"divCd": "PC",
"blcAmt": "AES-encrypted balance",
"cnclAmt": "AES-encrypted void amount",
"trdSumry": "Partial void",
"pktHash": "hash value"
}
Response Examples
Success
{
"rsltCd": "0000",
"rsltMsg": "Success",
"rsltObj": {
"custNo": "2400001605",
"mtrdNo": "ORDER20240716",
"trdNo": "24071616270200002193",
"trdAmt": "10000",
"custBdnFeeAmt": "0",
"mnyBlc": "15000",
"pntBlc": "0",
"trdDt": "20241212",
"trdTm": "192035",
"pktHash": "f395b6725a9a18f2563ce34f8bc76698051d27c05de5ba815f463f00429061c"
}
}
Failure (Insufficient Balance)
{
"rsltCd": "2002",
"rsltMsg": "Insufficient balance available for void."
}
Important Notes
Partial Void Restriction
Money top-up transactions cannot be partially voided. Partial void is only available for Points issuance transactions.
- The balance must be sufficient when voiding a top-up.
- Amounts that have already been spent cannot be voided.
- Money top-ups can only be fully voided.
- Points issuances can be partially voided.
- If
cnclAmtis not provided, the full amount is voided.
Need technical support?
Code Samples
HectoFinancial GitHub