---
page_source: https://docs.juspay.io/upi-inapp/android/backend-apis/p2m-transaction-s
page_title: P2M Transaction Status
---

## 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",
    "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",
         "net_amount": 1,
         "gateway_id": 19,
         "gateway": "YES_BIZ",
         "express_checkout": false,
         "error_message": "",
         "error_code": "",
         "currency": "INR",
         "created": "2020-08-30T09:53:17Z"
       },
   "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_flow_type" : "INAPP",
           "masked_bank_account_number": "4XXXXXXXX2323",
           "bank_name": "HDFC bank",
           "bank_code": "HDFC",
           "upi_bank_account_reference_id": "A0760cb548bb4dda9d32e3030863dd5",
           "payer_vpa" : "customer@vpa",
           "payer_app" : "YES_BIZ"
    },//mandate block will be included in case of mandate
  "payment_gateway_response": {
        "resp_code": "00",
        "rrn": null,
        "created": "2021-08-17T13:44:21Z",
        "epg_txn_id": "YJP9999rv9999a99c19a4877ede7954984e",
        "resp_message": "Your transaction is successful",
        "txn_id": "eul7yc7TReHhAyNVsGp"
    },
   "merchant_id": "azharamin",
   "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

#### udf1-udf10:
- Description: The user defined fields passed during order creation. Empty in case 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
- 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.masked_bank_account_number**:
    - Description: Masked bank account number of the account used for the transaction
    - 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.upi_bank_account_reference_id**:
    - Description: Reference Id of the bank account used for the transaction
    - Tags: string
  - **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
