UAT
Uat URL:https://mercury-uat.phonepe.com/enterprise-sandbox/v1/edc/transaction/{merchantId}/{transactionId}/status
PROD
Base Url: https://mercury-t2.phonepe.com
StatusCheck API: https://mercury-t2.phonepe.com/v1/edc/transaction/{merchantId}/{transactionId}/status
Request Headers
Header Name | Header Value |
---|---|
Content-Type | application/json |
X-VERIFY | SHA256(“/v1/edc/transaction/{merchantId}/{transactionId}/status” + saltKey) + ### + saltIndex |
X-PROVIDER-ID | Used for the cases where the merchants are getting onboarded via their Providers |
Path Parameters
Parameter Name | Type | Description | Mandatory |
---|---|---|---|
merchantId | STRING | Unique Merchant ID assigned to the merchant by PhonePe | Yes |
transactionId | STRING | Merchant transactionID for which status is to be fetched | Yes |
Response Parameters
Parameter Name | Type | Description |
---|---|---|
success | BOOLEAN | A boolean to indicate the success/failure of the request. |
code | ENUM | Please see the list of Status Response Codes below. |
message | STRING | Short message about the status of transaction |
data | JSON OBJECT | Data in JSON Object |
Data JSON Object
Parameter Name | Type | Description |
---|---|---|
merchantId | STRING | Unique Merchant ID assigned to the merchant by PhonePe |
storeId | STRING | This will be a Phonepe generated storeId |
terminalId | STRING | This will be a Phonepe generated terminalId |
orderId | STRING | Merchant passed orderId inside the Sale Init API |
transactionId | STRING | Merchant passed transactionId inside the Sale Init API |
referenceNumber | STRING | This reference number will be present on Charge slip. It will be returned for every successful payment. For Card transaction it’s RRN number, UPI transactions it’s UTR number and for Wallet transactions it’s Phonepe payment Id |
paymentMode | STRING | Payment Mode is visible if a transaction is attempted. Mainly it gives two values: CARD and DQR |
amount | LONG | Amount in Paise format |
status | STRING | It gives the status of a transaction. Mainly it gives values: PENDING/SUCCESS/FAILED/EXPIRED |
responseCode | STRING | In case of error, this parameter provides granular reason for error: Wrong UPI Pin/PG Backbone Error/UPI Backbone Error |
paymentInstruments | STRING | List of payment instruments used by customer to make payment. CARD payment mode: CREDIT_CARD/DEBIT_CARD. DQR payment mode: ACCOUNT/ WALLET/EXTERNAL_WALLET/ DEBIT_CARD/CREDIT_CARD/ EXTERNAL_VPA/EGV/NET_BANKING |
Status API Response Codes
Code | Description |
---|---|
SUCCESS | Payment is successful |
UNAUTHORIZED | X-VERIFY SHA header is incorrect |
INVALID_MERCHANT_ID | The merchantId passed is invalid |
INVALID_TRANSACTION_ID | The Transaction ID passed is invalid |
Credit Card Response
{
"success": true,
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"merchantId": "MERCHANTUAT",
"storeId": "teststore1",
"terminalId": "testTerminal1",
"orderId": "MRCH124",
"transactionId": "TXN0011113211_18OCT",
"referenceNumber": "579649795540",
"paymentMode": "CARD",
"amount": 0,
"status": "SUCCESS",
"responseCode": "null",
"paymentInstruments": [
{
"type": "CARD",
"amount": 100,
"last4Digits": "4894",
"cardNetwork": "VISA",
"cardType": "CREDIT_CARD"
}
],
"timestamp": 1729248705772
}
}
Debit Card Response
{
"success": true,
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"merchantId": "MERCHANTUAT",
"storeId": "teststore1",
"terminalId": "testTerminal1",
"orderId": "MRCH124",
"transactionId": "TXN0011113211_18OCT01",
"referenceNumber": "861916342174",
"paymentMode": "CARD",
"amount": 0,
"status": "SUCCESS",
"responseCode": "null",
"paymentInstruments": [
{
"type": "CARD",
"amount": 100,
"last4Digits": "5590",
"cardNetwork": "VISA",
"cardType": "DEBIT_CARD"
}
],
"timestamp": 1729249881076
}
}
Account Wallet Response
{
"success": true,
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"merchantId": "MERCHANTUAT",
"storeId": "teststore1",
"terminalId": "testTerminal1",
"orderId": "MRCH124",
"transactionId": "TXN0011113211_18OCT02",
"referenceNumber": "457143042016",
"paymentMode": "DQR",
"amount": 0,
"status": "SUCCESS",
"responseCode": "null",
"paymentInstruments": [
{
"type": "ACCOUNT",
"amount": 100,
"upiTransactionId": "YBL4b8450b7e81e46bc962fbee3ee855945"
},
{
"type": "WALLET",
"amount": 0
}
],
"timestamp": 1729251765008
}
}
Wallet Response
{
"success": true,
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"merchantId": "MERCHANTUAT",
"storeId": "teststore1",
"terminalId": "testTerminal1",
"orderId": "MRCH124",
"transactionId": "TXN0011113211_18OCT05",
"referenceNumber": "457143042016",
"paymentMode": "DQR",
"amount": 0,
"status": "SUCCESS",
"responseCode": "null",
"paymentInstruments": [
{
"type": "WALLET",
"amount": 100
}
],
"timestamp": 1729252209353
}
}
Account Response
{
"success": true,
"code": "SUCCESS",
"message": "Your request has been successfully completed.",
"data": {
"merchantId": "MERCHANTUAT",
"storeId": "teststore1",
"terminalId": "testTerminal1",
"orderId": "MRCH124",
"transactionId": "TXN0011113211_18OCT04",
"referenceNumber": "457143042016",
"paymentMode": "DQR",
"amount": 0,
"status": "SUCCESS",
"responseCode": "null",
"paymentInstruments": [
{
"type": "ACCOUNT",
"amount": 100,
"upiTransactionId": "YBL4b8450b7e81e46bc962fbee3ee855945"
}
],
"timestamp": 1729252056166
}
}
{“method”:”GET”,”url”:”/v1/edc/transaction/{merchantId}/{transactionId}/status”,”auth”:”required”,”results”:{“codes”:[{“name”:””,”code”:”{\n \”success\”: true,\n \”code\”: \”SUCCESS\”,\n \”message\”: \”Your request has been successfully completed.\”,\n \”data\”: {\n \”transactionId\”: \”55fe801b-1092-461a-8480-c80d9781498a\”,\n \”amount\”: 300,\n \”merchantId\”: \”MERCHANTUAT\”,\n \”providerReferenceId\”: \”C2111161249027983263789\”\n }\n}”,”language”:”json”,”status”:200},{“name”:””,”code”:”{\n \”success\”: false,\n \”code\”: \”BAD_REQUEST\”,\n \”message\”: \”Invalid mobile number: \”,\n \”data\”: {}\n}”,”language”:”json”,”status”:400}]},”params”:[{“name”:”request”,”type”:”string”,”enumValues”:””,”default”:””,{“name”:”Content-Type”,”type”:”string”,”enumValues”:””,”default”:”application/json”,”desc”:””,”required”:true,”in”:”header”,”ref”:””,”_id”:”5f310486f1017f0441fa05e9″},{“name”:”X-VERIFY”,”type”:”string”,”enumValues”:””,”default”:”2dbfabed915b9b9759bc10a3ce6ecfbeb0c1169d5eada325668fcf31be8d360e###1″,”desc”:”SHA256(\”/v1/edc/transaction/{merchantId}/{transactionId}/status\” + salt key) + ### + salt index”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5f310486f1017f0441fa05e8″},{“name”:”X-PROVIDER-ID”,”type”:”string”,”enumValues”:””,”default”:””,”desc”:”Used for the cases where the merchant has multiple merchant IDs”,”required”:true,”in”:”header”,”ref”:””,”_id”:”5f310486f1017f0441fa05e6″}],”examples”:{“codes”:[{“code”:”{\n \”request\”: \”eyAgCiAgICJtZXJjaGFudElkIjoiTUVSQ0hBTlRVQVQiLAogICAidHJhbnNhY3Rpb25JZCI6IlRYMTIzNDU2Nzg5IiwKICAgIm1lcmNoYW50T3JkZXJJZCI6Ik0xMjM0NTY3ODkiLAogICAiYW1vdW50IjoxMDAsCiAgICJpbnN0cnVtZW50VHlwZSI6Ik1PQklMRSIsCiAgICJpbnN0cnVtZW50UmVmZXJlbmNlIjoiOTk5OTk5OTk5OSIsCiAgICJtZXNzYWdlIjoiY29sbGVjdCBmb3IgWFhYIG9yZGVyIiwKICAgImVtYWlsIjoiYW1pdHh4eDc1QGdtYWlsLmNvbSIsCiAgICJleHBpcmVzSW4iOjE4MCwKICAgInNob3J0TmFtZSI6IkRlbW9DdXN0b21lciIsCiAgICJzdG9yZUlkIjoic3RvcmUxIiwKICAgInRlcm1pbmFsSWQiOiJ0ZXJtaW5hbDEiCn0=\”\n}”,”language”:”json”}]},”apiSetting”:”64c244096688b200429110a5″}
https://mercury-uat.phonepe.com/enterprise-sandbox