---
page_source: https://juspay.io/br/docs/hypercheckout-global/web/mandates/mandate-registration-1
page_title: Mandate Registration
---


# Mandate Registration



To register mandate, pass mandate related parameters in the Create Order API to create a mandate registration order. Post transaction completion, use Order Status API and Webhooks to capture mandate registration details.

> **Note**
> CVV Less flow is not applicable for Mandate registration using saved cards & CVV is mandatory in these cases.




### Step 1.1. Create Order with Mandate Details


Pass mandate related parameters in [Create Order API](https://juspay.io/br/docs/hypercheckout-global/web/mandates/mandates-create-order-api). Make sure all the required fields for mandates are passed correctly.




### Step 1.2. Render Checkout Screen with Mandate supported payment methods


Call the [Payment Methods API](https://juspay.io/br/docs/hypercheckout-global/web/base-sdk-integration/payment-methods) keeping value for `options.add_emandate_payment_methods` as true to fetch payment methods that support mandates. 




### Step 1.3. Initiate Transaction


Follow Step 4: Initiate the transaction based on the selected payment method with mandate related parameters. Additional mandate parameters are included in [Mandate Registration API](https://juspay.io/br/docs/hypercheckout-global/web/mandates/mandate-registration-api)Additionally,

* For mandates on cards - Call [Card Info API](https://juspay.io/br/docs/hypercheckout-global/web/base-sdk-integration/card-info) to validate if the customer's card is eligible for mandates.




### Step 1.4. Handle Payment Response with Mandate Details


Mandate status will be sent in the Order Status API and Webhook.

In order to retrieve the mandate details in the [Order Status API](https://juspay.io/br/docs/hypercheckout-global/web/base-sdk-integration/order-status-api) and [Webhooks](https://juspay.io/br/docs/hypercheckout-global/web/base-sdk-integration/webhooks) , you should consume the mandate block that comes in the response. Some important parameters to look out for include `mandate_id`, `mandate_status`, and `mandate_token`. Along with Order and Transaction related webhooks, you will also receive mandate-specific webhooks which are: `Mandate Created`, `Mandate Active` and `Mandate Failed` webhooks. These webhooks will provide you with additional information about the mandate. It's important to handle these webhooks to ensure that the mandate is properly managed.



## Sample Code Snippets:
### Requests:

#### Step 1: Call Create Mandate Order API Code Snippet:

```step 1: call create mandate order api
curl --location 'https://api.sandbox.juspay.io/session' \
--header 'x-merchantid: MID \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic OTRDRDg1xxxxxxxxDE0MTI4Og==' \
--data-raw '{
    "order_id": "order1750934216",
    "amount": "10",
    "customer_id": "123123123331",
    "customer_phone": "9876543210",
    "customer_email":"test@gmail.com",
    "payment_page_client_id": "clientID",
    "action": "paymentPage",
    "description": "Complete your payment",
    "first_name": "John",
    "last_name": "wick",
    "currency":"BRL",
    "shipping_address_last_name":"NOME DO TITULAR",
    "billing_address_first_name":"NOME DO TITULAR",
    "shipping_address_country_code_iso":"BR",
    "billing_address_last_name":"al",
    "shipping_address_state":"RJ",
    "billing_address_state":"RJ",
    "billing_address_line1":"512",
    "billing_address_line2":"Alameda Xingu",
    "billing_address_line3":"Alphaville",
    "billing_address_postal_code":"20020080",
    "billing_address_country_code_iso":"BR",
    "billing_address_country":"BRA",
    "billing_address_phone":"9988775566",
    "billing_address_city":"São Paulo",
    "Metadata.txns.allow_card_no_3ds":"true", // true for No 3ds and False for 3ds 
    "options.create_mandate":"OPTIONAL",
    "mandate.amount_rule":"VARIABLE",
    "mandate.max_amount":"20.00",
    "mandate.frequency":"MONTHLY", 
    "mandate.rule_value":"5",
    "mandate.rule_type":"ON",
    "metadata.CIELO:authorizeNow":"true"
} '
```

#### Step 2: Call Payment Methods API Code Snippet:

```step 2: call payment methods api
curl -X GET https://api.juspay.io/merchants/guest/paymentmethods?options.add_emandate_payment_methods=true
```

#### Step 3a: Call Card Info API Code Snippet:

```step 3a: call card info api
curl --location --request GET 'https://api.juspay.io/cardbins/424242?merchant_id=merchantId&options.check_mandate_support=true'
```

#### Step 4: Get Mandate Order status Code Snippet:

```step 4: get mandate order status
curl GET 'https://api.juspay.io/orders/{{order_id}}' \
--header 'x-merchantid: merchant_id' \
--header 'Authorization: Basic <base64 of key:>'
```

### Responses:

#### Step 1: Call Create Mandate Order API:
```plaintext
{
    "status": "NEW",
    "id": "ordeh_f430b0c32e9xxxxxxx963d18a99",
    "order_id": "ORDER1751024094",
    "payment_links": {
        "web": "https://payments.sandbox.juspay.io/payment-page/order/ordeh_f430b0c32e9xxxxxxx963d18a99",
        "expiry": null
    },
    "sdk_payload": {
        "requestId": "dc5606d913be4523a8ae337a6144172a",
        "service": "in.juspay.hyperpay",
        "payload": {
            "mandate.frequency": "MONTHLY",
            "billingAddressLine1": "512",
            "shippingAddressState": "RJ",
            "billingAddressCountryCodeIso": "BR",
            "mandate.ruleType": "ON",
            "firstName": "John",
            "metadata.txns.allowCardNo3ds": "true",
            "billingAddressLine3": "Alphaville",
            "clientId": "clientId",
            "billingAddressFirstName": "NOME DO TITULAR",
            "billingAddressLastName": "al",
            "customerId": "123123123331",
            "shippingAddressCountryCodeIso": "BR",
            "mandate.amountRule": "VARIABLE",
            "billingAddressPostalCode": "20020080",
            "metadata.CIELO:aauthorizenow": true,
            "orderId": "ORDER1751024094",
            "currency": "BRL",
            "customerEmail": "test@gmail.com",
            "customerPhone": "9876543210",
            "service": "in.juspay.hyperpay",
            "description": "Complete your payment",
            "options.createMandate": "OPTIONAL",
            "mandate.maxAmount": "1000.00",
            "shippingAddressLastName": "NOME DO TITULAR",
            "environment": "sandbox",
            "billingAddressCity": "São Paulo",
            "lastName": "wick",
            "merchantId": "MID",
            "amount": "10.0",
            "billingAddressCountry": "BRA",
            "clientAuthTokenExpiry": "2025-06-27T11:49:54Z",
            "billingAddressState": "RJ",
            "billingAddressPhone": "9988775566",
            "billingAddressLine2": "Alameda Xingu",
            "mandate.ruleValue": "5",
            "clientAuthToken": "tkn_955398ef328f4f379cefacc6d5dc93ff",
            "action": "paymentPage",
            "collectAvsInfo": false
        }
    }
}
```

#### Step 2: Call Payment Methods API:
```plaintext
{
  "payment_methods": [
    {
      "description": "Visa",
      "payment_method": "VISA",
      "payment_method_type": "CARD"
    },
    {
      "description": "Mastercard",
      "payment_method": "MASTER",
      "payment_method_type": "CARD"
    }
  ],
  "emandate_payment_methods": [
    {
      "payment_method_type": "NB",
      "payment_method": "JP_ITAU",
      "description": "ITAU Bank"
    },
  ]
}
```

#### Step 3a: Call Card Info API:
```plaintext
{
  "id": "541919",
  "card_sub_type": "PLATINUM",
  "mandate_support": true,
  "brand": "MASTERCARD",
  "bank": "ITAU Bank",
  "object": "cardbin",
  "type": "CREDIT",
  "juspay_bank_code": "JP_ITAU",
  "country": "Brazil"
}
```

#### Step 4: Get Mandate Order status:
```plaintext
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "txn_uuid": "eulmyxQn6bQso6y1Syy",
  "txn_id": "juspay-234823498237423894273498-1",
  "txn_detail": {
    "txn_uuid": "eulmyxQn6bQso6y1Syy",
    "txn_object_type": "EMANDATE_REGISTER",
    "txn_id": "juspay-234823498237423894273498-1",
    "txn_amount": 1,
    "tax_amount": null,
    "surcharge_amount": null,
    "status": "CHARGED",
    "source_object_id": "91887",
    "source_object": "MANDATE",
    "redirect": true,
    "order_id": "234823498237423894273498",
    "net_amount": 1,
    "gateway_id": 19,
    "gateway": "CIELO",
    "express_checkout": false,
    "error_message": "",
    "error_code": "",
    "currency": "BRL",
    "created": "2020-08-30T09:53:17Z"
  },
  "status_id": 21,
  "status": "CHARGED",
  "return_url": "https://api.juspay.io",
  "refunded": false,
  "product_id": "",
  "payment_method_type": "PIX",
  "payment_method": "PIX",
  "payment_links": {
    "web": "https://api.juspay.io/merchant/pay/ordeu_9a0929803da644df8036133cf14d0206"
  },
  "payment_gateway_response": {
    "txn_id": "juspay-234823498237423894273498-1",
    "rrn": "4299662",
    "resp_message": "Txn Success",
    "resp_code": "01",
    "epg_txn_id": "202008301131312168187301880189",
    "created": "2020-08-30T09:54:10Z",
    "auth_id_code": ""
  },
  "order_id": "234823498237423894273498",
  "merchant_id": "juspay",
  "mandate": {
    "start_date": "1598745600",
    "rule_value": 30,
    "rule_type": "AFTER",
    "revokable_by_customer": true,
    "max_amount": 1000,
    "mandate_type": "EMANDATE",
    "mandate_token": "ad1d28b13f460fb5d348487be790f3",
    "mandate_status": "ACTIVE",
    "mandate_id": "3XMEcS1z2212Gq7fbfVYbzj",
    "frequency": "MONTHLY",
    "end_date": "1606521610",
    "block_fund": false,
    "amount_rule": "VARIABLE"
  },
  "id": "ordeu_9a0929803da644df8036133cf14d0206",
  "gateway_reference_id": "test",
  "gateway_id": 19,
  "date_created": "2020-08-30T09:47:46Z",
  "customer_phone": "9999999999",
  "customer_id": "cst_lz7zmpemoo5okv",
  "customer_email": "customer@gmail.com",
  "currency": "BRL",
  "bank_error_message": "",
  "bank_error_code": "",
  "auth_type": "",
  "amount_refunded": 0,
  "amount": 1
}
```

