---
page_title: Update Order API
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/express-checkout/update-order-api
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fexpress-checkout%2Fupdate-order-api
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/api-reference/llms.txt
---

## API Version: default


# Update Order



Update an order that has already been created. The only amount, address and UDF fields can be updated. Address fields can be optionally sent as explained in the `/orders` API.The API response is similar to that of the order create API.

> **Note**
> Update order is not recommended once the transaction is initiated to PG. Updating the order amount might lead to order amount mismatch (In case there are retry allowed on same order id).

## Endpoints:
- Sandbox: https://sandbox.juspay.in/orders/{order_id}

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

## Request Type: 
POST

## Authorization:

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

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value:  <p>Example:- <br> Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==</p>
- Tags: Base64 Encoded Username:Password, Mandatory
## Headers:

#### Content-Type:
application/x-www-form-urlencoded
- Tags: string

#### x-merchantid:
Merchant ID provided by Juspay
- Tags: string, Required

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl -X POST https://api.juspay.in/orders/JPAYNEW035 \
-u your_api_key: \
-H 'x-routing-id: customer_1122'\
-H 'Content-Type: application/x-www-form-urlencoded'\
-H 'x-merchantid: merchant_id'\
-d "amount=90.00"

```

### Sample Response:

#### Response:
```json
{
  "customer_email": "test@gmail.com",
  "customer_phone": "9876543210",
  "customer_id": "cst_wiqou3224",
  "status_id": 10,
  "status": "NEW",
  "id": "ordeh_4b9501d714624eretry677i",
  "merchant_id": "merchantId",
  "amount": 90,
  "currency": "INR",
  "order_id": "JPAYNEW035",
  "date_created": "2021-09-10T09:24:06Z",
  "return_url": "https://api.juspay.in",
  "product_id": "",
  "payment_links": {
    "iframe": "https://api.juspay.in/merchant/ipay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59",
    "web": "https://api.juspay.in/merchant/pay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59",
    "mobile": "https://api.juspay.in/merchant/pay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59?mobile=true"
  },
  "udf1": "",
  "udf2": "",
  "udf3": "",
  "udf4": "",
  "udf5": "",
  "udf6": "",
  "udf7": "",
  "udf8": "",
  "udf9": "",
  "udf10": "",
  "refunded": false,
  "amount_refunded": 0,
  "effective_amount": 3,
  "offers": []
}
```

## Path Parameters:

#### order_id:
Order Id of the order for which you want to update
- Value:  Example:- JPAYNEW035
- Tags: String, Mandatory
## Body Parameters:
### Parameters:

#### amount:
- Description: New amount value
- Tags: Double, Required
## API Responses:
### 200:

#### customer_email:
- Description: test@gmail.com
- Tags: string

#### customer_phone:
- Description: 9876543210
- Tags: string

#### customer_id:
- Description: cst_wiqou3224
- Tags: string

#### status_id:
- Tags: integer

#### status:
- Description: NEW
- Tags: string

#### id:
- Description: ordeh_4b9501d714624eretry677i
- Tags: string

#### merchant_id:
- Description: merchantId
- Tags: string

#### amount:
- Tags: integer

#### currency:
- Description: INR
- Tags: string

#### order_id:
- Description: JPAYNEW035
- Tags: string

#### date_created:
- Description: 2021-09-10T09:24:06Z
- Tags: string

#### return_url:
- Description: https://api.juspay.in
- Tags: string

#### product_id:
- Tags: string

#### payment_links:
- Value:
  - **Iframe**:
    - Description: https://api.juspay.in/merchant/ipay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59
    - Tags: string
  - **Web**:
    - Description: https://api.juspay.in/merchant/pay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59
    - Tags: string
  - **Mobile**:
    - Description: https://api.juspay.in/merchant/pay/ordeh_4b9501d7146243ac8a9d9c4a42ed7b59?mobile=true
    - Tags: string
- Tags: object

#### udf1:
- Tags: string

#### udf2:
- Tags: string

#### udf3:
- Tags: string

#### udf4:
- Tags: string

#### udf5:
- Tags: string

#### udf6:
- Tags: string

#### udf7:
- Tags: string

#### udf8:
- Tags: string

#### udf9:
- Tags: string

#### udf10:
- Tags: string

#### refunded:
- Tags: boolean

#### amount_refunded:
- Tags: integer

#### effective_amount:
- Tags: integer

#### offers:
- Tags: array
### 400:

#### object:
- Description: {}
- Tags: Object



### API Latency Guidelines




#### **What is API Latency?** 



Time taken by the server to respond to the API request.


#### **Average API Percentile Metrics and Recommended Timeout** 



**TP50 (ms)** : This represents the median latency, meaning 50% of all requests are completed in this time or less. It indicates the typical performance experienced by the majority of users.

**TP90 (ms)** : This value shows that 90% of requests are completed within this time, leaving 10% of requests that take longer. It gives insight into the performance for a broader set of users, beyond the median.

**TP99 (ms)** : This value indicates that 99% of requests finish within this time, with only 1% of requests taking longer. It helps identify outlier cases where latency may become an issue for a small group of users.

**TP99.9 (ms)** : This metric captures extreme latency outliers, where only 0.1% of requests take longer than this value. It’s useful for understanding edge cases where performance degrades for very few users.

**TP99.99 (ms)** : This measures the most rare and severe performance outliers, where just 0.01% of requests exceed this time. Monitoring this helps in addressing the rarest and most critical latency issues that may impact user experience in exceptional scenarios.


|  Transaction Percentile |  Latency (ms) |
|---|---|
|  TP50 (ms) | 19.85 |
|  TP90 (ms) | 290.28 |
|  TP99 (ms) | 429.57 |
|  TP99.9 (ms) | 574 |
| Recommended Timeout(ms) | 1000 |


> **Warning**
> The recommended timeouts are based on TP99.9 data, though edge cases (0.01% of requests) may still exceed these limits and are captured in the TP99.99 data as shown below.
> 
> 
> |  Transaction Percentile |  Latency (ms) |
> |---|---|
> |  TP99.99 (ms) | 1075.28 |
> | Recommended Timeout(ms) | 2000 |
> 



---

## See Also

- [Order Status API](https://juspay.io/in/docs/api-reference/docs/express-checkout/order-status-api)
- [Order Fulfillment API](https://juspay.io/in/docs/api-reference/docs/express-checkout/order-fulfillment-api)
