Check Setup Order Status


This API allows you to check the status of a mandate after a subscription has been successfully set up. Once the mandate is created and the payment is debited, you can use this API to track the corresponding order status, including whether it is successful, pending, or failed.

EnvironmentHTTP MethodAPI
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/checkout/v2/order/{merchantOrderId}/status
ProductionGEThttps://api.phonepe.com/apis/pg/checkout/v2/order/{merchantOrderId}/status
Request Headers
Header NameHeader Value
Content-Typeapplication/json
AuthorizationO-Bearer <merchant-auth-token>

⚠️ For Partner Integrations!


It is mandatory to include the X-MERCHANT-ID header with the MerchantID of the end merchant.

Path Parameters
Parameter NameDataTypeMandatoryDescription
merchantOrderIdStringYesUnique orderId generated by the merchant to track the transactions.
detailsBooleanNotrue → return all attempt details under paymentDetails list
false → return only latest attempt details under paymentDetails list
Sample Response
{
  "orderId": "OMO2604141037458946131769V",
  "state": "COMPLETED",
  "currency": "INR",
  "amount": 100,
  "payableCurrency": "INR",
  "payableAmount": 100,
  "feeCurrency": "INR",
  "feeAmount": 0,
  "expireAt": 1776146265882,
  "paymentFlow": {
    "type": "SUBSCRIPTION_CHECKOUT_SETUP",
    "merchantSubscriptionId": "Sub123",
    "authWorkflowType": "TRANSACTION",
    "amountType": "FIXED",
    "maxAmount": 100,
    "frequency": "ON_DEMAND",
    "expireAt": 1779689282000,
    "subscriptionId": "OMS2604141037458806131949V"
  },
  "paymentDetails": [
    {
      "transactionId": "OM2604141037482338791885V",
      "paymentMode": "UPI_QR",
      "timestamp": 1776143268272,
      "currency": "INR",
      "amount": 100,
      "payableCurrency": "INR",
      "payableAmount": 100,
      "feeCurrency": "INR",
      "feeAmount": 0,
      "state": "COMPLETED",
      "instrument": {
        "type": "ACCOUNT",
        "maskedAccountNumber": "XXXXXX6392",
        "ifsc": "SBIN0011290",
        "accountType": "SAVINGS",
        "bankId": "SBIN"
      },
      "rail": {
        "type": "UPI",
        "utr": "610408034245",
        "umn": "d908ccf63c21406f9f38b94f70994921@axl"
      },
      "splitInstruments": [
        {
          "instrument": {
            "type": "ACCOUNT",
            "maskedAccountNumber": "XXXXXX6392",
            "ifsc": "SBIN0011290",
            "accountType": "SAVINGS",
            "bankId": "SBIN"
          },
          "rail": {
            "type": "UPI",
            "utr": "610408034245",
            "umn": "d908ccf63c21406f9f38b94f70994921@axl"
          },
          "currency": "INR",
          "amount": 100
        }
      ]
    }
  ],
  "metaInfo": {
    "udf1": "some meta info of max length 256",
    "udf2": "some meta info of max length 256",
    "udf3": "some meta info of max length 256",
    "udf4": "some meta info of max length 256",
    "udf5": "some meta info of max length 256",
    "udf6": "some meta info of max length 256",
    "udf7": "some meta info of max length 256",
    "udf8": "some meta info of max length 256",
    "udf10": "some meta info of max length 256",
    "udf11": "some meta info of max length 50",
    "udf12": "some meta info of max length 50",
    "udf13": "some meta info of max length 50",
    "udf14": "some meta info of max length 50",
    "udf15": "some meta info of max length 50"
  }
}
Response Parameters
Field NameData TypeDescription
orderIdStringUnique internal orderId generated by PhonePe Payment Gateway.
stateStringCurrent status of the order. Expected Values:
PENDING
FAILED
COMPLETED
amountLongTotal order amount in paise.
currencyStringSpecifies the Currency used (INR)
expireAtLongorder expiry time in epoch
metaInfoObjectMerchant defined meta info passed at the time of order creation
paymentDetailsListContain list of details of each payment attempt made corresponding to this order.
paymentDetails[*].paymentModeStringMode of payment. Expected Values:
UPI_INTENT
UPI_QR
paymentDetails[*].timestampLongTransaction attempt timestamp in epoch
paymentDetails[*].amountLongAmount in paisa, corresponding to payment attempt
paymentDetails[*].transactionIdStringinternal transaction id for given payment attempt
paymentDetails[*].stateStringTransaction attempt state. Expected Values:
PENDING
COMPLETED
FAILED
paymentDetails[*].errorCodeStringError code (Only present when transaction state is failed)
paymentDetails[*].detailedErrorCodeStringDetailed Error Code (Only present when transaction state is failed)
headers
url params

After retrieving the subscription order status, the next step is to check the current status of a subscription after it has been set up.

Is this article helpful?