---
page_title: P2M Transaction Status
product: UPI Plugin SDK
platform: Android
page_source: https://juspay.io/in/docs/upi-plugin-sdk/android/backend-apis/p2m-transaction-s
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fupi-plugin-sdk%2Fandroid%2Fbackend-apis%2Fp2m-transaction-s
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/upi-plugin-sdk/llms.txt
---

## API Version: default


## P2M Transaction Status



This is a Server-to-Server API that takes orderid as a path variable and returns the status of the order along with other details. ## Endpoints:
- Sandbox: https://sandbox.juspay.in/orders/{order_id}

- Production: https://api.juspay.in/orders/{order_id}

## Request Type: 
GET

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value: Example: MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded username:password, required
## Headers:

#### x-merchantid:
Merchant ID provided by Juspay
- Value: Example: merchant-id
- Tags: string, required

#### version:
Pass the date in YYYY-MM-DD format
- Value: Example: 2023-01-01
- Tags: string, required
## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
curl --location --request GET '{endpoint}/orders/{order_id}' \
--header 'version: '2022-01-11'' \
--header Content-Type:application/x-www-form-urlencoded'\
--header'x-merchantid: stock '
--header 'Authorization: Basic OTc5Mzcx*****czRTlGOg=='
```

### Sample Response:

#### JSON:
```plaintext
{
   "udf8": "",
   "udf7": "",
   "udf6": "",
   "udf5": "",
   "udf4": "",
   "udf3": "",
   "udf2": "",
   "udf10": "",
   "udf1": "",
   "txn_uuid": "eulx2nzeGu7MT56drQK",
   "txn_id": "azharamin-Juspay202_159-1",
   "maximum_eligible_refund_amount": 1,
   "txn_detail": {
      "txn_uuid": "eulx2nzeGu7MT56drQK",
      "txn_id": "azharamin-Juspay202_159-1",
      "txn_amount": 1,
      "tax_amount": null,
      "surcharge_amount": null,
      "status": "CHARGED",
      "order_id": "Juspay202_159",
      "offer_deduction_amount": null,
      "net_amount": 1,
      "gateway_id": 514,
      "gateway": "YES_BIZ",
      "express_checkout": false,
      "error_message": "",
      "error_code": null,
      "currency": "INR",
      "created": "2020-08-30T09:53:17Z",
      "redirect": true
   },
   "status_id": 21,
   "status": "CHARGED",
   "refunded": false,
   "product_id": "prod-141833",
   "payment_method_type": "UPI",
   "payment_method": "UPI",
   "payment_links": {
      "web": "http://localhost:8081/merchant/pay/ordeu_d002f7536b054b70be39b023976ab736",
      "mobile": "http://localhost:8081/merchant/pay/ordeu_d002f7536b054b70be39b023976ab736?mobile=true",
      "iframe": "http://localhost:8081/merchant/ipay/ordeu_d002f7536b054b70be39b023976ab736"
   },
   "order_id": "Juspay202_159",
   "upi": {
      "txn_type" : "UPI_INAPP",
      "bank_name": "HDFC bank",
      "bank_code": "607689",
      "payer_vpa" : "customer@vpa",
      "payer_app" : "ABCD",
      "masked_bank_account_number": "XXXXXXXXX5678",
      "upi_bank_account_reference_id": "ABC12356789"
    },//mandate block will be included in case of mandate
  "payment_gateway_response": {
      "resp_code": "00",
      "rrn": "443492753298",
      "network_error_code": null,
      "created": "2021-08-17T13:44:21Z",
      "epg_txn_id": "YJP9999rv9999a99c19a4877ede7954984e",
      "resp_message": "Your transaction is successful",
      "auth_id_code": null,
      "network_error_message": null,
      "txn_id": "eul7yc7TReHhAyNVsGp",
      "gateway_response": {
        "payeeMcc": "5816",
        "merchantId": "ABCD",
        "transactionTimestamp": "2024-03-08T16:05:12+05:30",
        "gatewayPayerResponseMessage": "FILTERED",
        "customResponse": "{}",
        "type": "MERCHANT_CREDITED_VIA_PAY",
        "gatewayReferenceId": "FILTERED",
        "gatewayPayerResponseCode": "FILTERED",
        "payerVpa": "customer@vpa",
        "refUrl": "https://www.juspay.com/",
        "gatewayResponseStatus": "SUCCESS",
        "payerAccRefId": "Ab7sd7v782342239",
        "gatewayResponseCode": "00",
        "merchantChannelId": "ABCDAPP",
        "payerActype": "SAVINGS",
        "payerIfsc": "ABCD1234",
        "payerName": "CUST",
        "payeeVpa": "ABCD@xyz",
        "gatewayTransactionId": "YJP9999rv9999a99c19a4877ede7954984e",
        "udfParameters": "{}",
        "gatewayResponseMessage": "Your transaction is successful",
        "payerMerchantCustomerId": "customer1",
        "merchantRequestId": "gameskraft-326UD9MKRU6OID5-1",
        "amount": "1.00"
      }
    },
   "merchant_id": "ABCD",
   "id": "ordeu_d002f7536b054b70be39b023976ab736",
   "gateway_reference_id": "111",
   "gateway_id": 514,
   "date_created": "2021-04-09T14:54:33Z",
   "customer_phone": "8867115657",
   "customer_id": "cst_dtadrgpyfovm7oyg",
   "customer_email": "support@juspay.in",
   "currency": "INR",
   "bank_error_message": "",
   "bank_error_code": "",
   "amount_refunded": 0,
   "amount": 1
}
```

## API Responses:
### 200:

#### id:
- Description: Unique ID generated by JusPay for the given order
- Tags: string

#### order_id:
- Description: Given order ID
- Tags: string

#### status:
- Description: Status of order. [Click here](../resources/error-codes) for transaction status codes
- Tags: string

#### status_id:
- Description: Status ID is a numeric id corresponding to the status value, [Click here](../resources/error-codes) for transaction status codes
- Tags: Integer

#### amount:
- Description: The order amount
- Tags: double

#### date_created:
- Description: Order creation timestamp in UTC
- Tags: string

#### customer_email:
- Description: The email Id of the customer passed during order creation
- Tags: string

#### customer_phone:
- Description: The phone number of the customer passed during order creation
- Tags: string

#### customer_id:
- Description: The customer id passed during order creation
- Tags: string

#### merchant_id:
- Description: The merchant id provided by Juspay
- Tags: string

#### currency:
- Description: The currency passed during order creation. Default is INR
- Tags: string

#### product_id:
- Description: The product_id provided during order creation. Empty in case its not passed
- Tags: string

#### txn_id:
- Description: Transaction ID for the payment attempt. Can be used as an identifier at PG end and will be present in reconciliation report.
- Tags: string

#### payment_method_type:
- Description: The payment method type used for transaction. Possible value- UPI
- Tags: string

#### payment_method:
- Description: The payment method used for the transaction. Example- UPI
- Tags: string

#### refunded:
- Description: **true**  if the order has been completely refunded. Will be false for partial refunds or if the order doesn't have any refunds.
- Tags: boolean

#### amount_refunded:
- Description: Amount which has been refunded so far for the given order
- Tags: double

#### txn_uuid:
- Description: The unique id generated by Juspay for a particular transaction. Can be used as an identifier in case of UPI transaction
- Tags: string

#### txn_detail:
- Description: The json object with the details of the transaction
- Tags: JSON

#### payment_gateway_response:
- Description: The json object with the details receive from PG
- Value:
  - **Payment_gateway_response.resp_code**:
    - Description: Unique ID generated by JusPay for the given order
    - Tags: string
  - **Payment_gateway_response.rrn**:
    - Description: The bank reference number provided by the gateway
    - Tags: string
  - **Payment_gateway_response.created**:
    - Description: The transaction creation timestamp
    - Tags: string
  - **Payment_gateway_response.epg_txn_id**:
    - Description: Transaction Id from the underlying gateway
    - Tags: string
  - **Payment_gateway_response.txn_id**:
    - Description: Transaction Id for the payment attempt
    - Tags: string
  - **Payment_gateway_response.resp_message**:
    - Description: The response message provided by the gateway
    - Tags: string
- Tags: JSON

#### gateway_id:
- Description: Gateway Id of the gateway used for performing this transactions
- Value: Example: AXIS_BIZ=511/ YES_BIZ=514/ RBL_BIZ=516
- Tags: integer

#### gateway_reference_id:
- Description: The gateway reference id used for the transaction
- Tags: string

#### upi:
- Description: The json containing the details of the UPI used for the transaction
- Value:
  - **Upi.txn_flow_type**:
    - Description: Transaction Flow type. Example- INAPP
    - Tags: string
  - **Upi.bank_name**:
    - Description: Name of the bank used for the transaction
    - Tags: string
  - **Upi.bank_code**:
    - Description: Code of the bank used for the transaction
    - Tags: boolean
  - **Upi.payer_vpa**:
    - Description: Payer VPA
    - Tags: string
  - **Upi.payer_app**:
    - Description: Payer App
    - Tags: string
- Tags: JSON

#### mandate:
- Description: (Optional) The json containing the details of the mandate in case of mandate transaction
- Tags: JSON
### 400:

#### status:
- Description: Bad Request
- Tags: string

#### error_code:
- Description: Details of keys missing
- Value: Example: Mandatory fields are missing
- Tags: string

#### error_message:
- Description: Further Details of keys missing
- Tags: string
### 401:

#### status:
- Description: error
- Tags: string

#### error_code:
- Description: access_denied
- Tags: string
### 500:

#### status:
- Description: error
- Tags: string

#### error_code:
- Description: Internal server Error
- Tags: string


---

## See Also

- [Scan & Pay (Optional)](https://juspay.io/in/docs/upi-plugin-sdk/android/process-payloads/scan-pay-optional)
- [Mandate execution](https://juspay.io/in/docs/upi-plugin-sdk/android/backend-apis/mandate-execution-1)
