---
page_source: https://docs.juspay.io/paytm-gateway-configuration/docs/express-checkout/update-order-api
page_title: Update Order API
---

## 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:
- 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:
The merchant_id/username that you hold at Juspay
- 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 '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": "98765432",
  "customer_id": "cst_wiqou3224",
  "status_id": 10,
  "status": "NEW",
  "id": "ordeh_4b9501d714624eretry677i",
  "merchant_id": "merchantId",
  "amount": 90,
  "currency": "SGD",
  "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": []
}
```

## 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: 98765432
- 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: SGD, IDR, INR, USD
- 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
