Order Status with SplitInfo
The Order Status API is used to check the status of a payment using the merchantOrderId. It returns key details such as payment state, transaction amount, mode, and timestamp. If the order involves split settlement, the response includes a splitSettlementInfo block with a breakdown of the amounts settled to each account and their respective settlement states.
Environment
| Environment | Http Method | Value |
|---|---|---|
| GET | https://api-preprod.phonepe.com/apis/pg-sandbox/payments/v2/order/{merchantOrderId}/status |
Production | GET | https://api.phonepe.com/apis/pg/payments/v2/order/{merchantOrderId}/status |
Request
Request Headers
| Header Name | Header Value |
| Content-Type | application/json |
| Authorization | O-Bearer <partner-auth-token> |
| X-MERCHANT-ID | MID |
Path Parameters
| Header Name | Description |
|---|---|
merchantOrderId | The merchant generated Order Id |
Response
Case 1: order is completed and settlement for merchant and split both NOT_INITIATED
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1291391291,
"metaInfo":
{
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": ""
},
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"paymentDetails":
[
{
"paymentMode": "UPI_QR",
"transactionId": "OM12334",
"timestamp": 12121212,
"amount": 10000,
"state": "COMPLETED",
"rail":
{
"type": "UPI",
"upiTransactionId": "upi12313",
"vpa": "12****78@ybl"
},
"instrument":
{
"type": "ACCOUNT",
"accountType": "SAVINGS",
"accountNumber": "******1234"
}
}
],
// below splitSettlementInfo block will only come if order split information is given.
"splitSettlementInfo":
{
"type": "ABSOLUTE",
"accountSplit":
[
{
"value": 400,
"accountId": "ACC12345"
},
{
"value": 510,
"accountId": "ACC6789"
}
],
"state": "PENDING"
},
// below errorContext block will only come if order is in failed state and queryParam is passed as "errorContext=true"
"errorContext":
{
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"source": "CUSTOMER",
"stage": "AUTHENTICATION",
"description": "Wrong MPIN was entered"
}
}Case 2: order is completed and merchant settlement is COMPLETED and split settlement info is COMPLETED
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1291391291,
"metaInfo":
{
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": ""
},
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"paymentDetails":
[
{
"paymentMode": "UPI_QR",
"transactionId": "OM12334",
"timestamp": 12121212,
"amount": 10000,
"state": "COMPLETED",
"rail":
{
"type": "UPI",
"upiTransactionId": "upi12313",
"vpa": "12****78@ybl"
},
"instrument":
{
"type": "ACCOUNT",
"accountType": "SAVINGS",
"accountNumber": "******1234"
}
}
],
// below splitSettlementInfo block will only come if order split information is given.
"splitSettlementInfo":
{
"type": "ABSOLUTE",
"accountSplit":
[
{
"value": 400,
"accountId": "ACC12345"
},
{
"value": 510,
"accountId": "ACC6789"
}
],
"state": "ACCEPTED"
},
// below errorContext block will only come if order is in failed state and queryParam is passed as "errorContext=true"
"errorContext":
{
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"source": "CUSTOMER",
"stage": "AUTHENTICATION",
"description": "Wrong MPIN was entered"
}
}Case 3: order is completed and merchant settlement is COMPLETED and split settlement info is not found
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1291391291,
"metaInfo":
{
"udf1": "",
"udf2": "",
"udf3": "",
"udf4": "",
"udf5": ""
},
"errorCode": "INVALID_MPIN", // Only present in case of failed transaction attempt and order is failed
"detailedErrorCode": "ZM", // Only present in case of failed transaction attempt and order is failed
"paymentDetails":
[
{
"paymentMode": "UPI_QR",
"transactionId": "OM12334",
"timestamp": 12121212,
"amount": 10000,
"state": "COMPLETED",
"rail":
{
"type": "UPI",
"upiTransactionId": "upi12313",
"vpa": "12****78@ybl"
},
"instrument":
{
"type": "ACCOUNT",
"accountType": "SAVINGS",
"accountNumber": "******1234"
}
}
],
// below splitSettlementInfo block will only come if order split information is given.
"splitSettlementInfo":
{
"type": "ABSOLUTE",
"accountSplit":
[
{
"value": 400,
"accountId": "MYACCOUNT1234"
},
{
"value": 510,
"accountId": "VENDOR567"
}
],
"state": "FAILED"
},
// below errorContext block will only come if order is in failed state and queryParam is passed as "errorContext=true"
"errorContext":
{
"errorCode": "INVALID_MPIN",
"detailedErrorCode": "ZM",
"source": "CUSTOMER",
"stage": "AUTHENTICATION",
"description": "Wrong MPIN was entered"
}
}Response Parameter
| Header Name | Data Type | Description |
|---|---|---|
orderId | String | PG generated internal order ID |
state | String | Indicates the current status of the order. Possible values: • PENDING • FAILED • COMPLETED Note: Always rely on the state field to determine the final status of the payment. |
amount | String | Total order amount represented in paisa. |
expireAt | Long | Time when the order expires, represented in epoch (milliseconds). |
metaInfo | Object | Custom metadata provided by the merchant during order creation. |
paymentDetails | List | Contains a list of details for each payment attempt made for the order. |
paymentDetails.paymentMode | String | Mode used for the payment. Possible values include: • UPI_INTENT • UPI_COLLECT • UPI_QR • CARD • TOKEN • NET_BANKING |
paymentDetails.timestamp | Long | Time when the transaction was attempted, represented in epoch (milliseconds). |
paymentDetails.amount | Long | The transaction amount for the specific payment attempt, represented in paisa. |
paymentDetails.transactionId | String | The internal ID assigned to a specific payment attempt. |
paymentDetails.state | String | Current status of the payment attempt. Possible values: • PENDING • COMPLETED • FAILED |
paymentDetails.errorCode | String | Displays the error code only if the transaction attempt has failed. |
paymentDetails.detailedErrorCode | String | Shows a more specific error code, available only when the transaction attempt has failed. |
paymentDetails.rail | String | Includes the processing rail details used for the specific payment attempt. |
paymentDetails.rail.type | String | Indicates the rail type used for processing. Expected values: • UPI • PG |
paymentDetails.instrument | String | Provides details of the payment instrument used for the transaction. |
paymentDetails.instrument.type | String | Specifies the type of payment instrument used. Expected values: • ACCOUNT • CREDIT_CARD • DEBIT_CARD • NET_BANKING |
settlementDetails | Object | Represents the settlement status associated with the order. |
settlementDetails.state | String | Indicates the current status of the settlement. Possible values include: • NOT_INITIATED • INITIATED, PROCESSED • ATTEMPT_FAILED |
splitSettlementInfo | Object | Provides details about how the order amount is distributed across different accounts if a split is configured. |
splitSettlementInfo.splitType | String | Indicates the method used for splitting the amount. Supported values: • PERCENT • ABSOLUTE |
splitSettlementInfo.accounts[*].accountId | String | Unique identifier of the split account provided by the merchant for reference. |
splitSettlementInfo.settlementStatus | String | Indicates whether the payment settlement information is available in the internal tStore or not. |
errorContext | String | Provides error information including errorCode, detailedErrorCode, source, stage, and a brief description of the issue. |
settlementDetails | Object | Provides error details such as error code, detailed error code, source of failure, stage of failure, and a descriptive message. |