---
page_title: Mandate Registration API
product: API Reference Global
page_source: https://juspay.io/sea/docs/api-reference-global/docs/mandates/mandate-registration-api
openapi: https://juspay.io/sea/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fsea%2Fdocs%2Fapi-reference-global%2Fdocs%2Fmandates%2Fmandate-registration-api
llms_txt: https://juspay.io/sea/docs/llms.txt
product_llms_txt: https://juspay.io/sea/docs/api-reference-global/llms.txt
---

## API Version: default


# Mandate Registration API



Use this API to choose the preferred mode of payment for the mandate.

Share the URL that you get in the response body with your end customer, for whom this mandate is being initiated. They will have to run the same to authorise the collect request from their UPI App.The API is not required for the merchants using Juspay's Payment Page product.## Endpoints:
- Sandbox: https://sandbox.juspay.in/txns

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

## Request Type: 
POST

## Headers:

#### Content-Type:
It should be **`application/x-www-form-urlencoded`** 
- Tags: string

#### x-merchantid:
Unique identifier for the merchant. This is the Merchant ID provided by Juspay. The value is case sensitive.

> **Note**
> Passing this value will help us route efficiently at network level.


- Value:  x-merchantid: testaccount
- Tags: String, Recommended
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl -X POST 'https://api.juspay.in/txns' \
-H 'Content-Type: application/x-www-form-urlencoded'\
-d 'order_id=152664118690577-910' \
-d 'merchant_id=guest' \
-d 'payment_method_type=CARD' \
-d 'payment_method=MASTERCARD' \
-d 'card_number=5243681100075285' \
-d 'card_exp_month=10' \
-d 'card_exp_year=20' \
-d 'name_on_card=name' \
-d 'card_security_code=111' \
-d 'save_to_locker=true' \
-d 'should_create_mandate=true'

```

### Sample Response:

#### 200 - Success:
```json
{
  "txn_uuid": "eulmyxQn6bQso6y1Syy",
  "txn_id": "merchant-234823498237423894273498-1",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "url": "https://api.juspay.in/v2/pay/start/paypal/eulmycxxxxxso6y1Syy",
      "method": "GET"
    }
  },
  "order_id": "234823498237423894273498"
}
```

## Body Parameters:
### Parameters:

#### order_id:
- Description: Unique Identifier for the order.
- Tags: string, Mandatory

#### merchant_id:
- Description: ID of the **merchant_account**  that you hold with us.
- Tags: string, Mandatory

#### payment_method_type:
- Description: Payment method type of transaction. 
- Tags: string, Mandatory

#### payment_method:
- Description: Payment method of transaction.
- Tags: string, Mandatory

#### redirect_after_payment:
- Description: We recommend that you set this to **true**  and use the redirection flow.If set to **true** , then the user is redirected to the return_url configured for the order.If set to **false** , then the user will be stopped at the response page from the gateway.Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: boolean, Mandatory

#### format:
- Description: If it is set to **json** , then the response will be **HTTP 200**  with a JSON formatted text. Otherwise, the response is **HTTP 302**  with the Location attribute having the destination URL.
- Tags: string, Mandatory

#### mandate_type:
- Description: **MANDATE**  in case of card
- Tags: string, Mandatory

#### should_create_mandate:
- Description: This is a customer’s consent flag. This should be always **TRUE**  in case of a mandate transaction.
- Tags: boolean

#### card_token:
- Description: A **valid card token**  obtained using **/card/list API** . If you send this parameter, then card_number, name_on_card, card_exp_year, card_exp_month fields are not required.If the token is generated using the **/card/tokenize**  API, card_number, name_on_card, card_exp_year, card_exp_month and card_security_code fields are not required. Required for **mandate_type=** MANDATE for stored card.
- Tags: string

#### card_number:
- Description: A valid credit/debit card number. Required when **mandate_type = MANDATE**  for a new card transaction.
- Tags: string

#### card_exp_year:
- Description: Represent the expiry year of the card as **YY**  (two digits only).Required when **mandate_type = MANDATE**  for a new card transaction.
- Tags: string

#### card_exp_month:
- Description: Represent the expiry month of the card as **MM**  (two digits only). Required when **mandate_type = MANDATE**  for a new card transaction.
- Tags: string

#### card_security_code:
- Description: CVV of the card. Usually three digits. Required when **mandate_type = MANDATE**  for a new card transaction.
- Tags: string

#### name_on_card:
- Description: Card holder name. Should contain **alphabetical characters**  only. Required when **mandate_type = MANDATE**  for a new card transaction.
- Tags: string

#### save_to_locker:
- Description: This is a boolean variable and accepts **true/false** . If set to **true** , then the card will be saved in locker when the transaction is successful. Else, the card will not be saved.
- Tags: string
## API Responses:
### 200:

#### UPI Collect/Card/NB:
- Value:
  - **Txn_uuid**:
    - Tags: String
  - **Txn_id**:
    - Description: Transaction ID for the payment attempt.
    - Tags: String
  - **Status**:
    - Description: Status of the transaction. PENDING_VBV indicates that the transaction requires authentication to complete.
    - Tags: String
  - **Payment**:
    - Value:
      - **Authentication**:
        - Value:
          - **Url**:
            - Description: URL to which the user has to be taken to for completing the authentication
            - Tags: String
          - **Method**:
            - Description: HTTP Method for authentication. Can be one of GET or POST
            - Tags: String
        - Tags: object
    - Tags: object
  - **Order_id**:
    - Description: Unique Identifier for the order.
    - Tags: String
- Tags: JSON

#### UPI Intent:
- Value:
  - **Txn_uuid**:
    - Tags: String
  - **Txn_id**:
    - Description: Transaction ID for the payment attempt.
    - Tags: String
  - **Status**:
    - Description: Status of the transaction. PENDING_VBV indicates that the transaction requires authentication to complete.
    - Tags: String
  - **Payment**:
    - Value:
      - **Sdk_params**:
        - Value:
          - **Uri_params**:
            - Value:
              - **Validitystart**:
                - Tags: String
              - **Validityend**:
                - Tags: String
              - **Tr**:
                - Tags: String
              - **Tn**:
                - Tags: String
              - **Tid**:
                - Tags: String
              - **Recur**:
                - Tags: String
              - **Purpose**:
                - Tags: String
              - **Pn**:
                - Tags: String
              - **Pa**:
                - Tags: String
              - **Orgid**:
                - Tags: String
              - **Mode**:
                - Tags: String
              - **Mn**:
                - Tags: String
              - **Mc**:
                - Tags: String
              - **Cu**:
                - Tags: String
              - **Amrule**:
                - Tags: String
              - **Am**:
                - Tags: String
            - Tags: object
          - **Scheme**:
            - Tags: String
        - Tags: object
      - **Authentication**:
        - Value:
          - **Url**:
            - Description: URL to which the user has to be taken to for completing the authentication
            - Tags: String
          - **Method**:
            - Description: HTTP Method for authentication. Can be one of GET or POST
            - Tags: String
        - Tags: object
    - Tags: Object
  - **Order_id**:
    - Tags: String
  - **Offer_details**:
    - Value:
      - **Offers**:
        - Tags: array
    - Tags: object
- Tags: JSON


---

## See Also

- [Create Order - Mandate](https://juspay.io/sea/docs/api-reference-global/docs/mandates/create-order--mandate)
- [Response in Return URL](https://juspay.io/sea/docs/api-reference-global/docs/mandates/response-in-return-url)
