---
page_title: Mandate Updated API
product: API Reference
page_source: https://juspay.io/in/docs/api-reference/docs/express-checkout/mandate-updated-api
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Fapi-reference%2Fdocs%2Fexpress-checkout%2Fmandate-updated-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


# Mandate Update API



**AIM** : Adding a new feature for allowing merchants to update valid fields which are supported for that gateway and payment method type combination.Add new command ‘update’ in the existing /mandate/:mandateId api, which will take a new parameter ‘updated_fields’## Endpoints:
- Sandbox: https://sandbox.juspay.in/mandates/: mandate_id

- Production: https://api.juspay.in/mandates/: mandate_id

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
- Value: Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: Base64 Encoded Username:Password, Required
## Headers:

#### Content-Type:
- Value: application/json
- Tags: String

#### 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 --location 'https://api.juspay.in/mandates/94dc7e48085b11ef92d1' 
--header 'Authorization: Basic <Auth API key>' 
--header 'x-routing-id: customer_1122'\
--header 'Content-Type: application/json' 
--data '{
    "command": "update",
    "updated_fields": {
        "amount": 100,
        "end_date": "1717670006"
    }
}'

```

### Sample Response:

#### Response:
```plaintext
{
    "updatedFields": {
        "end_date": "2061-10-10T00:00:00Z"
    },
    "mandate": {
        "order_id": "bd_1726477951",
        "frequency": "ASPRESENTED",
        "end_date": "2832969600",
        "status": "UPDATE_PENDING",
        "activated_at": "2024-09-16T14:58:08Z",
        "last_activated_at": "2024-09-17T13:08:13Z",
        "amount_rule": "VARIABLE",
        "last_updated": "2024-09-17T13:08:13Z",
        "start_date": "1726477958",
        "mandate_debit_token": "tkn_4d0dc686b85d46b69b5aea078c09c540",
        "customer_id": "cst_t1bbcrzxzofcxkjs",
        "mandate_id": "hTdCX9eFC6EyjttVDJagq2",
        "block_fund": false,
        "currency": "INR",
        "max_amount": 1000,
        "mandate_token": "8f076e2e12004b8bb2478b188ac3202f",
        "rule_value": 1,
        "revokable_by_customer": true,
        "payment_info": {
            "upi": {
                "payer_vpa": "billdesk@vpa"
            },
            "payment_method": "COLLECT",
            "payment_method_type": "UPI"
        },
        "gateway_reference_id": "billuat",
        "mandate_type": "EMANDATE",
        "rule_type": "AFTER"
    },
    "isPending": true
}
```

## Body Parameters:
### Basic Parameters:

#### command:
- Value: update
- Tags: String

#### updated_fields:
- Value:
  - **Amount**:
    - Value: 100
    - Tags: String
  - **End_date**:
    - Value: 1717670006
    - Tags: String
  - **Frequency**:
    - Value: ASPRESENTED
    - Tags: String
- Tags: Object
## API Responses:
### 200:

#### updatedFields:
- Value:
  - **End_date**:
    - Value: 2061-10-10T00:00:00Z
    - Tags: String
- Tags: Object

#### mandate:
- Value:
  - **Order_id**:
    - Value: bd_1726477951
    - Tags: String
  - **Frequency**:
    - Value: ASPRESENTED
    - Tags: String
  - **End_date**:
    - Value: 2832969600
    - Tags: String
  - **Status**:
    - Value: UPDATE_PENDING
    - Tags: String
  - **Activated_at**:
    - Value: 2024-09-16T14:58:08Z
    - Tags: String
  - **Last_activated_at**:
    - Value: 2024-09-17T13:08:13Z
    - Tags: String
  - **Amount_rule**:
    - Value: VARIABLE
    - Tags: String
  - **Last_updated**:
    - Value: 2024-09-17T13:08:13Z
    - Tags: String
  - **Start_date**:
    - Value: 1726477958
    - Tags: String
  - **Mandate_debit_token**:
    - Value: tkn_4d0dc686b85d46b69b5aea078c09c540
    - Tags: String
  - **Customer_id**:
    - Value: cst_t1bbcrzxzofcxkjs
    - Tags: String
  - **Mandate_id**:
    - Value: hTdCX9eFC6EyjttVDJagq2
    - Tags: String
  - **Block_fund**:
    - Value: false
    - Tags: Boolean
  - **Currency**:
    - Value: INR
    - Tags: String
  - **Max_amount**:
    - Value: 1000
    - Tags: String
  - **Mandate_token**:
    - Value: 8f076e2e12004b8bb2478b188ac3202f
    - Tags: String
  - **Rule_value**:
    - Value: 1
    - Tags: String
  - **Revokable_by_customer**:
    - Value: true
    - Tags: Boolean
  - **Payment_info**:
    - Value:
      - **Upi**:
        - Value:
          - **Payer_vpa**:
            - Value: billdesk@vpa
            - Tags: String
        - Tags: Object
      - **Payment_method**:
        - Value: COLLECT
        - Tags: String
      - **Payment_method_type**:
        - Value: UPI
        - Tags: String
    - Tags: Object
  - **Gateway_reference_id**:
    - Value: billuat
    - Tags: String
  - **Mandate_type**:
    - Value: EMANDATE
    - Tags: String
  - **Rule_type**:
    - Value: AFTER
    - Tags: String
- Tags: Object

#### isPending:
- Value: true
- Tags: Boolean


---

## See Also

- [Pause Mandate](https://juspay.io/in/docs/api-reference/docs/express-checkout/pause-mandate)
- [Stop Mandate Execution](https://juspay.io/in/docs/api-reference/docs/express-checkout/stop-mandate-execution)
