---
page_source: https://juspay.io/in/docs/card-mandates/docs/card-mandate/order-create-api-for-mandate
page_title: Order Create call for Mandates/ Autopay
---


# Order Create call for Mandates/ Autopay



To register mandate, pass mandate related parameters in the Create Order API to create a mandate registration order.


### 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, amount parameter itself will be considered as max 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
  - 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 is not supported by Billdesk and Paytm (For cards)2. In UPI AutoPay, ONETIME frequency, Mandate is valid only for 90 Days
  - 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 for 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. Complete Order Create API Parameters



### Payload
- **Order_id**:
  - Description: Unique Identifier for the order. Should be Alphanumeric with character length less than 21.
  - 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.
  - Value: <p>Example:- <br> 1.00 </p>
  - Tags: Double, required
- **Options.get_client_auth_token**:
  - Description: Client side authenticaion token required for Hyper SDK calls
  - Value: Value : true
  - Tags: string
- **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.
  - Value: <p>Example:- <br> test@gmail.com</p>
  - Tags: string
- **Customer_phone**:
  - Description: Mobile number or fixed line number of the customer. If the backend gateway requires it, then you must send this value.
  - Value: <p>Example:- <br> 9999999912</p>
  - Tags: string
- **Currency**:
  - Description: ISO string of the currency. Use INR for Indian Rupee. Among other accepted values are EUR, USD, GBP. Default value: INR
  - Tags: string
- **Description**:
  - Description: Short description for the order. We send this information to the backend gateways whenever there is a provision for this.
  - Tags: string
- **Return_url**:
  - Description: A fully qualified URL 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 shouldn't contain any query parameters or Ip address. This URL takes higher precedence over the common return URL configured in your account settings.
  - Value: <p>Example:- <br> https://shop.merchant.com </p>
  - Tags: string
- **Product_id**:
  - Description: An identifier for the product. Fits well for impulse purchase usecases.
  - Value: <p>Example:- <br> John </p>
  - Tags: string
- **Gateway_id**:
  - Description: Specify your preferred gateway for this order. Refer to mapping [here](https://docs.juspay.in/resources/docs/dynamic-routing/dynamic-routing#enumerations-and-gateway-ids).
  - Value: <p>Example:- <br> 15 </p>
  - Tags: Number, Tag
- **Billing_address_first_name**:
  - Description: First name in the billing address
  - Tags: string
- **Billing_address_last_name**:
  - Description: Last name in the billing address
  - Tags: string
- **Billing_address_line1
**:
  - Description: Line1 in the billing address
  - Tags: string
- **Billing_address_line2**:
  - Description: Line2 in the billing address
  - Tags: string
- **Billing_address_line3
**:
  - Description: Line3 in the billing address
  - Tags: string
- **Billing_address_city**:
  - Description: Billing address city
  - Tags: string
- **Billing_address_state**:
  - Description: Billing address state
  - Tags: string
- **Billing_address_country**:
  - Description: Billing address country
  - Tags: string
- **Billing_address_postal_code**:
  - Description: Billing address postal code or zip code
  - Tags: string
- **Billing_address_phone**:
  - Description: Mobile or phone number in the billing address
  - Tags: string
- **Billing_address_country_code_iso**:
  - Description: ISO Country code Default value: IND
  - Tags: string
- **Shipping_address_first_name**:
  - Description: First name in the shipping address
  - Tags: string
- **Shipping_address_last_name**:
  - Description: Last name in the shipping address
  - Tags: string
- **Shipping_address_line1**:
  - Description: Line1 in the shipping address
  - Tags: string
- **Shipping_address_line2**:
  - Description: Line2 in the shipping address
  - Tags: string
- **Shipping_address_line3**:
  - Description: Line3 in the shipping address
  - Tags: string
- **Shipping_address_city**:
  - Description: Shipping address city
  - Tags: string
- **Shipping_address_state**:
  - Description: Shipping address state
  - Tags: string
- **Shipping_address_country**:
  - Description: Shipping address country
  - Tags: string
- **Shipping_address_postal_code**:
  - Description: Shipping address postal code or zip code
  - Tags: string
- **Shipping_address_phone**:
  - Description: Mobile or phone number in the shipping address
  - Tags: string
- **Shipping_address_country_code_iso**:
  - Description: ISO Country code Default value: IND
  - Tags: string




## Sample Code Snippets:
### Call Create Mandate Order API:

#### Request Code Snippet:

```request
curl POST 'https://api.juspay.in/orders' \
-H 'x-merchantid: merchant' \
-H ‘'Content-Type: application/x-www-form-urlencoded'\
-d 'order_id=234823498237423894273498' \
-d 'amount=1.00' \
-d 'currency=INR' \
-d 'customer_id=cst_lz7emoo5okgav' \
-d 'customer_email=test@gmail.com' \
-d 'customer_phone=9818638469' \
-d 'options.create_mandate=REQUIRED' \
-d 'mandate.amount_rule=VARIABLE' \
-d 'mandate.max_amount=1000.00' \
-d 'mandate.revokable_by_customer=true' \
-d 'mandate.block_funds=false' \
-d 'mandate.start_date=1598965200' \
-d 'mandate.end_date=1914141600' \
-d 'mandate.frequency=MONTHLY' \
-d 'mandate.rule_value=1' \
-d 'mandate.rule_type=ON' \
-d 'gateway_id=19' \
-d 'metadata.PAYTM_V2:gateway_reference_id=upimandate'

```

### Call Create Mandate Order API:

#### Response:
```json
{
  "status_id": 1,
  "status": "CREATED",
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ordeu_9a0929803da644df8036133cf14d0206",
    "mobile": "https://api.juspay.in/merchant/pay/ordeu_9a0929803da644df8036133cf14d0206?mobile=true",
    "iframe": "https://api.juspay.in/merchant/ipay/ordeu_9a0929803da644df8036133cf14d0206"
  },
  "order_id": "234823498237423894273498",
  "id": "ordeu_9a0929803da644df8036133cf14d0206"
}
```

