With the refund API you can issue a refund to customer. The payment is immediately refunded to the payment method associated with Transaction.
There are 2 types of refunds, you can perform full refund or a partial refund.
Testing url:
https://checkout-sandbox.payway.com.kh/api/merchant-portal/merchant-access/online-transaction/refund
Production url:
https://checkout.payway.com.kh/api/merchant-portal/merchant-access/online-transaction/refund
Method: POST
# | Field name | Data type | Remark | Example |
---|---|---|---|---|
1 |
request_time
mandatory | Timestamp [UTC] | Format YYYYmmddHis | 20210123234559 |
2 |
merchant_id
mandatory | String [20] | Merchant id provided by PayWay integration teams | onlinesshop24 |
3 |
merchant_auth
mandatory | Text | {"mc_id":"ec000002","tran_id":"00002894", "refund_amount":"0.01"} RSA.PUBLIC(merchant_id, tran_id, refund_amount) (Encrypt using the public key) | 884113079983ac7b7d18f69bd11ec72c3e460be35f2a32650b607ad6e9 |
4 |
hash
mandatory | Text | Encrypted with Api Keys sha512(request_time + merchant_id + merchant_auth)API_Keys | 3nd/2Z4g45Paoqx06QA3UQeHRC2Ts37zjudG7DqyyU2FMYqwtEsXkaEmNOSiFh6Y+IHRdwnA2WA/M/Qg== |
Note:
Please calculate merchant_auth
{
"request_time":"20210922050705",
"merchant_id":"ec000002",
"merchant_auth":"9aaa43e6929a75208cdb29ab498d9604600101d8dc00-20201019130940"
"hash":"EVDFA2118UD0boKhkAcObrmRIU263x3pwIltgxEI6JfhLmpE/X+5KIGNiG8tIQU64pOtvtfbMa2b5q9CCt+sWw=="
}
{
"grand_total":"1.5",
"total_refunded":"0.09"
"currency":"USD"
"transaction_status": "REFUNDED",
"status": {
"code": "00",
"message": "Success!"
}
}
# | Field name | Data type | Remark | Example |
---|---|---|---|---|
1 | grand_total | Double | ||
2 | total_refunded | Double | ||
3 | currency | String | ||
4 | transaction_status | String | ||
5 | status | Array | ||
5.5 | code | String | ||
5.5 | message | String |