This API is used to fetch the status of a transaction.
API Path and Method to be used
Environment | Http Method | API Host URL |
---|---|---|
Sandbox | GET | https://api-preprod.phonepe.com/apis/pg-sandbox |
Production | GET | https://api.phonepe.com/apis/pg |
Endpoint :
/payments/v2/transaction/{transactionId}/status
Path Parameters :
transactionId: <transaction id of the transaction>
Request Headers
Header Name | Header Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | O-Bearer <access_token> | Pass access_token received in Authorization call |
Sample Response
{
"orderId": "OMOxx",
"state": "COMPLETED",
"amount": 10000,
"expireAt": 1291391291,
"errorCode": "AUTHORIZATION_ERROR", // Only for failed transaction attempt and order not completed
"detailedErrorCode": "ZM", // Only for failed transaction attempt and order not completed
"paymentDetails": [{
"paymentMode": "UPI_INTENT",
"timestamp": 12121212,
"amount": 10000,
"transactionId": "OM12333",
"state": "COMPLETED",
"splitInstruments": [...]
}]
}