This API is used to initiate the refund of a successful forward order.
API Host
Environment | Http Method | API Host URL |
---|
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 Headers
Header Name | Header Value | Mandatory | Description |
---|
Content-Type | application/json | Yes | |
Authorization | O-Bearer <access_token> | Yes | Pass access_token received in Authorization call |
Request Parameters
Parameter Name | Type | Description |
---|
merchantRefundId | String | Unique merchant refund id generated by merchant |
originalMerchantOrderId | String | Original merchant order id against which refund is required |
amount | Long | Amount in paisa to refund |
Sample Request
{
"merchantRefundId": "Refund-id-12345",
"originalMerchantOrderId": "Order-12345",
"amount": 50000
}
Sample Response
{
"refundId": "OMRxxxxx"
"amount": 50000,
"state": "PENDING"
}
Response Parameters
Parameter Name | Type | Description |
---|
refundId | String | PG generated internal refund id |
state | String | refund state, expected value = PENDING |
amount | Long | Amount in paisa to refund |