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.

EnvironmentHTTP MethodAPI
SandboxPOSThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund
ProductionPOSThttps://api.phonepe.com/apis/pg/payments/v2/refund
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>
Request Parameters
Field NameData TypeMandatory(Y/N)DescriptionConstraints
merchantRefundIdStringYesUnique merchant refund ID generated by the merchantMax Length = 63 characters
originalMerchantOrderIdStringYesOriginal merchant order ID against which refund is required
amountLongYesAmount in paisa to refundMin 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.

Case 1: Response for Refund initiated successfully
{
    "refundId": "OMRxxxxx"
    "amount": 1234,
    "state": "PENDING"
}
Response Parameters
Field NameData TypeDescription
refundIdStringPG generated internal refund ID
amountLongAmount in paisa to refund
stateStringRefund state; expected value = PENDING

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.

Is this article helpful?