---
page_source: https://juspay.io/in/docs/payment-page-enterprise/android/mandates/mandate-execution-api
page_title: Mandate Execution API
---

## API Version: default


## Mandate Execution API



This API is used to debit amount from the customers account on a recurring basis as per the frequency specified during mandate registration flow. The API creates an order, sends notification to customer informing about upcoming debit and performs a transaction with PG based on the mandate_id passed in the request.

**NOTE:**  Implement this API only when you have use case of Mandates.## Endpoints:
- Production: https://api.juspay.in/txns

## Request Type: 
GET

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Consists of two parts.

* Username: API Key obtained from Juspay dashboard
* Password: Empty string
- Value: <p>Example:-<br>MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==</p>
- Tags: Base64 Encoded username:password, required
## Headers:

#### x-merchantid:
Merchant ID provided by Juspay
- Value: <p>Example:-<br>merchant-id</p>
- Tags: string, required
## Sample Code Snippets:
### Sample Request:

#### Shell Code Snippet:

```shell
curl -X  POST 'https://api.juspay.in/txns' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic <base64 of key:>'
-d 'order.order_id = 26234761248249834753485721' \
-d 'order.amount = 1.00' \
-d 'order.customer_id = cst_lz7zmpemoo5okgav' \
-d 'mandate_id = 4rKxSj3bNXs7RQcdtajAkb' \
-d 'merchant_id = your_merchant_idmerchantid' \
-d 'format = json'

```

### Sample Response:

#### Response:
```json
{
  "txn_uuid": "eulmN9X8JpeC7qK6AJq",
  "txn_id": "merchant_id-26234761248249834753485721-1",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "url": "https://api.juspay.in/v2/pay/finish/merchant_id/eulmN9X8JpeC7qK6AJq/26234761248249834753485721",
      "method": "GET"
    }
  },
  "order_id": "26234761248249834753485721",
  "offer_details": {
    "offers": []
  }
}
```

## Body Parameters:
### Basic Parameters:

#### order.order_id:
- Description: Unique Identifier for the order. Should be Alphanumeric with character length less than 18.
- Value: <p>Example:-<br>order-id-9876580</p>
- Tags: string, required

#### order.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: string, required

#### order.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
- Value: <p>Example:-<br>customer-id-007</p>
- Tags: string, required

#### mandate_id:
- Description: It is available in the response of order status api post mandate registration
- Value: <p>Example:-<br>4rKxSj3bNXs7RQcdtajAkb</p>
- Tags: string, required

#### mandate.execution_date:
- Description: Should be passed in UNIX Epoch timestamp. This is the date on which the mandate has to be executed i.e when money should be debited from customer
- Value: <p>Example:-<br>1622369936</p>
- Tags: string

#### merchant_id:
- Description: The format of the response. Should be passed as json.
- Tags: string, required
## API Responses:
### 200:

#### order_id:
- Description: Given order ID
- Tags: string

#### status:
- Description: Status of order
- Tags: string

#### txn_id:
- Description: Transaction ID for the payment attempt. Can be used as an identifier at PG end and will be present in reconciliation report.
- Tags: string

#### txn_uuid:
- Description: The unique id generated by Juspay for a particular transaction. Can be used as an identifier in case of UPI transaction
- Tags: string

#### payment.authentication.url:
- Description: URL to which the user has to be taken to for completing the authentication
- Tags: string

#### payment.authentication.method:
- Description: HTTP Method for authentication. Can be one of GET or POST
- Tags: string

#### offer_details:
- Description: Json with offer details
- Tags: JSON

#### offer_details.offers:
- Description: Contains array of offers applicable
- Tags: Array
### 400:

#### status:
- Description: DUPLICATE_ORDER_ID
- Tags: string

#### status_id:
- Description: DUPLICATE_ORDER_ID
- Tags: integer

#### error_message:
- Description: Order already exists with the given order_id
- Tags: string
### 401:

#### status:
- Description: error
- Tags: string

#### error_code:
- Description: access_denied
- Tags: string
### 500:

#### status:
- Description: error
- Tags: string

#### error_code:
- Description: Internal server Error
- Tags: string
