---
page_title: Session API payload for Mandate/Autopay
product: upi-autopay
page_source: https://docs.juspay.io/upi-autopay/docs/how-to-integrate/session-api-payload-for-mandateautopay
llms_txt: https://docs.juspay.io/llms.txt
product_llms_txt: https://docs.juspay.io/upi-autopay/llms.txt
---


# Session API payload for Mandate / Autopay



To initiate UPI autopay / mandate registration transaction, pass the following additional Mandate related parameters in the Session API. 

This will open the HyperCheckout screen (Juspay payment page) with mandate supported Payment Methods.


### Step 1.1. Mandate Parameters



### Payload
- **Options.create_mandate**:
  - Description: Enum: 'REQUIRED' , "OPTIONAL'.
    
    Defines what kind mandate support is available during a session. Required to create a Mandate.
    
    Chose between the follow values based upon requirements :-
    
      * REQUIRED : Mandate is must for completing transaction. Only instruments which support Mandate will be shown
      * OPTIONAL : Mandate is a user choice for completing transaction.
  - Value: <p>Example:- <br>OPTIONAL </p>
  - Tags: string, Required
- **Mandate.max_amount**:
  - Description: This is the maximum amount which can be debited via mandate. Required, only when amount type is variable. If amount type is fixed, pass mandate max amount same as the order amount Please be informed that the value assigned to "**mandate.max_amount** " will be displayed to the user when they open any UPI apps for payment. The value assigned to "**amount** " field will be used to show the amount on our Hypercheckout page
  - Value: <p>Example:- <br>1000.0</p>
  - Tags: string, Required
- **Mandate.start_date**:
  - Description: Mandate start date in UNIX EPOCH timestamp (UTC timezone). The start date has to be today's date. 
    
    **Default:**  will be system date
  - Value: <p>Example:- <br>1633087969</p>
  - Tags: string, Optional
- **Mandate.end_date**:
  - Description: Mandate end date in UNIX EPOCH timestamp (UTC timezone). Post end date, mandate will move to **EXPIRED**  state and recurring mandate will not be allowed. **Default:**  will be Mandate start date + 30 years
  - Value: <p>Example:- <br>1633088989</p>
  - Tags: string, Optional
- **Mandate.frequency**:
  - Description: Defines the frequency of mandate execution, how often a customer should be charged.Data type **ENUM:** **ONETIME (Supported only by UPI)** **DAILY** **WEEKLY** **FORTNIGHTLY** **MONTHLY** **BIMONTHLY** **QUARTERLY** **HALFYEARLY** **YEARLY** **ASPRESENTED** 
    
    **Default:** `ASPRESENTED`
    
    **Note:** 1. Daily frequency is not supported by Billdesk and Paytm (For cards)2. In UPI AutoPay, for ONETIME frequency, Mandate is valid only for 90 Days2. GoCashfree gateway supports only `ASPRESENTED`
  - Value: <p>Example:- <br>ASPRESENTED</p>
  - Tags: string
- **Mandate.rule_value**:
  - Description: When frequency is passed as WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY then is it required that the exact day of the period should be passed. 1-7 when frequency is WEEKLY. In weekly, serial numbers start from Monday. Monday represents 1 and Sunday represents 7.
    
    1-16 when frequency is FORTNIGHTLY. This mandate is executed twice a month. First day of the month is represented by value '1' and ends with '15' on 15th day of the month. Then again starts with '1' for 16th of the month and ends with the last day of the month.
    
    1-31 when frequency is MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY.
    
    Not required when frequency is ONETIME, DAILY, ASPRESENTED. For Razorpay, rule_value will be considered as the last date of the week/month/year. 
    
    For Paytm, rule_value will be considered as today's date/day
  - Value: <p>Example:- <br>1</p>
  - Tags: string
- **Mandate.amount_rule**:
  - Description: Defines the amount rule of the recurring debit.
    
    Data type **ENUM: FIXED, VARIABLE** . By default, it is considered as VARIABLE.
  - Value: <p>Example:- <br>FIXED</p>
  - Tags: string
- **Mandate.block_funds**:
  - Description: Set to `true` if funds have to be blocked while a mandate is being created. Should be true for **ONETIME**  and false for **Recurring** . By default value will be **TRUE**  for ONETIME and **FALSE**  for Recurring.
  - Value: <p>Example:- <br>false</p>
  - Tags: Boolean




Please find below the complete list of parameters for this API.


### Step 1.1. Session API Complete Paramaters



### Payload
- **Order_id**:
  - Description: Unique Identifier for the order. Should be Alphanumeric with character length less than 21. 
    
    Make sure to go through [Best Practices for OrderId](https://docs.juspay.in/resources/docs/common-resources/order--transaction)
  - Value: <p>Example:- <br> order-id-9876580 </p>
  - Tags: string, required
- **Amount**:
  - Description: Amount that the customer has to pay. Will accept stringified double or integer values with upto two decimal places. For example, "100.15" and "100" are valid input but "100.1532" is not valid.Minimum value of amount should be INR 1.
  - Value: <p>Example:- <br> 1.00 </p>
  - Tags: string, required
- **Customer_id**:
  - Description: It is the ID with which merchant refers to a customer object. This id is used to access the stored payment methods, allow EMI transactions and setup subscriptions. In case of guest login it should be an empty string.
  - Value: <p>Example:- <br> customer-id-007 </p>
  - Tags: string, required
- **Customer_email**:
  - Description: Email address of the customer. If the backend gateway requires it, then you must send this value.**Constraints :** You are allowed to use alphanumeric characters and the following special characters:`!#$%&'*+-/=?^_.{|}~`@`
    
    `_`and `.` cannot appear at the beginning or end of the local part of the email address (before and after the `@`symbol).
  - Value: <p>Example:- <br> test@gmail.com</p>
  - Tags: string, required
- **Customer_phone**:
  - Description: Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value. We recommend passing a 10-digit number without including the "+91" or any mobile country code at the beginning.
  - Value: <p>Example:- <br> 9999999912</p>
  - Tags: string, required
- **Payment_page_client_id**:
  - Description: A unique identifier of merchant. This is available in welcome e-mail shared by Juspay
  - Value: <p>Example:- <br> sampleMerchantId </p>
  - Tags: string, required
- **Action**:
  - Description: Value "paymentPage" is to start the Hypercheckout interface.Value "paymentManagement" for deleting saved cards and linking/unlinking wallets.
  - Value: <p>Example:- <br> paymentPage </p>
  - Tags: string, required
- **Return_url**:
  - Description: A fully qualified URL on which the customer will be redirected after payment completion. It is also required to provide the control back to SDK after the completion of transaction. This URL takes higher precedence over the common return URL configured in your account settings.
    
    **NOTE** :
    
      1. URL shouldn't contain any query parameters or Ip address.
      2. URL should be a valid HTTPS endpoint that is reachable from Juspay servers.
      3. Return URL should not redirect to a different URL.
      4. Please ensure to pass a valid return URL in the session API call or configure it on the Juspay Dashboard. Not doing the same will lead the SDK not being closed post transaction completion.
  - Value: <p>Example:- <br> https://shop.merchant.com </p>
  - Tags: string
- **First_name**:
  - Description: First Name of customer. This value will be used for customer identification.**Constraints :** You are allowed to use alphanumeric characters and the following special characters: `().-_`
  - Value: <p>Example:- <br> John </p>
  - Tags: string
- **Last_name**:
  - Description: Last name of customer. This value will be used for customer identification.**Constraints :** You are allowed to use alphanumeric characters and the following special characters: `().-_`
  - Value: <p>Example:- <br> Wick </p>
  - Tags: string
- **Description**:
  - Description: Description for order to be displayed to the user on amountBar.
  - Value: <p>Example:- <br> Complete your payment </p>
  - Tags: String
- **Currency**:
  - Description: Currency for the order. Should only be passed when supported by the Payment Gateway and enabled in the Juspay Dashboard within EC Operations → PGCC → Select PG → Edit → Supported Currencies.
    
    **Default Value if not passed:** INR**Note:** The value must be in Uppercase
    
    Example: USD
  - Tags: String, Case Sensitive




## Sample Code Snippets:
### Mandate Registration Session API Request:

#### Request Payload Code Snippet:

```request payload
curl --location --request POST 'https://api.juspay.in/session' \
    --header 'x-merchantid: yourMerchantId' \
    --header 'Authorization: Basic base64encodedkey==' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "amount":"10.00",
    "order_id":"yourUniqueOrderId",
    "customer_id":"yourUniqueCustId",
    "customer_phone":"9876543210",
    "customer_email":"dummyemail@gmail.com",
    "payment_page_client_id":"picasso",
    "action":"paymentPage",
    "options.create_mandate":"OPTIONAL/REQUIRED",
    "mandate.max_amount":"1000.00",
    "mandate.start_date":"1644420442",
    "mandate.end_date":"1646234827"
}'

```

### Mandate Registration Session API Response:

#### Response Payload:
```json
{
  "status": "NEW",
  "id": "ordeh_1662a30d94224d4a9a2cdc4c26ee9f37",
  "order_id": "FC37B98B00",
  "payment_links": {
    "web": 
    "https://api.juspay.in/orders/ordeh_1662a30d94224d4a9a2cdc4c26ee9f37/payment-page"
  },
  "sdk_payload": {
    "requestId": "76a19a48b9344be683430a99fde5fd8f",
    "service": "in.juspay.hyperpay",
    "payload": {
      "options.createMandate": "REQUIRED",
      "clientId": "client_id",
      "amount": "2.0",
      "merchantId": "merchant_id",
      "environment": "production",
      "mandate.maxAmount": "10.00",
      "mandate.endDate": "1646234827",
      "action": "paymentPage",
      "customerId": "yourUniqueCustId",
      "returnUrl": "http://localhost:3111/dashboard/systems/orderStatus",
      "mandate.startDate": "1644420442",
      "currency": "INR",
      "customerPhone": "9876543210",
      "customerEmail": "dummyemail@gmail.com",
      "orderId": "yourUniqueOrderId"
    }
  }
}

```

