Spend Void API

Voids a prepaid spend (payment) transaction.


API Information

POST/v1/wallet/use/cancel
Content-Typeapplication/json
테스트https://tb-mps-api.hectofinancial.co.kr/v1/wallet/use/cancel
운영https://mps-api.hectofinancial.co.kr/v1/wallet/use/cancel

Request Parameters

타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자
예: AN(10) = 영문+숫자, 최대 10byte
custNoAN(20)Alphanumeric, up to 20 bytes*
Prepaid member number.
*Unique prepaid member number assigned by Hecto Financial.
mTrdNoAN(50)Alphanumeric, up to 50 bytes*
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.
*Hecto Financial transaction approval number of the transaction to be voided.
orgTrdDtAN(8)Alphanumeric, up to 8 bytes*
Original transaction date.
*Date of the transaction to be voided. yyyyMMdd format.
mnyBlcN(7)Numeric, up to 7 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Money balance.
*AES-256/ECB/PKCS5Padding encryption required.
pntBlcN(7)Numeric, up to 7 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Points balance.
*AES-256/ECB/PKCS5Padding encryption required.
cnclMnyAmtN(7)Numeric, up to 7 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Void Money amount.
*Money amount to be voided. AES-256/ECB/PKCS5Padding encryption required.
cnclPntAmtN(7)Numeric, up to 7 bytes*AES-256AES-256/ECB/PKCS5Padding + Base64
Void Points amount.
*Points amount to be voided. AES-256/ECB/PKCS5Padding encryption required.
trdSumryAN(50)Alphanumeric, up to 50 bytes
Transaction summary.
*Reason for the spend void.
mResrvField1AN(255)Alphanumeric, up to 255 bytes
Merchant reserve field 1.
*Transmitted in plaintext. Do not include sensitive personal information.
mResrvField2AN(255)Alphanumeric, up to 255 bytes
Merchant reserve field 2.
*Transmitted in plaintext. Do not include sensitive personal information.
mResrvField3AN(255)Alphanumeric, up to 255 bytes
Merchant reserve field 3.
*Transmitted in plaintext. Do not include sensitive personal information.
pktHashAN(200)Alphanumeric, up to 200 bytes*SHA-256(실시간 생성)
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*0000
Result code.
0000: Success Other: Failure
rsltMsgAN(255)Alphanumeric, up to 255 bytes*Success
Result message.

rsltObj (Response Object)

custNoAN(20)Alphanumeric, up to 20 bytes*2400001605
Prepaid member number.
mtrdNoAN(50)Alphanumeric, up to 50 bytes*ORDER20240716
Merchant transaction reference number.
*No Korean characters.
trdNoAN(50)Alphanumeric, up to 50 bytes*24071616270200002193
Transaction approval number.
*Unique transaction number assigned by Hecto Financial.
mnyBlcN(7)Numeric, up to 7 bytes*11000
Money balance.
*Money balance after the void.
pntBlcN(7)Numeric, up to 7 bytes*1000
Points balance.
*Points balance after the void.
waitMnyBlcN(7)Numeric, up to 7 bytes*1000
Pending Money balance.
*Populated when pending Money is generated due to a spend void.
trdDtAN(8)Alphanumeric, up to 8 bytes*20240718
Transaction date.
*Void transaction date. yyyyMMdd format.
trdTmAN(6)Alphanumeric, up to 6 bytes*190801
Transaction time.
*Void transaction time. HHmmss format.
expPntAmtN(7)Numeric, up to 7 bytes*1000
Expired Points amount.
*If the expiry date of the voided Points has passed after the spend void, the Points will have expired.
expTrdDtAN(8)Alphanumeric, up to 8 bytes20240718
Expiry date.
*Date on which Points were expired. yyyyMMdd format.
expTrdTmAN(6)Alphanumeric, up to 6 bytes190801
Expiry time.
*Time at which Points were expired. HHmmss format.
pktHashAN(200)Alphanumeric, up to 200 bytes*
SHA-256 hash value.
*Signature composition: prepaid member number + merchant ID + merchant transaction reference number + transaction approval number + hash key.

Request Example

{
  "custNo": "2400001605",
  "mTrdNo": "ORDER20240716",
  "orgTrdNo": "24071516270200002193",
  "orgTrdDt": "20240715",
  "mnyBlc": "AES-encrypted balance",
  "pntBlc": "AES-encrypted balance",
  "cnclMnyAmt": "AES-encrypted amount",
  "cnclPntAmt": "AES-encrypted amount",
  "trdSumry": "Customer changed mind",
  "pktHash": "hash value"
}

Response Examples

Success

{
  "rsltCd": "0000",
  "rsltMsg": "Success",
  "rsltObj": {
    "custNo": "2400001605",
    "mtrdNo": "ORDER20240716",
    "trdNo": "24071616270200002193",
    "mnyBlc": "11000",
    "pntBlc": "1000",
    "waitMnyBlc": "0",
    "trdDt": "20240718",
    "trdTm": "190801",
    "expPntAmt": "0",
    "pktHash": "f395b6725a9a18f2563ce34f8bc76698051d27c05de5ba815f463f00429061c"
  }
}

Failure (Void Not Possible)

{
  "rsltCd": "T-011",
  "rsltMsg": "This transaction has already been voided."
}

Important Notes

  • Partial void is available.
  • The void amount cannot exceed the original transaction amount.
  • A transaction that has already been fully voided cannot be voided again.
  • A spend void may generate pending Money. Check the waitMnyBlc field.
  • If the Points expiry date has passed at the time of void, the Points may be expired.
💬

Need technical support?