Refund transaction API is used to raise the refund transaction with PG. It supports partial as well as full refund. While doing create transaction, refund configurations need to be provided i.e. PARTIAL or FULL. In case of full refund, no duplicate refund transaction request will be allowed unless previously created refund transaction has failed. Generally, post settlement of the transaction, this API can be used to request for refund of partial amount or full amount. In case of AUTH-CAPTURE transaction, total amount that can be refunded should be equal to less than total captured amount.
Transaction Idempotency
If appUtr is present in the API request, then the refund transaction will be made idempotent. If another refund transaction is requested with the duplicate appUtr, then API will reject the refund transaction.
HTTP Status and Response Status Matrix
HTTP Status | Response Status | Response Message |
---|---|---|
200 | REFUNDED | Success |
200 | ALREADY_REFUNDED | We see a refund has already been processed. |
200 | CREATED/PROCESSING | Refund transaction is created with processor and a response is awaited |
200 | PROCESSING | Refund transaction is created with processor and is in processing state at gateway |
400 | VALIDATION_ERROR | In case of VALIDATION_ERROR, field specific validation details will be returned. |
400 | REJECTED | No transaction found to refund. Please provide valid transactionUtr |
400 | REJECTED | Refund transaction not allowed as original transaction still not processed or already refunded |
400 | REJECTED | App UTR provided is already used |
400 | REJECTED | Refund transaction not allowed for invalid refund config |
400 | REJECTED | Refund transaction window expired |
400 | ERROR_FROM_PG | This will be populated by processor |
404 | ERROR_FROM_PG | This will be populated by processor |
404 | TRANSACTION_NOT_FOUND | This will be populated by processor |
500 | ERROR_FROM_PG | This will be populated by processor |
500 | ERROR_FROM_PG | Error in gateway response |
500 | INTERNAL_PROCESSING _ERROR | Something went wrong at our end, try again after some time |
502 | ERROR_CONNECTING_PG | Gateway connectivity unavailable |
503 | ERROR_CONNECTING_PG | Gateway connectivity unavailable |
503 | SERVICE_UNAVAILABLE | We see a downtime at our end. Please try again sometime! |