---
page_source: https://juspay.io/in/docs/hyper-checkout/web/mandates-subscriptions/basba-one-time-mandate
page_title: BASBA (One Time Mandate)
---

## API Version: default


# One Time Mandate



As per IRDAI notification Insurers are mandated to provide Bima-ASBA as a payment instrument, to ensure that “Premium is collected from the user only after the insurer communicates the acceptance of proposal.”  

As a compliance measure to support Bima-ASBA, Insurers are requested to use, UPI One Time mandates which would block the amount in the User’s account and can be collected by the insurer before the issuance of the Policy.

## Endpoints:
- Sandbox: https://sandbox.juspay.in/session

- Production: https://api.juspay.in/session

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

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

#### x-merchantid:
- Value: yourMerchantId
- Tags: String

#### Content-Type:
- Value: application/json
- Tags: String
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
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": "customer_phone",
    "customer_email": "customer_email",
    "payment_page_client_id":"client_id",
    "return_url": "https://shop.merchant.com",
    "action": "paymentPage",
    "options.create_mandate": "OPTIONAL/REQUIRED",
    "mandate.frequency": "ONETIME",
    "mandate.end_date": "1776073324", // Should not be greater than 14 days from order create date
    "mandate.max_amount": "1000.00",
    "mandate.block_funds": "true"
}'
```

### Sample Response:

#### Response:
```plaintext
{
  "status": "NEW",
  "id": "ordeh_1662a30d94224d4a9a2cdc4c26ee9f37",
  "order_id": "yourUniqueOrderId",
  "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": "10.0",
      "merchantId": "merchant_id",
      "environment": "production",
      "mandate.blockFunds": "true",
      "mandate.frequency": "ONETIME",
      "mandate.maxAmount": "1000.00",
      "mandate.endDate": "1776073324",
      "action": "paymentPage",
      "customerId": "yourUniqueCustId",
      "returnUrl": "https://shop.merchant.com",
      "currency": "INR",
      "customerPhone": "customer_phone",
      "customerEmail": "customer_email",
      "orderId": "yourUniqueOrderId"
    }
  }
}
```

## Body Parameters:
### Basic Parameters:

#### amount:
- Description: Can be equal to the premium amount. It accepts 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.

> **Note**
>  Block will be on the mandate.max_amount.


- Value: 10.00
- Tags: String

#### order_id:
- Description: It is a unique Identifier for the order. It should be Alphanumeric with character length less than 21.
- Value: yourUniqueOrderId
- Tags: String, Required, Max Length : 21 

#### customer_id:
- Description: It is the unique identifier with which merchant refers to a customer object. It is used to access the saved payment methods, allow EMI transactions and setup subscriptions.
- Value: yourUniqueCustId
- Tags: String, Required, Max Length : 128 

#### 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: customer_phone
- Tags: String, Max Length : 300 

#### 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: customer_email
- Tags: String, Max Length : 300 

#### payment_page_client_id:
- Description: A unique identifier of merchant. This is available in welcome e-mail shared by Juspay
- Value: client_id
- 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: https://shop.merchant.com
- Tags: String

#### action:
- Description: Value "paymentPage" is to start the Hypercheckout interface.
- Value: paymentPage
- Tags: String

#### options.create_mandate:
- Description: For merchants who wants to set up mandates, can pass this as either **“REQUIRED”**  or **“OPTIONAL”** . **“REQUIRED”**  means that the transaction for this order has to be definitely converted to a mandate. **“OPTIONAL”**  means that the final decision of conversion of the transaction lies with the user.
- Value:  OPTIONAL/REQUIRED
- Tags: String

#### mandate.frequency:
- Description: Defines the frequency of mandate execution, how often a customer should be charged.Data type **ENUM:** **ONETIME (Supported only by UPI)** By Default it is considered as **ASPRESENTED** 
- Value: ONETIME
- Tags: String

#### mandate.end_date:
- Description: Mandatory for UPI Mandate. 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. By default value will be Mandate start date + 30 years
- Value: 1776073324
- Tags: String

#### mandate.max_amount:
- Description: Maximum amount for a mandate. Required, only when amount type is variable. If amount type is fixed, amount is considered as max amount.
- Value: 1000.00
- 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: true
- Tags: String
## API Responses:
### 200:

#### status:
- Value: NEW
- Tags: String

#### id:
- Value: ordeh_1662a30d94224d4a9a2cdc4c26ee9f37
- Tags: String

#### order_id:
- Value: yourUniqueOrderId
- Tags: String

#### payment_links:
- Value:
  - **Web**:
    - Value: https://api.juspay.in/orders/ordeh_1662a30d94224d4a9a2cdc4c26ee9f37/payment-page
    - Tags: String
- Tags: Object

#### sdk_payload:
- Value:
  - **RequestId**:
    - Value: 76a19a48b9344be683430a99fde5fd8f
    - Tags: String
  - **Service**:
    - Value: in.juspay.hyperpay
    - Tags: String
  - **Payload**:
    - Value:
      - **Options.createMandate**:
        - Value: REQUIRED
        - Tags: String
      - **ClientId**:
        - Value: client_id
        - Tags: String
      - **Amount**:
        - Value: 10.0
        - Tags: String
      - **MerchantId**:
        - Value: merchant_id
        - Tags: String
      - **Environment**:
        - Value: production
        - Tags: String
      - **Mandate.blockFunds**:
        - Value: true
        - Tags: String
      - **Mandate.frequency**:
        - Value: ONETIME
        - Tags: String
      - **Mandate.maxAmount**:
        - Value: 1000.00
        - Tags: String
      - **Mandate.endDate**:
        - Value: 1776073324
        - Tags: String
      - **Action**:
        - Value: paymentPage
        - Tags: String
      - **CustomerId**:
        - Value: yourUniqueCustId
        - Tags: String
      - **ReturnUrl**:
        - Value: https://shop.merchant.com
        - Tags: String
      - **Currency**:
        - Value: INR
        - Tags: String
      - **CustomerPhone**:
        - Value: customer_phone
        - Tags: String
      - **CustomerEmail**:
        - Value: customer_email
        - Tags: String
      - **OrderId**:
        - Value: yourUniqueOrderId
        - Tags: String
    - Tags: Object
- Tags: Object
