Refund Mobile Payment API
This API requests a refund when cancellation is no longer possible because the cancellable period (current month) has passed.
Test Key Information
API Information
POST/spay/APIRefund.do
Content-Type
application/json테스트
https://tbgw.settlebank.co.kr/spay/APIRefund.do운영
https://gw.settlebank.co.kr/spay/APIRefund.doImportant Notes
NOTE
Service Registration Required
To use the Mobile Payment Refund service, prior service registration is required. Please contact your Hecto Financial sales representative to apply for the refund service.
Mobile Payment Refund Important Notes
Refunds are available from the month following the payment. The refund amount is transferred to the customer's bank account.
- Current month: Use the Cancel API
- Following month onwards: Use the Refund API (e.g., a payment approved on 2023-06-30 requires the Refund API from 2023-07-01)
- The customer's refund bank account information is required for processing.
- Partial refund: Increment the cancellation sequence (
cnclOrd) sequentially for each request.
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
Unique merchant ID assigned by Hecto Financial
nxhp_sb_il: Mobile Payment sandbox└verAN(4)Alphanumeric, up to 4 bytes*Message version
Message version
*Fixed value
└methodA(2)Alphabetic, up to 2 bytes*Payment method
Payment method
*Fixed value (MP: Mobile Payment)
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code
Business type code
*Fixed value (C1: Refund)
└encCdN(2)Numeric, up to 2 bytes*Encryption type code
Encryption type code
*Fixed value
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Unique order number generated by the merchant for the refund request
Unique order number generated by the merchant for the refund request
└trdDtN(8)Numeric, up to 8 bytes*Request date (YYYYMMDD)
Request date (YYYYMMDD)
└trdTmN(6)Numeric, up to 6 bytes*Request time (HHMMSS)
Request time (HHMMSS)
└mobileYnA(1)Alphabetic, up to 1 bytesMobile indicator
Mobile indicator
Y: Mobile web/app N: PC or other└osTypeA(1)Alphabetic, up to 1 bytesOS type
OS type
A: Android I: iOS W: Windows M: Mac E: Otherdata Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*
SHA-256Hash value generated using SHA256(실시간 생성)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
Transaction number issued by Hecto Financial at the time of payment
└crcCdA(3)Alphabetic, up to 3 bytes*Currency code
Currency code
*Fixed value
└cnclOrdN(3)Numeric, up to 3 bytes*Cancellation sequence (starts at 001; use 002 for the 2nd partial refund)
Cancellation sequence (starts at 001; use 002 for the 2nd partial refund)
└cnclAmtN(12)Numeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64Refund amountRefund amount
└taxTypeCdA(1)Alphabetic, up to 1 bytesTax exemption status
Tax exemption status
N: Taxable Y: Tax-exempt G: Mixed taxation└taxAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Taxable amount within the refund amount (required for mixed taxation)Taxable amount within the refund amount (required for mixed taxation)
└vatAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64VAT amount within the refund amount (required for mixed taxation)VAT amount within the refund amount (required for mixed taxation)
└taxFreeAmtN(12)Numeric, up to 12 bytes
AES-256AES-256/ECB/PKCS5Padding + Base64Tax-free amount within the refund amount (required for mixed taxation)Tax-free amount within the refund amount (required for mixed taxation)
└refundBankCdAN(3)Alphanumeric, up to 3 bytes*Bank code for the refund account
Bank code for the refund account
*Refer to financial institution codes
└refundAcntNoN(16)Numeric, up to 16 bytes*
AES-256AES-256/ECB/PKCS5Padding + Base64Refund account numberRefund account number
└refundDpstrNmAHN(50)Alphanumeric + Korean, up to 50 bytes*Account holder name of the refund account
Account holder name of the refund account
└cnclRsnAHN(255)Alphanumeric + Korean, up to 255 bytesRefund reason
Refund reason
Response Parameters
타입 표기법
N숫자A영문H한글AN영문+숫자AHN영문+한글+숫자예: AN(10) = 영문+숫자, 최대 10byte
params Object
└mchtIdAN(10)Alphanumeric, up to 10 bytes*Merchant ID
nxhp_sb_ilMerchant ID
└verAN(4)Alphanumeric, up to 4 bytes*Message version
0A19Message version
└methodA(2)Alphabetic, up to 2 bytes*Payment method
MPPayment method
└bizTypeAN(2)Alphanumeric, up to 2 bytes*Business type code
C1Business type code
└encCdN(2)Numeric, up to 2 bytes*Encryption type code
23Encryption type code
└mchtTrdNoAN(100)Alphanumeric, up to 100 bytes*Order number generated by the merchant for the refund request
REFUND20211231100000Order number generated by the merchant for the refund request
└trdNoAN(40)Alphanumeric, up to 40 bytes*Hecto Financial transaction number
STFP_PGMPnxhp_sb_il0211129135810M1494620Hecto Financial transaction number
└trdDtN(8)Numeric, up to 8 bytes*Request date (YYYYMMDD)
20211231Request date (YYYYMMDD)
└trdTmN(6)Numeric, up to 6 bytes*Request time (HHMMSS)
100000Request time (HHMMSS)
└outStatCdAN(4)Alphanumeric, up to 4 bytes*Transaction status code (success/failure)
0021Transaction status code (success/failure)
0021: Success 0031: Failure└outRsltCdAN(4)Alphanumeric, up to 4 bytes*Result code
0000Result code
└outRsltMsgAHN(200)Alphanumeric + Korean, up to 200 bytes*Result message
Processed successfully.Result message
data Object
└pktHashAN(64)Alphanumeric, up to 64 bytes*Hash value from the request, returned as-is
f395b6725a9a18...Hash value from the request, returned as-is
└orgTrdNoAN(40)Alphanumeric, up to 40 bytes*Transaction number issued by Hecto Financial at the time of payment
STFP_PGMPnxhp_sb_il0211129135810M1494620Transaction number issued by Hecto Financial at the time of payment
└cnclAmtN(12)Numeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5PaddingRefund amount1000Refund amount
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
└blcAmtN(12)Numeric, up to 12 bytes*
AES-256AES-256/ECB/PKCS5PaddingRemaining refundable balance for the transaction number upon successful refund0Remaining refundable balance for the transaction number upon successful refund
*실제 응답값은 AES-256 암호화된 값입니다. 복호화 후 사용하세요.
Need technical support?
Code Samples
HectoFinancial GitHub