---
page_source: https://juspay.io/in/docs/payment-page-enterprise/web/base-sdk-integration/order-status-api
page_title: Order Status API
---

## API Version: default


## Order Status API



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:
- 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: <p>Example:- <br> MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg== </p> 
- Tags: Base64 Encoded username:password, required
## Headers:

#### x-merchantid:
Merchant ID provided by Juspay
- Value: <p>Example:- <br> merchant-id</p> 
- Tags: string, required

#### version:
Pass the date in YYYY-MM-DD format
- Value: <p>Example:- <br> 2023-01-01 </p> 
- Tags: string, required
## Sample Code Snippets:
### Sample Request:

#### Shell Code Snippet:

```shell
curl --location --request GET 'https://api.juspay.in/orders/<order_id>' \
--header 'x-merchantid: your_merchant_id' \
--header 'version: <current date>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic base_64_encoded_api_key==' 
```

### Sample Response:

#### Card:
```json
{
  "customer_email": "test@gmail.com",
  "customer_phone": "9999999999",
  "customer_id": "testcardenc1",
  "status_id": 21,
  "status": "CHARGED",
  "id": "ordeh_57dfd768bb7d4896bc042y0b90bc9ad77",
  "merchant_id": "merchant_success",
  "amount": 1,
  "currency": "INR",
  "order_id": "JP1636474794",
  "date_created": "2021-11-09T16:19:55Z",
  "return_url": "",
  "product_id": "",
  "payment_links": {
    "iframe": "https://api.juspay.in/merchant/ipay/ordeh_57dfd768bb7d4896bc042y0b90bc9ad77",
    "web": "https://api.juspay.in/merchant/pay/ordeh_57dfd768bb7d4896bc042y0b90bc9ad77",
    "mobile": "https://api.juspay.in/merchant/pay/ordeh_57dfd768bb7d4896bc042y0b90bc9ad77?mobile=true"
  },
  "udf1": "",
  "udf2": "",
  "udf3": "",
  "udf4": "",
  "udf5": "",
  "udf6": "",
  "udf7": "",
  "udf8": "",
  "udf9": "",
  "udf10": "",
  "txn_id": "merchant_success-JP1636474794-1",
  "payment_method_type": "CARD",
  "auth_type": "THREE_DS",
  "card": {
    "expiry_year": "2024",
    "card_reference": "17a2ec4f27c918bd8dbc58c9ae74090e",
    "saved_to_locker": false,
    "expiry_month": "12",
    "name_on_card": "test",
    "card_issuer": "JP Morgan",
    "last_four_digits": "",
    "using_saved_card": true,
    "card_fingerprint": "32qqi3sv1u5237fq7ura2rgqqb",
    "card_isin": "411111",
    "card_type": "CREDIT",
    "card_brand": "VISA",
    "using_token": false
  },
  "payment_method": "VISA",
  "refunded": true,
  "amount_refunded": 1,
  "effective_amount": 1,
  "refunds": [
    {
      "id": "TEST1637681731",
      "amount": 1,
      "unique_request_id": "TEST1637681731",
      "ref": "rfnd_IP693G3wAX4ibJ",
      "created": "2021-11-23T15:35:32Z",
      "status": "SUCCESS",
      "error_message": "processed",
      "sent_to_gateway": true,
      "initiated_by": "API",
      "refund_source": "RAZORPAY",
      "refund_type": "STANDARD",
      "metadata": {
        "speed_processed": "normal",
        "speed_requested": "normal"
      },
      "error_code": "processed"
    }
  ],
  "resp_code": null,
  "resp_message": null,
  "bank_error_code": "",
  "bank_error_message": "",
  "txn_uuid": "eulwh5QbZSBvw35eWnH",
  "txn_detail": {
    "txn_id": "merchant_success-JP1636474794-1",
    "order_id": "JP1636474794",
    "status": "CHARGED",
    "error_code": null,
    "net_amount": 1,
    "surcharge_amount": null,
    "tax_amount": null,
    "txn_amount": 1,
    "offer_deduction_amount": null,
    "gateway_id": 23,
    "currency": "INR",
    "express_checkout": true,
    "redirect": true,
    "txn_uuid": "eulwh5QbZSBvw35eWnH",
    "gateway": "RAZORPAY",
    "error_message": "",
    "created": "2021-11-09T16:20:52Z"
  },
  "payment_gateway_response": {
    "resp_code": "SUCCESS",
    "rrn": "156555",
    "created": "2021-11-09T16:21:11Z",
    "epg_txn_id": "pay_IJZKtTpki24ERy",
    "resp_message": "SUCCESS",
    "auth_id_code": "156555",
    "txn_id": "merchant_success-JP1636474794-1"
  },
  "gateway_id": 23,
  "metadata": {
    "RAZORPAY:gateway_reference_id": "testmid"
  },
  "gateway_reference_id": "testmid",
  "offers": []
}
```

#### Netbanking:
```json
{
  "customer_email": "test@gmail.com",
  "customer_phone": "9876543210",
  "customer_id": "cst_wiqou3224",
  "status_id": 21,
  "status": "CHARGED",
  "id": "ordeh_a3cfc9c7f77e4fc581f19aewe23925",
  "merchant_id": "merchantId",
  "amount": 2,
  "currency": "INR",
  "order_id": "JPAYNEW032",
  "date_created": "2021-09-10T09:01:36Z",
  "return_url": "https://api.juspay.in",
  "product_id": "",
  "payment_links": {
    "iframe": "https://api.juspay.in/merchant/ipay/ordeh_a3cfc9c7f77e4fc581f19aewe23925",
    "web": "https://api.juspay.in/merchant/pay/ordeh_a3cfc9c7f77e4fc581f19aewe23925",
    "mobile": "https://api.juspay.in/merchant/pay/ordeh_a3cfc9c7f77e4fc581f19aewe23925?mobile=true"
  },
  "udf1": "",
  "udf2": "",
  "udf3": "",
  "udf4": "",
  "udf5": "",
  "udf6": "",
  "udf7": "",
  "udf8": "",
  "udf9": "",
  "udf10": "",
  "txn_id": "merchantId-JPAYNEW032-1",
  "payment_method_type": "NB",
  "auth_type": "THREE_DS",
  "payment_method": "NB_HDFC",
  "refunded": false,
  "amount_refunded": 0,
  "effective_amount": 2,
  "resp_code": null,
  "resp_message": null,
  "bank_error_code": "",
  "bank_error_message": "",
  "txn_uuid": "eulbAxqZAR324cwzgo",
  "txn_detail": {
    "txn_id": "merchantId-JPAYNEW032-1",
    "order_id": "JPAYNEW032",
    "status": "CHARGED",
    "error_code": null,
    "net_amount": 2,
    "surcharge_amount": null,
    "tax_amount": null,
    "txn_amount": 2,
    "offer_deduction_amount": null,
    "gateway_id": 12,
    "currency": "INR",
    "express_checkout": false,
    "redirect": true,
    "txn_uuid": "eulbAxqZAR324cwzgo",
    "gateway": "PAYU",
    "error_message": "",
    "created": "2021-09-10T09:02:03Z"
  },
  "payment_gateway_response": {
    "resp_code": "success",
    "rrn": "45903248",
    "created": "2021-09-10T09:02:55Z",
    "epg_txn_id": "40399371553295730",
    "resp_message": "No Error",
    "auth_id_code": "2732147",
    "txn_id": "merchantId-JPAYNEW032-1"
  },
  "gateway_id": 12,
  "gateway_reference_id": null,
  "offers": []
}
```

#### Wallets:
```json
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "txn_uuid": "eulneT9JkaAPa1uv",
  "txn_id": "merchantId-145678234-1",
  "txn_detail": {
    "txn_uuid": "eulneT9JkaAPa1uv",
    "txn_id": "merchantId-145678234-1",
    "txn_amount": 1,
    "tax_amount": null,
    "surcharge_amount": null,
    "status": "CHARGED",
    "redirect": false,
    "order_id": "145678234",
    "net_amount": 1,
    "gateway_id": 19,
    "gateway": "PAYTM_V2",
    "express_checkout": false,
    "error_message": "",
    "error_code": "",
    "currency": "INR",
    "created": "2020-04-28T06:31:37Z"
  },
  "status_id": 21,
  "status": "CHARGED",
  "return_url": "https://api.juspay.in/end",
  "refunds": [
    {
      "unique_request_id": "refund_1590649567",
      "status": "SUCCESS",
      "sent_to_gateway": true,
      "ref": "2020052811128464733807",
      "initiated_by": "API",
      "id": null,
      "error_message": "Refund Successfull",
      "created": "2020-04-28T07:06:07Z",
      "arn": "0149717932",
      "amount": 1
    }
  ],
  "refunded": true,
  "product_id": "",
  "payment_method_type": "WALLET",
  "payment_method": "GOOGLEPAY",
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ordeu_f19a2a9da6034a269f03424dbda0",
    "mobile": "https://api.juspay.in/merchant/pay/ordeu_f19a2a9da6034a269f03424dbda0?mobile=true",
    "iframe": "https://api.juspay.in/merchant/ipay/ordeu_f19a2a9da6034a269f03424dbda0"
  },
  "payment_gateway_response": {
    "txn_id": "merchantId-145678234-1",
    "rrn": "01491223245566834",
    "resp_message": "Txn Success",
    "resp_code": "01",
    "epg_txn_id": "20200528800110849227184",
    "created": "2020-04-28T06:54:35Z",
    "auth_id_code": ""
  },
  "payer_vpa": "null",
  "order_id": "145678234",
  "merchant_id": "merchant_id",
  "id": "ordeu_f19a2a9da6034a269f03424dbda0",
  "gateway_reference_id": "gatewayreferenceId",
  "gateway_id": 19,
  "date_created": "2020-04-28T06:31:09Z",
  "customer_phone": "9999999999",
  "customer_id": "test_customer",
  "customer_email": "test007@gmail.com",
  "currency": "INR",
  "bank_error_message": "",
  "bank_error_code": "",
  "auth_type": "",
  "amount_refunded": 1,
  "amount": 1
}
```

#### UPI:
```json
{
    "customer_email": "test@gmail.com",
    "customer_phone": "9876543210",
    "customer_id": "cst_wiqou3224",
    "status_id": 21,
    "status": "CHARGED",
    "id": "ordeh_ce50b4861d2b4b3e9bf3r3r2rid3”,
    "merchant_id": "merchantId”,
    "amount": 2,
    "currency": "INR",
    "order_id": "JPAYNEW034",
    "date_created": "2021-09-10T09:06:53Z",
    "return_url": "https://api.juspay.in",
    "product_id": "",
    "payment_links": {
        "iframe": "https://api.juspay.in/merchant/ipay/ordeh_ce50b4861d2b4b3e9bf3r3r2rid3",
        "web": "https://api.juspay.in/merchant/pay/ordeh_ce50b4861d2b4b3e9bf3r3r2rid3",
        "mobile": "https://api.juspay.in/merchant/pay/ordeh_ce50b4861d2b4b3e9bf3r3r2rid3?mobile=true"
    },
    "udf1": "",
    "udf2": "",
    "udf3": "",
    "udf4": "",
    "udf5": "",
    "udf6": "",
    "udf7": "",
    "udf8": "",
    "udf9": "",
    "udf10": "",
    "txn_id": "merchantId-JPAYNEW034-1",
    "payment_method_type": "UPI",
    "auth_type": "",
    "payment_method": "UPI",
    "refunded": false,
    "amount_refunded": 0,
    "effective_amount": 2,
    "resp_code": null,
    "resp_message": null,
    "bank_error_code": "",
    "bank_error_message": "",
    "txn_uuid": "eulk1HvJ29o9dJ344x4f",
    "txn_detail": {
        "txn_id": "merchantId-JPAYNEW034-1",
        "order_id": "JPAYNEW034",
        "status": "CHARGED",
        "error_code": null,
        "net_amount": 2,
        "surcharge_amount": null,
        "tax_amount": null,
        "txn_amount": 2,
        "offer_deduction_amount": null,
        "gateway_id": 23,
        "currency": "INR",
        "express_checkout": false,
        "redirect": false,
        "txn_uuid": "eulk1HvJ29o9dJ344x4f",
        "gateway": "RAZORPAY",
        "error_message": "",
        "created": "2021-09-10T09:07:10Z"
    },
    "payment_gateway_response": {
        "resp_code": "captured",
        "rrn": "868709664362",
        "created": "2021-09-10T09:07:39Z",
        "epg_txn_id": "pay_HvhtO3324opPPs",
        "resp_message": "",
        "auth_id_code": "",
        "txn_id": "merchantId-JPAYNEW034-1"
    },
    "gateway_id": 23,
    "payer_vpa": "9876543210@ybl",
    "upi": {
        "payer_vpa": "9876543210@ybl",
        "txn_flow_type": "COLLECT"
    },
    "gateway_reference_id": null,
    "offers": []
}

```

#### Mandate:
```json
{
    "udf9": "",
    "udf8": "",
    "udf7": "",
    "udf6": "",
    "udf5": "",
    "udf4": "",
    "udf3": "",
    "udf2": "",
    "udf10": "",
    "udf1": "",
    "txn_uuid": "eulmyxQn6bQso6y1Syy",
    "txn_id": "juspay-234823498237423894273498-1",
    "txn_detail": {
        "txn_uuid": "eulmyxQn6bQso6y1Syy",
        "txn_object_type": "EMANDATE_REGISTER",
        "txn_id": "juspay-234823498237423894273498-1",
        "txn_amount": 1,
        "tax_amount": null,
        "surcharge_amount": null,
        "status": "CHARGED",
        "source_object_id": "91887",
        "source_object": "MANDATE",
        "redirect": true,
        "order_id": "234823498237423894273498",
        "net_amount": 1,
        "gateway_id": 19,
        "gateway": "PAYTM_V2",
        "express_checkout": false,
        "error_message": "",
        "error_code": "",
        "currency": "INR",
        "created": "2020-08-30T09:53:17Z"
    },
    "status_id": 21,
    "status": "CHARGED",
    "return_url": "https://api.juspay.in",
    "refunded": false,
    "product_id": "",
    "payment_method_type": "UPI",
    "payment_method": "UPI",
    "payment_links": {
        "web": "https://api.juspay.in/merchant/pay/ordeu_9a0929803da644df8036133cf14d0206",
            },
    "payment_gateway_response": {
        "txn_id": "juspay-234823498237423894273498-1",
        "rrn": "4299662",
        "resp_message": "Txn Success",
        "resp_code": "01",
        "epg_txn_id": "202008301131312168187301880189",
        "created": "2020-08-30T09:54:10Z",
        "auth_id_code": ""
    },
    "payer_vpa": "9999999999@paytm",
    "order_id": "234823498237423894273498",
    "metadata": {
        "PAYTM_V2:gateway_reference_id": "upimandate"
    },
    "merchant_id": "juspay",
    "mandate": {
        "start_date": "1598745600",
        "rule_value": 30,
        "rule_type": "AFTER",
        "revokable_by_customer": true,
        "max_amount": 1000,
        "mandate_type": "EMANDATE",
        "mandate_token": "ad1d28b13f460fb5d348487be790f3",
        "mandate_status": "ACTIVE",
        "mandate_id": "3XMEcS1z2212Gq7fbfVYbzj",
        "frequency": "MONTHLY",
        "end_date": "1606521610",
        "block_fund": false,
        "amount_rule": "VARIABLE"
    },
    "id": "ordeu_9a0929803da644df8036133cf14d0206",
    
    "gateway_reference_id": "upimandate",
    "gateway_id": 19,
    "date_created": "2020-08-30T09:47:46Z",
    "customer_phone": "9999999999",
    "customer_id": "cst_lz7zmpemoo5okv",
    "customer_email": "customer@gmail.com",
    "currency": "INR",
    "bank_error_message": "",
    "bank_error_code": "",
    "auth_type": "",
    "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
- Tags: string

#### status_id:
- Description: Status ID is a numeric id corresponding to the status value
- 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

#### return_url:
- Description: The return url provided during order creation
- 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 values are CARD, NB, WALLET, UPI, CONSUMER_FINANCE
- Tags: string

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

#### auth_type:
- Description: Possible values THREE_DS, OTP, VIES
- 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

#### refunds:
- Description: The refund block with the details of refund initiated for the given order.
- Tags: Array

#### 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.auth_id_code**:
    - Description: Auth code provided by the gateway for the transaction.
    - 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
  - **Payment_gateway_response.offer_type**:
    - Description: The type of offer applied provided by the gateway( available only if offers are applied)
    - Tags: string
  - **Payment_gateway_response.offer_availed**:
    - Description: true if the offer is applied at the payment gateway. Else it will be false ( available only if offers are applied)
    - Tags: Boolean
  - **Payment_gateway_response.discount_amount**:
    - Description: The discount amount provided by the gateway for the availed offer ( available only if offers are applied)
    - Tags: Double
- 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: Integer

#### card:
- Description: The json containing the details of the card used for the transaction
- Value:
  - **Card.expiry_year**:
    - Description: The expiry year of the card used for the transaction
    - Tags: string
  - **Card.card_reference**:
    - Description: A reference identifier for the card.
    - Tags: string
  - **Card.expiry_month**:
    - Description: The expiry month of the card used for the transaction
    - Tags: string
  - **Card.saved_to_locker**:
    - Description: true if card was saved to locker, else false
    - Tags: Boolean
  - **Card.name_on_card**:
    - Description: The name on card used for the transaction
    - Tags: string
  - **Card.card_issuer**:
    - Description: Indicates the bank which issued the card
    - Tags: string
  - **Card.last_four_digits**:
    - Description: The last four digit of the card used
    - Tags: string
  - **Card.using_saved_card**:
    - Description: true for saved card transaction. false for new card transaction
    - Tags: Boolean
  - **Card.card_fingerprint**:
    - Description: The unique identifier for the card
    - Tags: string
  - **Card.card_isin**:
    - Description: The first six digit of the card used for the transaction
    - Tags: string
  - **Card.card_type**:
    - Description: Indicates if the card is either CREDIT or DEBIT
    - Tags: string
  - **Card.card_brand**:
    - Description: The provider of the card, can be VISA, RUPAY etc.
    - Tags: string
- Tags: JSON
### 400:

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

#### error_code:
- Description: Details of keys missing
- Value: <p>Example:- <br> Mandatory fields are missing </p>
- 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
