---
page_source: https://juspay.io/in/docs/upi-merchant-stack/docs/mandates/mandate-status
page_title: Mandate Status
---

## API Version: default


## Mandate Status



This API can be used by Merchant for checking the recent status of the mandate / (mandate action). 

If **merchantRequestId** is not passed in the requestBody: Recent status of the mandate is denoted by **gatewayResponseStatus**  field in the response. Based on different scenarios **gatewayResponseStatus**  can have multiple values like **SUCCESS, FAILURE, REVOKED, PAUSED, COMPLETED, DECLINED, EXPIRED**  depending upon the current status of the mandate.

If **merchantRequestId**  is passed in the requestBody: Then **gatewayResponseStatus**  denotes the status of that particular action (**UPDATE, REVOKE, PAUSE and UNPAUSE** ) taken on mandate.

Refer to table below for different value of **gatewayResponseCode**  and **gatewayResponseStatus** . 


| merchantRequestId in reqBody | gatewayResponseCode	 | gatewayResponseStatus	 | Description |
|---|---|---|---|
| Present	 | 00 | SUCCESS | Mandate is in active state |
| Present	 | 01 | PENDING | Mandate is in pending state |
| Present	 | JPMR | REVOKED | Mandate is revoked |
| Present	 | JPMP | PAUSE | Mandate is paused |
| Present	 | JPMC | COMPLETED | Mandate is completed |
| Present	 | JPMD | DECLINED | Mandate is declined by payer |
| Present	 | JPMX | EXPIRED | Mandate is expried due to no action by payer |
| Not Present	 | 01 | PENDING | Respective Mandate Action is in pending state |
| Not Present	 | 00 | SUCCESS | Corresponding Message for Mandate Action |
| Present / Not Present	 | Else | FAILURE | Any other reason. |
## Endpoints:
- Production: {{host}}/api/{{uri}}/merchants/mandates/status

## Request Type: 
POST

## Headers:

#### jpupi-routing-id:
Header value should be same as of **originalMerchantRequestId**  sent in request body
- Tags: String, Mandatory
## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
{"success":false,"message":"No Data found for the given path"}
```

### Sample Request and Response:

#### Request:
```json
{"success":false,"message":"No Data found for the given path"}
```

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

## Body Parameters:
### Request parameters:

#### role:
- Description: Defines the role of the merchant in the mandate.

**Value:**  PAYEE.
- Tags: String, Mandatory

#### originalMerchantRequestId:
- Description: Merchant request of the **original create mandate request.** 
- Tags: String, Optional But Mandatory For New Integration

#### merchantRequestId:
- Description: Merchant generated unique id for the mandate action. To be used for **update, revoke, pause, unpause operations.** 

**Condition: Should be passed to know the status of the Mandate Action.** 

> **Note**
> It should not be passed for create mandate status else BAD_REQUEST error will be thrown.


- Tags: String, Condtional

#### iat:
- Description: Current Epoch Unix timestamp string. Has to be of 13 digit in Milliseconds.

Example: 1496918882000.
- Tags: String, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"**Note** : Few special characters are not allowed. Regex for the characters which are not allowed : **^[^/#-()*!%~`]+$** 
- Tags: Stringified JSON, optional
## API Responses:
### 200:

#### status:
- Description: PSP status of the API

**Values:** SUCCESS, FAILURE
- Tags: String, Mandatory

#### responseCode:
- Description: PSP response code for the API.

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### responseMessage:
- Description: PSP response message for the API.

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **Amount**:
    - Description: Amount for mandate
      
      **Values:** Amount in two decimals. Decimals are mandatory
    - Tags: String, Mandatory
  - **AmountRule**:
    - Description: Rule on Mandate Amount. If amountRule is MAX, then mandate can be executed for amount less than or equal to the passed amount . If amountRule is EXACT, then mandate should always be executed for the same amount.
      
      **Values:** As passed for amountRule in create mandate.
    - Tags: String, Mandatory
  - **BankAccountUniqueId**:
    - Description: Unique id for the selected bank account. It will not be present if role passed in request is PAYEE and payeeVpa is of merchant.
      
      **Values: bankAccountUniqueId**  in the response of **Fetch Accounts**  api call.
    - Tags: String, optional
  - **BlockFund**:
    - Description: Denotes whether customer's fund should be blocked or not. True for recurring mandate, for ONETIME mandate can be true or false
      
      **Values:** true / false
    - Tags: String, Mandatory
  - **Expiry**:
    - Description: Timestamp until which mandate request is valid. It will only be present if request is pending for approval for create mandate or update mandate.
      
      **Format:** Timestamp in YYYY-MM-DDTHH:MM:SS+05:30 format.
    - Tags: String, optional
  - **GatewayMandateId**:
    - Description: UPI request id returned by gateway for the particular mandate / mandate action request
    - Tags: String, Mandatory
  - **GatewayReferenceId**:
    - Description: Customer reference number (rrn) for the mandate / mandate action operation.
    - Tags: String, Mandatory
  - **GatewayResponseCode**:
    - Description: Response code returned by gateway for the mandate / mandate action operation.
      
      **Values:** Refer table below.
    - Tags: String, Mandatory
  - **GatewayResponseMessage**:
    - Description: Response message returned by gateway for the mandate / mandate action operation.
    - Tags: String, Mandatory
  - **GatewayResponseStatus**:
    - Description: Denotes the current status of the mandate if upiRequestId is not passed in reqBody. Denotes the status of mandate action if upiRequestId is passed in reqBody.
      
      **Values:** SUCCESS, FAILURE, PENDING, REVOKED, PAUSE, COMPLETED, DECLINED, EXPIRED
    - Tags: String, Mandatory
  - **InitiatedBy**:
    - Description: Defines who has initiated the mandate
      
      **Values:** PAYER, PAYEE
    - Tags: String, Mandatory
  - **MandateApprovalTimestamp**:
    - Description: Time instant at which create mandate request was approved. Only present if mandate was initiatedBy PAYEE and upiRequestId is not passed in reqBody.
      
      **Format:** YYYY-MM-DDTHH:MM:SS+05:30.
    - Tags: String, Optional
  - **MandateName**:
    - Description: Name of the mandate
    - Tags: String, Mandatory
  - **MandateTimestamp**:
    - Description: Timestamp of when the mandate / mandate action was initiated
      
      **Format:** YYYY-MM-DDTHH:MM:SS+05:30
    - Tags: String, Mandatory
  - **MandateType**:
    - Description: Defines the type of mandate operation
      
      **Values:** CREATE, UPDATE, REVOKE, PAUSE, UNPAUSE
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Unique id for the merchant channel.
      
      **Values:** As passed for x-merchant-channel-id in request headers.
    - Tags: String, Mandatory
  - **MerchantCustomerId**:
    - Description: Merchant generated unique profile id for customer. It will not be present if role passed in request is PAYEE and payeeVpa is of merchant.
      
      **Values:** Alphanumeric string with dot(.). Maximum length is 256.
    - Tags: String, optional
  - **MerchantId**:
    - Description: Unique id for the merchant.
      
      **Values:** As passed for x-merchant-id in request headers
    - Tags: String, Mandatory
  - **MerchantRequestId**:
    - Description: Merchant generated unique id for collect request.
      
      **Constraint** : Max 35 characters & Alphanumeric.
    - Tags: String, Mandatory
  - **OrgMandateId**:
    - Description: Refers to upiRequestId used during creation of mandate.
      
      **Values:** Same as upiRequestId of create mandate.
    - Tags: String, Mandatory
  - **PauseEnd**:
    - Description: Defines the date on which the mandate should unpause. It will only be present if mandateType is **PAUSE, UNPAUSE.** 
      
      **Format:** "YYYY/MM/DD".
    - Tags: String, optional
  - **PauseStart**:
    - Description: Defines the date from which the mandate should pause. It will only be present if mandateType is **PAUSE, UNPAUSE.** 
      
      **Format:** "YYYY/MM/DD".
    - Tags: String, optional
  - **PayeeMcc**:
    - Description: Merchant Category Code of the payee merchant.
    - Tags: String, Mandatory
  - **PayeeName**:
    - Description: Name of the Payee involved in mandate. Only present if role is **PAYER**  in request.
    - Tags: String, optional
  - **PayeeVpa**:
    - Description: VPA of payee.
    - Tags: String, Mandatory
  - **PayerName**:
    - Description: Name of the Payer involved in mandate. Only present if role is **PAYEE**  in request.
    - Tags: String, optional
  - **PayerRevocable**:
    - Description: Defines whether mandate is revocable by PAYER or not. Applicable only when it is ONETIME mandate and initiatedBy PAYEE
    - Tags: String, Mandatory
  - **PayerVpa**:
    - Description: VPA of payer.
    - Tags: String, Mandatory
  - **RecurrencePattern**:
    - Description: Recurrence Pattern for Mandate.
      
      **Values:** Same as original mandate in create mandate response.
    - Tags: String, Mandatory
  - **RecurrenceRule**:
    - Description: Recurrence Rule for Mandate. It will not be present for **ONETIME** , **DAILY**  and **ASPRESENTED**  recurrence pattern.
      
      **Values:** Same as original mandate in create mandate response.
    - Tags: String, optional
  - **RecurrencValue**:
    - Description: Recurrence Value for Mandate. It will not be present for **ONETIME** , **DAILY**  and **ASPRESENTED**  recurrence pattern.
      
      **Values:** Same as original mandate in create mandate response.
    - Tags: String, optional
  - **RefUrl**:
    - Description: Invoice as sent by merchant or reference to the mandate in the form of url.
      
      **Values:** String. As passed during creation of mandate.
    - Tags: String, Mandatory
  - **Remarks**:
    - Description: Any mandate summary
      
      **Values:** As passed during create mandate response.
    - Tags: String, Mandatory
  - **Role**:
    - Description: Defines the role of the customer in the mandate.
      
      **Values** :PAYER, PAYEE.
    - Tags: String, Mandatory
  - **ShareToPayee**:
    - Description: Descibes whether mandate will be shared with payee or not. Applicable only when it is ONETIME mandate and initiatedBy PAYER.
      
      **Values:** String - true,false.
    - Tags: String, Mandatory
  - **TransactionType**:
    - Description: Type of Mandate Operation.
      
      **Values:** UPI_MANDATE, QR_MANDATE, INTENT_MANDATE, P2M_MANDATE
    - Tags: String, Mandatory
  - **Umn**:
    - Description: Unique Mandate Number used for execution of the mandate. It will not be present if mandate is pending for payer's approval.
    - Tags: String, optional
  - **ValidityEnd**:
    - Description: Date before which mandate can be executed.
      
      **Format:** YYYY/MM/DD.
    - Tags: String, Mandatory
  - **ValidityStart**:
    - Description: Date after which mandate can be executed.
      
      **Format:** YYYY/MM/DD.
    - Tags: String, Mandatory
  - **OriginalMerchantRequestId**:
    - Description: Merchant Request Id of original mandate.
    - Tags: String, optional
  - **AccountReferenceId**:
    - Description: Account ref id used for approving mandate.
    - Tags: String, optional
  - **GatewayTransactionId**:
    - Description: UPI request id returned by gateway for the transaction.
    - Tags: String, optional
  - **PayerAccountHash**:
    - Description: Hashed value of accounts to be passed by merchant for TPV.
    - Tags: Array of String, optional
  - **RecurrenceValue**:
    - Description: Recurrence Value for Mandate. It is not required for ONETIME, DAILY and ASPRENTED recurrencePattern.
    - Tags: String, optional
  - **TpvValidationStatus**:
    - Description: **Value:** FAILURE / SUCCESS
    - Tags: String, optional
- Tags: json, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: Stringified JSON, optional
