Order Status


This API is used to fetch the current status of an order. It helps confirm whether a payment is successful, pending, or failed, and ensures that the final transaction status is updated accurately in the merchant app.

EnvironmentHttp MethodAPI
SandboxGEThttps://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/order/{merchantOrderId}/status?details=[true]
ProductionGEThttps://api.phonepe.com/apis/pg/payments/v2/order/{merchantOrderId}/status?details=[true]
Request Headers
Header NameHeader ValueDescription
Content-Typeapplication/json
AuthorizationO-Bearer <access_token>Pass access_token received in Authorization call
Sample Responses for Case 1: Order is completed with only UPI
{
  "orderId": "OMO2406121817536673671964",
  "state": "FAILED",
  "amount": 600,
  "expireAt": 1718196773639,
  "errorCode": "PAYMENT_ERROR",
  "detailedErrorCode": "XC",
  "paymentDetails": [
    {
      "transactionId": "OM2406121817537233671905",
      "paymentMode": "UPI_INTENT",
      "timestamp": 1718196473782,
      "amount": 600,
      "payableAmount": 600,
      "feeAmount": 0,
      "state": "FAILED",
      "errorCode": "PAYMENT_ERROR",
      "detailedErrorCode": "XC",
      "splitInstruments": [
        {
          "instrument": {
            "type": "ACCOUNT",
            "maskedAccountNumber": "XXXXXXX20000",
            "accountHolderName": "Venkat",
            "accountType": "SAVINGS"
          },
          "rail": {
            "type": "UPI",
            "utr": "416455839594",
            "upiTransactionId": "YBLb58946ea97d34dacbb341be2aa52cfdd",
            "vpa": "12****78@ybl"
          },
          "amount": 600
        }
      ]
    }
  ]
}
Sample Response for Case 2: Order is completed with UPI + Wallet
{
    "orderId": "OMO2406121815092173671793",
    "state": "FAILED",
    "amount": 600,
    "expireAt": 1718196609188,
    "errorCode": "PAYMENT_ERROR",
    "detailedErrorCode": "XC",
    "paymentDetails": [
        {
            "transactionId": "OM2406121815092983671195",
            "paymentMode": "UPI_INTENT",
            "timestamp": 1718196309367,
            "amount": 600,
            "payableAmount": 600,
            "feeAmount": 0,
            "state": "FAILED",
            "errorCode": "PAYMENT_ERROR",
            "detailedErrorCode": "XC",
            "splitInstruments": [
                {
                    "instrument": {
                        "type": "ACCOUNT",
                        "maskedAccountNumber": "XXXXXXX20000",
                        "accountHolderName": "Venkat",
                        "accountType": "SAVINGS"
                    },
                    "rail": {
                        "type": "UPI",
                        "utr": "416421787136",
                        "upiTransactionId": "YBL96b3dfd0a7c442dc80bec6ae45ffb58c",
                        "vpa": "12****78@ybl"
                    },
                    "amount": 100
                },
                {
                    "instrument": {
                        "type": "WALLET"
                    },
                    "rail": {
                        "type": "PPI_WALLET"
                    },
                    "amount": 500
                }
            ]
        }
    ]
}
Sample Response for Case 3: No payment attempt is made for order
{  
    "orderId": "OMOxx",        
    "state": "CREATED",
    "amount": 10000,
    "expireAt": 1291391291
}
Response Parameters
Parameter NameTypeDescription
orderIdStringPG generated internal order id
stateStringState of order, Expected Values
PENDING
FAILED
COMPLETED
amountLongOrder amount in paisa
expireAtStringorder expiry time in epoch
metaInfoObjectMerchant defined meta info passed at the time of order creation
paymentDetailsListContains list of details of each payment attempt made corresponding to this order.
paymentDetails.paymentModeStringMode of payment. Expected Values:
UPI_INTENT
UPI_COLLECT
UPI_QR
CARD
TOKEN
NET_BANKING
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)
paymentDetails.railObjectContains processing rail details under which payment attempt is made.
paymentDetails.rail.typeStringType of rail. Expected values:
UPI
PG
paymentDetails.instrumentObjectContains instrument details
paymentDetails.instrument.typeStringType of payment instrument. Expected values:
ACCOUNT
EXTERNAL_VPA
CREDIT_CARD
DEBIT_CARD
NET_BANKING
Rail = “UPI”, When payment Mode = [UPI_INTENT, UPI_COLLECT, UPI_QR]
"rail": {
    "type": "UPI",
    "utr": "<utr>",
    "upiTransactionId": "upi12313",
    "vpa": "12****78@ybl"
}
Rail = “PG”, When payment Mode = [CARD, TOKEN, NET_BANKING]
"rail": {
    "type": "PG",
    "transactionId": "<transactionId>",
    "authorizationCode": "<authorizationCode>",
    "serviceTransactionId": "<serviceTransactionId>"
}
Instrument = “ACCOUNT”, When payment Mode = [UPI_INTENT, UPI_COLLECT, UPI_QR]
"instrument": {
    "type": "ACCOUNT",
    "accountType": "SAVINGS",
    "maskedAccountNumber": "<maskedAccountNumber>",
    "accountHolderName": "<accountHolderName>"
}
Instrument = “CREDIT_CARD”, When payment Mode = [CARD, UPI_INTENT, UPI_COLLECT, UPI_QR]
"instrument": {
    "type": "CREDIT_CARD",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}
Instrument = “DEBIT_CARD”, When payment Mode = [CARD]
"instrument": {
    "type": "DEBIT_CARD",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}
Instrument = “NET_BANKING”, When payment Mode = [NET_BANKING]
"instrument": {
    "type": "NET_BANKING",
    "bankTransactionId": "<bankTransactionId>",
    "bankId": "<bankId>",
    "arn": "<arn>",
    "brn": "<brn>"
}

In the next section, you will learn how to configure webhooks to receive real-time order status updates. This is a step for confirming whether a payment is successful, pending, or failed, ensuring the final transaction status is updated accurately in your application.

Is this article helpful?