Initiate Refund and Check Refund Status


This section explains how to initiate a refund for a successful transaction using the Refund API. You need to provide details like the original transaction ID, refund amount, and refund ID. After initiating the refund, you can use the Refund Status API to check whether the refund was successful, pending, or failed. These APIs help you manage the full refund lifecycle efficiently. Use them to ensure timely and transparent customer experiences.

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
Parameter NameData TypeDescription
merchantRefundIdStringUnique merchant refund ID generated by the merchant
originalMerchantOrderIdStringOriginal merchant order ID against which refund is required
amountLongAmount in paisa to refund
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.

Sample Response
{
  "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
headers
body params

The Refund Status API allows you to check the current status of a refund request. It helps you track whether the refund is pending, processed, failed, or completed, enabling you to keep your records up to date and provide accurate information to your customers.

EnvironmentHTTP MethodAPI
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/refund/{merchantRefundId}/status
ProductionGEThttps://api.phonepe.com/apis/pg/payments/v2/refund/{merchantRefundId}/status
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <access_token>
Path Parameters
Parameter NameDescription
merchantRefundIdThe Merchant Refund ID for which the status is to be retrieved
Sample Response
{
  "originalMerchantOrderId": "",
  "refundId": "OMRxxxxx",
  "amount": 1234,
  "state": "FAILED",
  "errorCode": "INTERNAL_SERVER_ERROR",
  "detailedErrorCode": "",
  "rail": {
    "type": "UPI",
    "upiTransactionId": "upi12313",
    "vpa": "12****78@ybl"
  },
  "instrument": {
    "type": "ACCOUNT",
    "accountType": "SAVINGS",
    "accountNumber": "******1234"
  }
}
headers
url params

In this section, you’ve learned how to initiate a refund and check its status. In the next section, you’ll understand how payment verification is handled using Webhooks, and how to manually verify the payment in case the webhook callback fails.

Is this article helpful?