---
page_source: https://juspay.io/in/docs/upi-merchant-stack/docs/mandates/web-update
page_title: Web Update
---

## API Version: default


## **Web Update** 



This api will be used for updating or revoking the mandate which is already created by Merchant to the Payer. Only **validityEnd**  and **amount**  of the original mandate can be updated. Either one of the two parameters is necessary when requestType is "UPDATE".

> **Note**
> For mandates created through Register Intent, merchant can revoke the mandates but can not update.

## Endpoints:
- Production: {{host}}/api/{{uri}}/merchants/mandates/webUpdate

## Request Type: 
POST

## Headers:

#### jpupi-routing-id:
Header value should be same as of **originalMerchantRequestId**  sent in request body
- Tags: String, Mandatory
## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
{"success":false,"message":"No Data found for the given path"}
```

### Sample Request and Response:

#### Request:
```json
{"success":false,"message":"No Data found for the given path"}
```

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

## Body Parameters:
### Request parameters:

#### amount:
- Description: Amount for mandate. Only required if amount needs to be updated.

**Constraints:** Amount in two decimals. Decimals are mandatory.
- Value: value
- Tags: String, conditional

#### makeAsync:
- Description: Denotes whether the API call will be done in synchronous or asynchronous manner. If it is not passed by default API call will be in synchronous. It is not required if requestType is **UPDATE**  as it will be default async as it requires approval from Customer.

**Constraints:** true,false
- Tags: String, optional

#### mandateRequestExpiryMinutes:
- Description: Minutes for which request is valid

**Format:** A number between 1 to 64800, both inclusive, in String format.
- Tags: String, Mandatory

#### merchantRequestId:
- Description: Merchant generated unique id for **this particular request.** 

**Constraint:** Max 35 characters alphanumeric, can also contain hyphen(-), dot(.) & underscore(_)
- Tags: String, Mandatory

#### remarks:
- Description: Any mandate summary.**Constraint:** The transaction note must be alphanumeric, with a **minimum length of 1 character and a maximum length of 50**  characters.
- Tags: String, optional

#### requestType:
- Description: differentiate the request for UPDATE and REVOKE

**Constraints:** String but allowed values are only UPDATE and REVOKE
- Tags: String, Mandatory

#### validityEnd:
- Description: Date after which mandate cannot be executed. Only required if validity end date needs to be updated for mandate and requestType is UPDATE. Either validityEnd or amount has to be passed.

**Format:** String with proper date format YYYY/MM/DD
- Tags: String, conditional

#### originalMerchantRequestId:
- Description: Merchant request of the **original create mandate request.** 
- Tags: String, Optional But Mandatory For New Integration

#### iat:
- Description: Current Epoch Unix timestamp string. Has to be of 13 digit in Milliseconds.

Example: 1496918882000.
- Tags: String, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

**Example** : "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"**Note** : Few special characters are not allowed. Regex for the characters which are not allowed : **^[^/#-()*!%~`]+$** 
- Tags: Stringified JSON, Optional
## API Responses:
### 200:

#### status:
- Description: Status of the API.

**Values:** SUCCESS, FAILURE
- Tags: String, Mandatory

#### responseCode:
- Description: PSP response code for the API.

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### responseMessage:
- Description: PSP response message for the API.

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **Amount**:
    - Description: Updated amount for mandate. If only validityEnd is updated then amount will be same as it was passed during creation of mandate.
      
      **Values:** Numeric
    - Tags: String, Conditional
  - **CustomerVpa**:
    - Description: VPA on which request mandate should be triggered
      
      **Values:** Vpa for which mandate was requested during webMandate
    - Tags: String, Mandatory
  - **Expiry**:
    - Description: Minutes for which request is valid
      
      **Format:** Timestamp in YYYY-MM-DDTHH:MM:SS+05:30 format, request timestamp plus expiry minutes passed in request.
    - Tags: String, Mandatory
  - **GatewayMandateId**:
    - Description: UPI request id returned by gateway for the mandate
      
      **Values:** As passed for upiRequestId in request
    - Tags: String, Mandatory
  - **GatewayResponseCode**:
    - Description: Response code returned by gateway for the transaction.
      
      **Values:** 00
    - Tags: String, Mandatory
  - **GatewayResponseMessage**:
    - Description: Response message returned by gateway for the transaction.
    - Tags: String, Mandatory
  - **GatewayResponseStatus**:
    - Description: Response status returned by gateway.
      
      **Values:** SUCCESS, FAILURE
    - Tags: String, Mandatory
  - **MakeAsync**:
    - Description: Denotes whether the API call will be done in synchronous or asynchronous manner
      
      **Values:** Only present if passed in reqBody and same value as in request.
    - Tags: String, optional
  - **MandateName**:
    - Description: Name of the mandate
      
      **Values:** Name of the mandate
    - Tags: String, Mandatory
  - **MandateTimestamp**:
    - Description: Timestamp of when the webMandate was initiated
      
      **Format:** (YYYY-MM-DDTHH:MM:SS+05:30)
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Unique id for the channel via which request is made.
      
      **Values:** As passed in request.
    - Tags: String, Mandatory
  - **MerchantId**:
    - Description: Unique id for merchant.
      
      **Values:** As passed in request.
    - Tags: String, Mandatory
  - **MerchantRequestId**:
    - Description: Merchant generated unique id for collect request.
      
      **Constraint** : Max 35 characters & Alphanumeric.
    - Tags: String, Mandatory
  - **OrgMandateId**:
    - Description: gatewayMandateId returned in create mandate
      
      **Values:** As passed in request
    - Tags: String, Mandatory
  - **Remarks**:
    - Description: Any mandate summary. If pssed in request, it will be same in response else a default value is send.
    - Tags: String, Mandatory
  - **Umn**:
    - Description: Vpa used for execution of mandate.
    - Tags: String, Mandatory
  - **ValidityEnd**:
    - Description: Updated date before which mandate can be executed. If only amount is updated then validityEnd will be same as it was passed during creation of mandate.
      
      **Format:** String with proper date format YYYY/MM/DD.
    - Tags: String, Mandatory
  - **OriginalMerchantRequestId**:
    - Description: Merchant request id of the original mandate
    - Tags: String, optional
  - **MandateType**:
    - Description: requestType as sent in Request body
    - Tags: String, optional
- Tags: json, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: Stringified JSON, optional
