Connect to the refunds API to trigger both partial and full refunds.

Refund Request


curl -X POST
-H 'content-type:application/json'
-H ''apiKey:<YOURPAY_API_KEY>''
-H ''secret:<YOURPAY_API_SECRET>''
-d '{
  • transaction_receipt is the value which you received in the callback at the time of order payment processing
  • amounttotal is the refund amount sent in cents (as an integer)

Refund Success

If refund successfully processed , you get a 201 and look for the status : 'APPROVED' , type = refunds

Refund Success Example

  "referenceid": "46039e80-4bcb-11ed-be45-755c2a328d59",
  "approved": 1

Refund Failure

If refund not processed , you get a 400 error

Refund Failure Example

  "referenceid": "cb67322e-d6b0-4a7e-bbda-17707976bff1",
  "approved": 0,
  "errorcode": "REFUND_UNSUCCESSFUL",
  "errormessage": "Refund is not successful!"