Check Setup Order Status
- This API helps you check whether the subscription has been successfully created, is still pending user action, has failed, or is complete.
- Once the customer completes the mandate through Payment Service Provider( PhonePe, BHIM, GPay, Paytm, CRED, Amazon Pay) app, use this API to check the status of a subscription setup after initiating it.
Environment
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/checkout/v2/order/{merchantOrderId}/status |
| Production | GET | https://api.phonepe.com/apis/pg/checkout/v2/order/{merchantOrderId}/status |
Request
Request Headers
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <merchant-auth-token> |
Request Parameters
| Parameter Name | DataType | Mandatory | Description |
merchantOrderId | String | Yes | unique merchant order Id generated by the merchant. |
details | Boolean | No | • true → return all attempt details under paymentDetails list • false → return only latest attempt details under paymentDetails list |
Response
Sample Response
{
"merchantId": "INFINITYSTORE",
"merchantOrderId": "subs_367374027",
"orderId": "OMO2506201602348278355126",
"state": "PENDING",
"amount": 200,
"expireAt": 1750417054786,
"paymentFlow": {
"type": "SUBSCRIPTION_CHECKOUT_SETUP",
"merchantSubscriptionId": "subs_193436354",
"authWorkflowType": "PENNY_DROP",
"amountType": "VARIABLE",
"maxAmount": 49900,
"frequency": "ON_DEMAND",
"expireAt": 2065948354000,
"subscriptionId": "OMS2506201602348258355908"
},
"paymentDetails": [
{
"transactionId": "OM2506201602348628355930",
"paymentMode": "UPI_INTENT",
"timestamp": 1750415554863,
"amount": 200,
"payableAmount": 200,
"feeAmount": 0,
"state": "PENDING"
}
]
}Response Parameters
| Field Name | Data Type | Description |
| orderId | String | PG generated internal order id |
| state | String | State of order, Expected Values: • PENDING • FAILED • COMPLETED |
| amount | Long | Order amount in paisa |
| expireAt | Long | order expiry time in epoch |
| metaInfo | Object | Merchant defined meta info passed at the time of order creation |
| paymentDetails | List | Contain list of details of each payment attempt made corresponding to this order. |
| paymentDetails[*].paymentMode | String | Mode of payment. Expected Values: • UPI_INTENT • UPI_QR |
| paymentDetails[*].timestamp | Long | Transaction attempt timestamp in epoch |
| paymentDetails[*].amount | Long | Amount in paisa, corresponding to payment attempt |
| paymentDetails[*].transactionId | String | internal transaction id for given payment attempt |
| paymentDetails[*].state | String | Transaction attempt state. Expected Values: • PENDING • COMPLETED • FAILED |
| paymentDetails[*].errorCode | String | Error code (Only present when transaction state is failed) |
| paymentDetails[*].detailedErrorCode | String | Detailed Error Code (Only present when transaction state is failed) |
Verify a Sample Payment Status!
headers
url params
What’s Next?
After retrieving the subscription order status, the next step is to understand how the subscription cancellation process works. Head over to the next section to learn how to initiate and determine the outcome of a cancellation