---
page_source: https://juspay.io/sea/docs/express-checkout-sdk-global/react-native/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.


### Step 1.1. Create Order with Mandate Details


Pass mandate related parameters in [Create Order API](https://juspay.io/sea/docs/express-checkout-sdk-global/android/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/sea/docs/express-checkout-sdk-global/react-native/mandates/payment-methods-api) keeping value for `options.add_emandate_payment_methods` as true to fetch payment methods that support mandates. Supported Payment Methods include Card and Wallet.




### Step 1.3. Initiate Transaction


Follow [Step 5.2: Transaction Initiation](https://juspay.io/sea/docs/express-checkout-sdk-global/react-native/base-sdk-integration/making-a-payment#5.2.-Transaction-Initiation) of the base integration process. Make sure to pass `shouldCreateMandate` as true in the process payload for the selected payment method in order to create a mandate registration. Additionally,

* For mandates on cards - Call [Card Info API](https://juspay.io/sea/docs/express-checkout-sdk-global/react-native/mandates/card-info-api) to validate if the customer's card is eligible for mandates.
  
  
  #### Sample Process Payload (Cards) Code Snippet:
  
  ```sample process payload (cards)
  {
      "requestId": "9ce6c34b-d200-4222-a2d7-13d683ac4a4d",
      "service": "in.juspay.hyperapi",
      "payload": {
        "clientAuthToken": "tkn_997d200379944f8fa0c21c6b8dad8221",
        "action": "cardTxn",
        "orderId": "hyperorder79736",
        "paymentMethod": "VISA",
        "cardNumber": "4**************4",
        "cardExpMonth": "04",
        "cardExpYear": "26",
        "cardSecurityCode": "***",
        "shouldCreateMandate": true,
        "saveToLocker": true,
        "merchantId": "picasso"
      }
  }
  ```




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


Post the transaction is completed, follow [Step 6](https://juspay.io/sea/docs/express-checkout-sdk-global/react-native/base-sdk-integration/handling-payment-response) of the Base Integration to handle the transaction response. 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/sea/docs/express-checkout-sdk-global/react-native/mandates/order-status-api) and [Webhooks](https://juspay.io/sea/docs/express-checkout-sdk-global/react-native/mandates/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 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=SGD' \
-d 'customer_id=cst_lz7emoo5okgav' \
-d 'customer_email=test@gmail.com' \
-d 'customer_phone=9818638469' \
-d 'billing_address_first_name=Name' \
-d 'billing_address_city=Bengaluru' \
-d 'shipping_address_city=Mumbai' \
-d 'shipping_address_first_name=Name' \
-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.OVO:gateway_reference_id=mandate'

```

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

```step 2: call payment methods api
curl --location --request GET 'https://api.juspay.in/cardbins/424242?merchant_id=merchantId&options.check_mandate_support=true'
```

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

```step 3a: call card info api
curl --location --request GET 'https://api.juspay.in/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.in/orders/{{order_id}}' \
--header 'x-merchantid: merchant_id' \
--header 'Authorization: Basic <base64 of key:>'
--header 'version: 2020-12-31'
```

### Responses:

#### Step 2: Call Payment Methods API:
```plaintext
{
  "id": "541919",
  "card_sub_type": "PLATINUM",
  "mandate_support": true,
  "brand": "MASTERCARD",
  "bank": "JP MORGAN",
  "object": "cardbin",
  "type": "DEBIT",
  "juspay_bank_code": "JP_X",
  "country": "SINGAPORE"
}
```

#### Step 3a: Call Card Info API:
```plaintext
{
  "id": "541919",
  "card_sub_type": "PLATINUM",
  "mandate_support": true,
  "brand": "MASTERCARD",
  "bank": "HDFC Bank",
  "object": "cardbin",
  "type": "DEBIT",
  "juspay_bank_code": "JP_HDFC",
  "country": "INDIA"
}
```

#### Step 4: Get Mandate Order status:
```plaintext
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "txn_uuid": "eulgDkyqPb1qjey713",
  "txn_id": "merchantId-juspay12281-1",
  "txn_detail": {
    "txn_uuid": "eulgDkyqPb1qjey713",
    "txn_object_type": "MANDATE_REGISTER",
    "txn_id": "merchantId-juspay12281-1",
    "txn_amount": 3,
    "tax_amount": null,
    "surcharge_amount": null,
    "status": "CHARGED",
    "source_object_id": "291",
    "source_object": "MANDATE",
    "redirect": true,
    "order_id": "juspay12281",
    "net_amount": 3,
    "gateway_id": 27,
    "gateway": "BILLDESK",
    "express_checkout": false,
    "error_message": "",
    "error_code": "",
    "currency": "SGD",
    "created": "2021-11-27T12:33:12Z"
  },
  "status_id": 21,
  "status": "CHARGED",
  "return_url": "http://www.juspay.inwsws",
  "refunded": false,
  "product_id": "",
  "payment_method_type": "CARD",
  "payment_method": "VISA",
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ordeu_c1c4139c20a84fa799d1c41cdfbwsws",
    "mobile": "https://api.juspay.in/merchant/pay/ordeu_c1c4139c20a84fa799d1c41cdfb?mobile=truewsws",
    "iframe": "https://api.juspay.in/merchant/ipay/ordeu_c1c4139c20a84fa799d1c41cdfb"
  },
  "payment_gateway_response": {
    "txn_id": "merchantId-juspay12281-1",
    "rrn": "123456",
    "resp_message": "success. Transaction Successful",
    "resp_code": "0300",
    "epg_txn_id": "U4560000327840",
    "created": "2021-11-27T12:34:26Z",
    "auth_id_code": "null"
  },
  "order_id": "juspay12281",
  "offers": [],
  "metadata": {
    "BILLDESK:gateway_reference_id": "billdesk-si-sdx-recurring1"
  },
  "merchant_id": "merchantId",
  "mandate": {
    "start_date": "1638008221",
    "revokable_by_customer": true,
    "max_amount": 100,
    "mandate_type": "MANDATE",
    "mandate_token": "1ceb1dca387e4bbe94343036c",
    "mandate_status": "ACTIVE",
    "mandate_id": "aViohAd242mhkMqT8r5UiwHz",
    "frequency": "ASPRESENTED",
    "end_date": "1640633435",
    "block_fund": false,
    "amount_rule": "VARIABLE"
  },
  "id": "ordeu_c1c4139c20a84fa799d1c41cdfb",
  "gateway_reference_id": "billdesk-si-sdx-recurring1",
  "gateway_id": 27,
  "effective_amount": 3,
  "date_created": "2021-11-27T12:30:49Z",
  "customer_phone": "98743210",
  "customer_id": "cst_zqqmw0vrfbhvvj2zzdzg",
  "customer_email": "test@juspay.in",
  "currency": "SGD",
  "card": {
    "using_token": false,
    "using_saved_card": false,
    "saved_to_locker": false,
    "name_on_card": "test",
    "last_four_digits": "",
    "expiry_year": "2029",
    "expiry_month": "12",
    "card_type": "DEBIT",
    "card_reference": "",
    "card_issuer": "JP MORGAN",
    "card_isin": "459150",
    "card_fingerprint": "",
    "card_brand": "VISA"
  },
  "bank_pg": null,
  "bank_error_message": "",
  "bank_error_code": "",
  "auth_type": "THREE_DS",
  "amount_refunded": 0,
  "amount": 3
}
```

#### Step 1: Call Create Mandate Order API:
```plaintext
{
  "udf9": "",
  "udf8": "",
  "udf7": "",
  "udf6": "",
  "udf5": "",
  "udf4": "",
  "udf3": "",
  "udf2": "",
  "udf10": "",
  "udf1": "",
  "status_id": 10,
  "status": "NEW",
  "return_url": "",
  "refunded": false,
  "product_id": "",
  "payment_links": {
    "web": "https://api.juspay.in/merchant/pay/ordeu_8bddad1e3b9c85eab3db4528575c01b",
    "mobile": "https://api.juspay.in/merchant/pay/ordeu_8bddad1e3b9c85eab3db4528575c01b?mobile=true",
    "iframe": "https://api.juspay.in/merchant/ipay/ordeu_8bddad1e3b9c485eab3db4528575c01b"
  },
  "order_id": "234823498237423894273498",
  "merchant_id": "merchant",
  "juspay": {
    "client_auth_token_expiry": "2020-06-16T10:43:35Z",
    "client_auth_token": "tkn_753275c49a44a1a313eb2567f2fd6b"
  },
  "id": "ordeu_8bddad1e3b9c85eab3db4528575c01b",
  "date_created": "2020-06-16T10:28:35Z",
  "customer_phone": "9818638469",
  "customer_id": "cst_lz7emoo5okgav",
  "customer_email": "test@gmail.com",
  "options.createMandate": "REQUIRED",
  "amount": "1.0",
  "mandate.maxAmount": "1000.00",
  "mandate.endDate": "1914141600",
  "mandate.startDate": "1598965200"
}
```

