Initiate Refund
The Refund API allows you to initiate refunds for specific transactions, returning funds to customers for reasons like order cancellations, returns, or payment adjustments. This ensures smooth and direct refund processing through the payment gateway.
Environment
| Environment | HTTP Method | API |
| Sandbox | POST | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund |
| Production | POST | https://api.phonepe.com/apis/pg/payments/v2/refund |
Request
Request Headers
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
Request Parameters
| Field Name | Data Type | Mandatory(Y/N) | Description | Constraints |
merchantRefundId | String | Yes | Unique merchant refund ID generated by the merchant | Max Length = 63 characters |
originalMerchantOrderId | String | Yes | Original merchant order ID against which refund is required | |
amount | Long | Yes | Amount in paisa to refund | Min Value = 100 |
Sample Request
{
"merchantRefundId": "Refund-id-12345",
"originalMerchantOrderId": "Order-12345",
"amount": 1234
}⚠️ Invalid Refund Amount!
The refund amount cannot exceed the initiated amount. It must always be less than or equal to the amount originally initiated.
Response
Case 1: Response for Refund initiated successfully
{
"refundId": "OMRxxxxx"
"amount": 1234,
"state": "PENDING"
}Response Parameters
| Field Name | Data Type | Description |
refundId | String | PG generated internal refund ID |
amount | Long | Amount in paisa to refund |
state | String | Refund state; expected value = PENDING |
What’s Next?
Now that you have initiated a refund, the next step is to check its status. The following section explains how to implement the Refund Status to check the status of the initiated Refund.