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.
API Endpoint
| Environment | HTTP Method | API |
| Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox/paylinks/v1/{merchantOrderId}/status?details=[false or true] |
| Production | GET | https://api.phonepe.com/apis/pg/paylinks/v1/{merchantOrderId}/status?details=[false or true] |
Request
Request Headers
| Header Name | Header Value |
Content-Type | application/json |
Authorization | O-Bearer <merchant-auth-token> |
Path Parameters
| Parameter Name | DataType | Mandatory | Description |
merchantOrderId | String | Yes | Unique orderId generated by the merchant to track the transactions. |
details | Boolean | No | • true → return all attempt details under paymentDetails list • false → return only latest attempt details under paymentDetails list |
Response
Sample Response
{
"orderId": "OMO2605172306419764430200BW",
"state": "COMPLETED",
"currency": "INR",
"amount": 47900,
"expireAt": 1781631401790,
"paymentFlow": {
"type": "PAYLINK",
"paylinkUrl": "https://stg.phon.pe/xf72uqe4"
},
"paymentDetails": [
{
"transactionId": "OM2605172309216534430299BW",
"paymentMode": "UPI_QR",
"timestamp": 1779039562040,
"currency": "INR",
"amount": 47900,
"payableCurrency": "INR",
"payableAmount": 47900,
"feeCurrency": "INR",
"feeAmount": 0,
"state": "COMPLETED",
"splitInstruments": [
{
"instrument": null,
"rail": null,
"currency": null,
"amount": null
}
]
}
],
"subscriptionDetails": {
"merchantSubscriptionId": "MS10000000453",
"subscriptionId": "OMS2605172309221824430273BW",
"state": "ACTIVE",
"productType": "UPI_MANDATE",
"authInstrumentType": "UPI",
"authWorkflowType": "TRANSACTION",
"amountType": "VARIABLE",
"currency": "INR",
"maxAmount": 47900,
"frequency": "ON_DEMAND",
"expireAt": 2725810762190,
"pauseStartDate": null,
"pauseEndDate": null
}
}Response Parameters
| Field Name | Data Type | Description |
orderId | String | Unique internal orderId generated by PhonePe Payment Gateway. |
state | String | Current status of the order. Expected Values: • PENDING • FAILED • COMPLETED • Expire |
| amount | Long | Total order amount in paise. |
| currency | String | Specifies the Currency used (INR) |
| expireAt | Long | order expiry time in epoch |
| paymentFlow.type | String | Type of payment flow. |
| paymentFlow.paylinkUrl | String | The URL where the customer can access the payment page and complete the transaction. |
| 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) |