Refund API
You can use the Refund API to issue full or partial refunds within 30 days after the transaction was created. ABA PAY and KHQR refunds is immediate, while Card, WeChat, and Alipay refunds follow your agreement with PayWay. This API works both for instore transaction and online transaction.
- Eligible Transactions: Only transactions with a status of COMPLETED can be refunded.
- Time Frame: Refunds must be requested within 30 days of the payment created date.
- Pending Settlements: Refunds can be issued even if the settlement is still pending (Alipay, WeChat, Card).
- Partial Refunds: Multiple partial refunds can be issued until the total amount paid is refunded.
- Rate limit: Request limit 500 reqeusts/second.
- Refund Enablement: The outlet/terminal must have the refund feature enabled to allow refunds.
Request
Example: application/json
Body Params application/json
Request date and time in UTC format as YYYYMMDDHHmmss.
A unique merchant key which provided by ABA Bank.
The JSON-encoded object containing mc_id, tran_id, and refund_amount using RSA public key encryption in chunks. The encrypted data is then concatenated and encoded in Base64 format.
mc_id string mandatory
A unique merchant key which provided by ABA Bank. Same value as merchant_id
tran_id string mandatory
Purcahse transaction id to refund.
refund_amount decimal mandatory
Amount to refund back to payer.
PHP Sample Code
Base64 encode of hash hmac sha512 encryption of concatenates values request_time, merchant_id and merchant_auth with public_key.
PHP Sample Code
Example