Refund
To refund a customer for a previously successful checkout the refund enpoint can be called.
URL#
POST https://sandbox.payjustnow.com/api/v1/merchant/refundFull refund request#
{ "merchant_reference": "4456", "token": "683b38b558628acbb4aa137d4cfdd337", "type": "full", "amount": 50000, "reason": "test"}Partial refund request#
{ "merchant_reference": "4456", "token": "683b38b558628acbb4aa137d4cfdd337", "type": "partial", "amount": 10000, "reason": "test"}Response#
{ "status": "REFUNDED", "reason": "Order successfully refunded", "refunded_at": "2022-02-08T09:03:56.292949Z", "amount_refunded": 50000}If refund has already been issued and a another request is sent for the same order the API will respond with the following error:
{ "status": "FAILED", "reason": { "errors": { "code": 400, "message": "Amount is greater than available amount refundable." } }}