---
page_source: https://juspay.io/br/docs/hypercheckout-global/web/mandates/mandate-status-check
page_title: Mandate Status Check
---

## API Version: default


# Mandate Status Check API



A merchant can all this API to get the status of a particular mandate setup with us. When the merchant calls this API, we will sync with PGs to get the latest Mandate Status value and update back in our response, or share the latest Mandate Status stored with us in DB.

> **Note**
> We will only sync with a few PGs for now for the updated Mandate Status, for others we will provide with the latest Mandate Status stored with us.

## Endpoints:
- Sandbox: https://payments.sandbox.juspay.in/mandates/{mandate_id}

- Production: https://payments.juspay.in/mandates/{mandate_id}}

## Request Type: 
POST

## Content-Type: 
application/json

## Authorization:

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

* Username: API Key obtained from Juspay dashboard
* Password: Empty string

Example:- Basic MUQ2QUxxxxxxxxxxxxU5QTIxQzNFNTQwNkFDMEZCOg==
- Value: MUQ2QUZEQzhFQTY0OUU5QTIxQzNFNTQwNkFDMEZCOg==
- Tags: required, Base64 Encoded Username:Password
## Headers:

#### x-merchantid:
The Username that a merchant holds at Juspay.
- Tags: String, Mandatory

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Code Snippets:

#### Request Code Snippet:

```request
curl --location 'https://sandbox.juspay.in/mandates/hyhTD5Ga4jJ2KXZwwnyh4A' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'x-routing-id: customer_1122'\
--header 'Authorization: your api key' \
--data-urlencode 'command=check_status'
```

### Sample Request and Response:

#### Response - Active:
```json
{
  "order_id": "juspayKTestTxns849",
  "frequency": "ASPRESENTED",
  "end_date": "2633068438",
  "status": "ACTIVE",
  "activated_at": "2023-06-09T07:59:32Z",
  "last_activated_at": "2023-06-09T07:59:32Z",
  "amount_rule": "VARIABLE",
  "last_updated": "2023-06-09T07:59:32Z",
  "start_date": "1686293709",
  "mandate_debit_token": "tkn_88620327ecf64826ad5cea548a1554d4",
  "customer_id": "cst_z1fsoxwyhvp5gj13",
  "mandate_id": "hyhTD5Ga4jJ2KXZwwnyh4A",
  "block_fund": false,
  "currency": "BRL",
  "max_amount": 20,
  "mandate_token": "4a1d3fd9727e4b95bdc5cfd60aa12530",
  "revokable_by_customer": true,
  "payment_info": {
    "payment_method": "PAY",
    "payment_method_type": "PIX"
  },
  "mandate_type": "EMANDATE"
}
```

#### Response - Failure:
```json
{
  "order_id": "juspayKTestTxns767",
  "frequency": "ASPRESENTED",
  "end_date": "2633067060",
  "status": "FAILURE",
  "amount_rule": "VARIABLE",
  "last_updated": "2023-06-09T07:49:18Z",
  "start_date": "1686293709",
  "customer_id": "cst_z1fsoxwyhvp5gj13",
  "mandate_id": "uEzrKHH8sowcSwdGAUg2Tw",
  "block_fund": false,
  "currency": "BRL",
  "max_amount": 20,
  "mandate_token": "35b555e1eaaa4b42bf6279e87458ccc9",
  "revokable_by_customer": true,
  "payment_info": {
    "payment_method": "COLLECT",
    "payment_method_type": "PIX"
  },
  "mandate_type": "EMANDATE"
}
```

#### Response - Revoked:
```json
{
  "order_id": "juspayKTestTxns767",
  "frequency": "ASPRESENTED",
  "end_date": "2633067060",
  "status": "REVOKED",
  "amount_rule": "VARIABLE",
  "last_updated": "2023-06-09T07:49:18Z",
  "start_date": "1686293709",
  "customer_id": "cst_z1fsoxwyhvp5gj13",
  "mandate_id": "uEzrKHH8sowcSwdGAUg2Tw",
  "block_fund": false,
  "currency": "BRL",
  "max_amount": 20,
  "mandate_token": "35b555e1eaaa4b42bf6279e87458ccc9",
  "revokable_by_customer": true,
  "payment_info": {
    "payment_method": "COLLECT",
    "payment_method_type": "PIX"
  },
  "mandate_type": "EMANDATE"
}
```

## Path Parameters:

#### mandate_id:
Mandate Id

Example:- 7KKTSsVLcQjskY5F4moS5M
- Tags: String, Mandatory
## Body Parameters:
### Basic Parameters:

#### command:
- Description: To be set as "check_status", to check status of the mandate
- Value: value
- Tags: String, Mandatory
## API Responses:
### 200:

#### order_id:
- Description: Order id passed by the merchant
- Tags: String

#### frequency:
- Description: Frequency value passed for the mandate
- Tags: String

#### end_date:
- Description: Expiry date for the mandate. This will be in epoch format.
- Tags: String

#### status:
- Description: Current status of the mandate
- Tags: String

#### activated_at:
- Description: The date when mandate was activated.
- Tags: String

#### last_activated_at:
- Description: The date when mandate last received information about becoming active.
- Tags: String

#### amount_rule:
- Description: Amount rule passed for the mandate
- Tags: String

#### last_updated:
- Description: Last time status of the mandate was updated
- Tags: String

#### start_date:
- Description: Date when mandate was started. This will be in epoch format.
- Tags: String

#### mandate_debit_token:
- Tags: String, deprecated

#### customer_id:
- Description: The customer id for which the mandate has been set up
- Tags: String

#### mandate_id:
- Description: value of the mandate id that is being checked.
- Tags: String

#### block_fund:
- Description: if the mandate has blocked fund or not.
- Tags: String

#### currency:
- Description: Currency in which the amount will be debited for the mandate
- Tags: String

#### max_amount:
- Description: Max amount value for the mandate
- Tags: String

#### mandate_token:
- Tags: String, Deprecated

#### revokable_by_customer:
- Description: If the mandate is revokable by customer or not
- Tags: Boolean

#### payment_info:
- Description: Contains payment details via which payment was made.
- Tags: Nested Json

#### mandate_type:
- Description: Type of mandate - Mandate or EMandate
- Tags: String
