---
page_source: https://docs.juspay.io/upi-inapp/flutter/headless-process-payloads/p2p-create-mandate
page_title: P2P Create Mandate
---


## P2P Create Mandate




###   Process Parameters



## Request Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK.
      - Value: upiCreateMandate
      - Tags: String, Mandatory
    - **AccountReferenceId**:
      - Description: reference id for account on which mandate is to be created
      - Tags: String, Mandatory
    - **Amount**:
      - Description: Amount for which mandate is to created. Numeric String with two decimals
      - Value: eg: 2.00
      - 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.
      - Value: MAX / EXACT
      - Tags: String, Mandatory
    - **BankAccountUniqueId**:
      - Description: Unique Identifier for bank account across banks
      - Tags: String, Optional
    - **BlockFund**:
      - Description: Denotes whether customer's fund should be blocked or not. Only applicable for ONETIME mandate. For recurring mandate it should always be false, for onetime it can be true or false. Default value is false.
      - Value: true / false
      - Tags: String, Optional
    - **Currency**:
      - Description: Currency to use
      - Value: eg : INR
      - Tags: String, Optional
    - **Expiry**:
      - Description: Expiry date of mandate
      - Tags: String, Optional
    - **InitiatedBy**:
      - Description: Values: PAYER / PAYEE
      - Tags: String, Mandatory
    - **InitiationMode**:
      - Description: Defines the initiationMode of the mandate
      - Tags: String, Optional
    - **MandateName**:
      - Description: Name of the mandate
      - Value: <Name of mandate>
      - Tags: String, Mandatory
    - **Mcc**:
      - Description: Merchant Category Code
      - Tags: String, Optional
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Tags: String, Mandatory
    - **MerchantSignature**:
      - Description: Merchant Signature
      - Tags: String, Optional
    - **MerchantRequestId**:
      - Description: Merchant generated id for the mandate request.
      - Tags: String, Optional
    - **PayeeVpa**:
      - Description: Payee Vpa
      - Tags: String, Mandatory
    - **PayerAccountHash**:
      - Description: Payer Account Hash
      - Tags: String, Optional
    - **PayerRevocable**:
      - Description: Defines whether mandate is revocable by PAYER or not. Applicable only when it is ONETIME mandate and initiatedBy PAYEE. For recurring mandate it should always be true, for onetime it can be true or false. Default value is true.
      - Value: true / false
      - Tags: String, Optional
    - **PayerVpa**:
      - Description: Payer Vpa
      - Tags: String, Mandatory
    - **Purpose**:
      - Description: Defines the purpose code of the mandate
      - Tags: String, Optional
    - **RecipientName**:
      - Description: Recipient Name
      - Tags: String, Mandatory
    - **RecurrencePattern**:
      - Description: Recurrence Pattern for Mandate. Denotes at what frequency mandate can be executed.
      - Value: ONETIME / DAILY / WEEKLY / FORTNIGHTLY / MONTHLY / BIMONTHLY / QUARTERLY / HALFYEARLY / YEARLY / ASPRESENTED
      - Tags: String, Mandatory
    - **RecurrenceRule**:
      - Description: Recurrence Rule for Mandate. It is not required for ONETIME, DAILY and ASPRENTED recurrencePattern.
      - Value: ON / BEFORE / AFTER
      - Tags: String, Optional
    - **RecurrenceValue**:
      - Description: Recurrence Value for Mandate. It is not required for ONETIME, DAILY and ASPRENTED recurrencePattern.
      - Value: between 1-31 and depends on recurrencePattern.
      - Tags: String, Optional
    - **RefCategory**:
      - Description: Details for refUrl, whether it is 01 (advertisement), 02(Invoice). If nothing is passed, a default value of `00` is set up and same will be sent back in response.
      - Tags: String, Optional
    - **RefUrl**:
      - Description: Invoice as sent by merchant or reference to the mandate in the form of url. If nothing is passed then a default value is set for this tag and same will be send back in response.
      - Tags: String, Optional
    - **Remarks**:
      - Description: Any mandate summary
      - Tags: String, Optional
    - **ShareToPayee**:
      - Tags: String, Optional
    - **Timestamp**:
      - Description: Time of mandate creation
      - Tags: String, Mandatory
    - **TransactionReference**:
      - Tags: String, Optional
    - **TransactionType**:
      - Description: INTENT_MANDATE / QR_MANDATE
      - Tags: String, Mandatory
    - **UpiRequestId**:
      - Description: Unique identifier (uuid) for the request sent to NPCI
      - Tags: String, Mandatory
    - **ValidityStart**:
      - Description: Date after which mandate can be executed
      - Tags: String, Mandatory
    - **ValidityEnd**:
      - Description: String with proper date format YYYY/MM/DD
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Signature payload is a stringified JSON of the details mentioned in the below table.
      - Value:
        - **Merchant_id**:
          - Description: Unique identifier associated with an account created by juspay.
          - Value: Example: stock
          - Tags: String, Mandatory
        - **Order_id**:
          - Description: Order ID for the transaction
          - Value: Example: ABC123456789
          - Tags: String, Mandatory
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Value: Example: abcde12345
          - Tags: String, Mandatory
        - **Amount**:
          - Description: Mandate amount. Numeric String with two decimals
          - Value: Example: 100.0
          - Tags: String, Mandatory
        - **Currency**:
          - Description: Currency to use
          - Value: Example: INR
          - Tags: String, Optional
        - **Customer_phone**:
          - Description: Mobile no
          - Value: Example: 1234567890
          - Tags: String, Optional
        - **Customer_email**:
          - Description: Customer Email
          - Value: Example: abc@xyz.com
          - Tags: String, Optional
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
        - **Metadata.<issuing_psp>:madate_name**:
          - Value: Example: metadata.YES_BIZ:ABC, metadata.AXIS_BIZ.XYZ
          - Tags: String, Mandatory
        - **Options.create_mandate**:
          - Value: Example: REQUIRED
          - Tags: String ENUM, Mandatory
        - **Mandate.max_amount**:
          - Description: Maximum amount for a mandate.
          - Value: Example: 2000.0
          - Tags: String, Mandatory
        - **Mandate.amount_rule**:
          - Description: FIXED, VARIABLE. In case of FIXED amount_rule, amount will be equal to max amount. Defaults to VARIABLE
          - Value: Example: FIXED
          - Tags: String ENUM, Mandatory
        - **Mandate.frequency**:
          - Description: Defines the frequency of mandate execution, how often a customer should be charged. It can be ONETIME, DAILY, WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, YEARLY, ASPRESENTED. By Default it is considered as ASPRESENTED
          - Value: Example: MONTHLY
          - Tags: String ENUM, Optional
        - **Mandate.start_date**:
          - Description: Sets the end Date when mandates will stop execution
          - Value: Example: 1665996901100
          - Tags: UNIX EPOCH timestamp (UTC timezone), Mandatory
        - **Mandate.end_date**:
          - Description: Marks the start of mandate execution
          - Value: Example: 1665996902100
          - Tags: UNIX EPOCH timestamp (UTC timezone), Mandatory
        - **Mandate.block_funds**:
          - Description: Denotes whether customer's fund should be blocked or not. Only applicable for ONETIME mandate. For recurring mandate it should always be false, for onetime it can be true or false. Default value is false.
          - Value: Example: true
          - Tags: Boolean, Optional
        - **Mandate.rule_type**:
          - Description: Recurrence Rule for Mandate. It is not required for ONETIME, DAILY and ASPRESENTED recurrencePattern.
          - Value: Values: ON/BEFORE/AFTER
          - Tags: String, Optional
        - **Mandate.rule_value**:
          - Description: Between 1-31 and depends on recurrencePattern
          - Value: Recurrence Rule for Mandate. It is not required for ONETIME, DAILY and ASPRESENTED recurrencePattern.
          - Tags: String, Optional
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload .
      - Tags: String, Mandatory
    - **UdfParameters**:
      - Description: Stringified json for udf parameters
      - Tags: String, Optional
  - Tags: JSON, Mandatory


## Response Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String
- **Payload**:
  - Description: Response Parameters
  - Value:
    - **Action**:
      - Description: Operation performed in the SDK
      - Value: upiCreateMandate
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the Operation.
      - Value: Possible values : SUCCESS, PENDING, FAILURE
      - Tags: String, Mandatory
    - **MandatePayload**:
      - Description: Contains relevant mandate data
      - Value:
        - **AccountReferenceId**:
          - Description: reference id for selected accounts
          - Tags: String, Mandatory
        - **Amount**:
          - Description: Amount for which merchant requested the mandate. Numeric String with two decimals
          - Value: eg. 25.00
          - 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.
          - Value: MAX / EXACT
          - Tags: String, Mandatory
        - **BankAccountUniqueId**:
          - Description: Unique Identifier for bank account across banks
          - Tags: String, Mandatory
        - **BlockFund**:
          - Description: Denotes whether customer's fund should be blocked or not. Only applicable for ONETIME mandate. For recurring mandate it should always be false, for onetime it can be true or false. Default value is false.
          - Tags: String, Mandatory
        - **Expiry**:
          - Description: Minutes for which request is valid
          - Tags: String, Optional
        - **GatewayMandateId**:
          - Description: UPI request id returned by gateway for the mandate
          - Tags: String, Mandate
        - **GatewayReferenceId**:
          - Description: upiResponseId as passed in request
          - Tags: String, Mandatory
        - **GatewayResponseCode**:
          - Description: Response code returned by gateway for the transaction.
          - Tags: String, Mandate
        - **GatewayResponseMessage**:
          - Description: Response message returned by gateway for the transaction.
          - Tags: String, Mandatory
        - **GatewayResponseStatus**:
          - Description: Response status returned by gateway.
          - Tags: String, Mandatory
        - **InitiatedBy**:
          - Description: Who has created this update/revoke request. Possible values :- PAYER / PAYEE
          - Value: Possible values :- PAYER / PAYEE
          - Tags: String, Madatory
        - **MandateApprovalTimeStamp**:
          - Tags: String, Optional
        - **MandateName**:
          - Description: Name of the mandate, Helps with differentiation of all mandates
          - Tags: String, Optional
        - **MandateTimestamp**:
          - Description: Timestamp of when the webMandate was initiated
          - Tags: String, Mandatory
        - **MandateType**:
          - Tags: String, Optional
        - **MerchantCustomerId**:
          - Description: Merchant generated unique profile id for customer as passed in the request
          - Tags: String, Mandatory
        - **MerchantRequestId**:
          - Description: 35 character alphanumeric unique id.
          - Tags: String, Mandatory
        - **OrgMandateId**:
          - Description: gatewayMandateId returned during create mandate
          - Tags: String, Mandatory
        - **PauseEnd**:
          - Tags: String, Optional
        - **PauseStart**:
          - Tags: String, Optional
        - **PayeeMcc**:
          - Tags: String, Mandatory
        - **PayeeName**:
          - Tags: String, Optional
        - **PayeeVpa**:
          - Tags: String, Mandatory
        - **PayerName**:
          - Tags: String, Optional
        - **PayerRevocable**:
          - Description: Defines whether mandate is revocable by PAYER or not. For onetime mandate it can be true or false. Default value is true.
          - Value: true/false
          - Tags: String, Mandatory
        - **PayerVpa**:
          - Tags: String, Mandatory
        - **RecurrencePattern**:
          - Description: Recurrence Pattern for Mandate
          - Tags: String, Mandatory
        - **RecurrenceRule**:
          - Description: Recurrence Rule for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Tags: String, Optional
        - **RecurrenceValue**:
          - Description: Recurrence Value for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Tags: String, Optional
        - **RefUrl**:
          - Description: Reference url for the mandate. It will be same value if passed in request else it will be a default url.
          - Tags: String, Optional
        - **Remarks**:
          - Description: Any mandate summary. If pased in request, it will be same in response else a default value is send.
          - Tags: String, Mandatory
        - **Role**:
          - Description: Role of the customer for this mandate.
          - Value: PAYER / PAYEE
          - Tags: String, Mandatory
        - **ShareToPayee**:
          - Description: Describes whether the mandate will be shared with the payee or not. Default value is true.
          - Value: true/false
          - Tags: String, Mandatory
        - **TransactionType**:
          - Description: Type of Mandate Creation.
          - Tags: String, Mandatory
        - **Umn**:
          - Tags: String, Optional
        - **ValidityStart**:
          - Description: Date after which mandate can be executed
          - Tags: String, Mandatory
        - **ValidityEnd**:
          - Description: String with proper date format YYYY/MM/DD
          - Tags: String, Mandatory
        - **RefCategory**:
          - Description: Details for refUrl, whether it is 01 (advertisement), 02(Invoice). If nothing is passed, a default value of `00` is set up and same will be sent back in response.
          - Tags: String, Optional
        - **TransactionReference**:
          - Tags: String, Optional
        - **Purpose**:
          - Description: Defines the purpose code of the mandate
          - Tags: String, Optional
        - **InitiationMode**:
          - Description: Defines the initiationMode of the mandate
          - Tags: String, Optional
      - Tags: JSON, Mandatory
    - **ResponseCode**:
      - Description: PSP response code for the API
      - Tags: String, Mandatory
    - **ResponseMessage**:
      - Description: PSP response message for the API
      - Tags: String, Mandatory
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{
  "service": "in.juspay.hyperapi",
  "requestId": "c7f8995c-679d-4ff4-8b55-a1b0a3f227a4",
  "payload": {
    "validityStart": "2022/06/11",
    "validityEnd": "2023/05/15",
    "upiRequestId": "AX7834861502",
    "transactionType": "INTENT_MANDATE",
    "transactionReference": "1234567890",
    "timestamp": "1656567717539.0",
    "signaturePayload": "<Stringified signature payload used for signature generation>",
    "signature": "<Generated signature for signature payload>",
    "recurrenceValue": "2",
    "recurrenceRule": "BEFORE",
    "recurrencePattern": "WEEKLY",
    "recipientName": "ABC",
    "purpose": "14",
    "payerVpa": "venkat337@axisbiz",
    "payeeVpa": "gvkaaaa@stockaxis",
    "merchantKeyId": "3440",
    "mcc": "1234",
    "mandateName": "ABC",
    "initiationMode": "02",
    "initiatedBy": "PAYER",
    "currency": "INR",
    "blockFund": "false",
    "bankAccountUniqueId": "<bankAccountUniqueId>",
    "amountRule": "EXACT",
    "amount": "3000.00",
    "accountReferenceId": "Ace797b05c1d453ca3b0d060695192",
    "action": "upiCreateMandate"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "3000.00",
  "order_id": "ABC1234567890",
  "metadata.YES_BIZ:mandate_name": "metadata.YES_BIZ:ABC",
  "options.create_mandate": "REQUIRED",
  "mandate.max_amount": "2000.00",
  "mandate.amount_rule": "FIXED",
  "mandate.frequency": "MONTHLY",
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "service": "in.juspay.hyperapi",
  "requestId": "c7f8995c-679d-4ff4-8b55-a1b0a3f227a4",
  "payload": {
    "validityStart": "2022/06/11",
    "validityEnd": "2023/05/15",
    "upiRequestId": "AX7834861502",
    "transactionType": "INTENT_MANDATE",
    "transactionReference": "1234567890",
    "timestamp": "1656567717539.0",
    "signaturePayload": "<Stringified signature payload used for signature generation>",
    "signature": "<Generated signature for signature payload>",
    "recurrenceValue": "2",
    "recurrenceRule": "BEFORE",
    "recurrencePattern": "WEEKLY",
    "recipientName": "ABC",
    "purpose": "14",
    "payerVpa": "venkat337@axisbiz",
    "payeeVpa": "gvkaaaa@stockaxis",
    "merchantKeyId": "3440",
    "mcc": "1234",
    "mandateName": "ABC",
    "initiationMode": "02",
    "initiatedBy": "PAYER",
    "currency": "INR",
    "blockFund": "false",
    "bankAccountUniqueId": "<bankAccountUniqueId>",
    "amountRule": "EXACT",
    "amount": "3000.00",
    "accountReferenceId": "Ace797b05c1d453ca3b0d060695192",
    "action": "upiCreateMandate"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "3000.00",
  "order_id": "ABC1234567890",
  "metadata.YES_BIZ:mandate_name": "metadata.YES_BIZ:ABC",
  "options.create_mandate": "REQUIRED",
  "mandate.max_amount": "2000.00",
  "mandate.amount_rule": "FIXED",
  "mandate.frequency": "MONTHLY",
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
}
```



###   Initiation Mode Table


> **Note**
> [Click here for Initiation Mode](../miscellaneous/initiation-mode)





## Sample Code Snippets:
### Request snippets:

#### Request Code Snippet:

```request
{
  "service": "in.juspay.hyperapi",
  "requestId": "c7f8995c-679d-4ff4-8b55-a1b0a3f227a4",
  "payload": {
    "validityStart": "2022/06/11",
    "validityEnd": "2023/05/15",
    "upiRequestId": "AX7834861502",
    "transactionType": "INTENT_MANDATE",
    "transactionReference": "1234567890",
    "timestamp": "1656567717539.0",
    "signaturePayload": "<Stringified signature payload used for signature generation>",
    "signature": "<Generated signature for signature payload>",
    "recurrenceValue": "2",
    "recurrenceRule": "BEFORE",
    "recurrencePattern": "WEEKLY",
    "recipientName": "ABC",
    "purpose": "14",
    "payerVpa": "venkat337@axisbiz",
    "payeeVpa": "gvkaaaa@stockaxis",
    "merchantKeyId": "3440",
    "mcc": "1234",
    "mandateName": "ABC",
    "initiationMode": "02",
    "initiatedBy": "PAYER",
    "currency": "INR",
    "blockFund": "false",
    "bankAccountUniqueId": "<bankAccountUniqueId>",
    "amountRule": "EXACT",
    "amount": "3000.00",
    "accountReferenceId": "Ace797b05c1d453ca3b0d060695192",
    "action": "upiCreateMandate"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "3000.00",
  "order_id": "ABC1234567890",
  "metadata.YES_BIZ:mandate_name": "metadata.YES_BIZ:ABC",
  "options.create_mandate": "REQUIRED",
  "mandate.max_amount": "2000.00",
  "mandate.amount_rule": "FIXED",
  "mandate.frequency": "MONTHLY",
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
}
```

### Response snippets:

#### Response:
```plaintext
{
  "service": "in.juspay.hyperapi",
  "requestId": "b0d7c0a9-20f2-4e32-9085-15bf2a384200",
  "payload": {
    "status": "SUCCESS",
    "responseMessage": "SUCCESS",
    "responseCode": "SUCCESS",
    "mandatePayload": {
      "validityStart": "2022/07/11",
      "validityEnd": "2023/05/15",
      "umn": "e2bf05b384b844b9b727e513e3429f8e@axisbiz",
      "transactionType": "INTENT_MANDATE",
      "shareToPayee": "true",
      "role": "PAYER",
      "remarks": "bill",
      "refUrl": "https://www.juspay.com/",
      "recurrenceValue": "2",
      "recurrenceRule": "BEFORE",
      "recurrencePattern": "WEEKLY",
      "payerVpa": "something@handle",
      "payerRevocable": "true",
      "payeeVpa": "something@handle",
      "payeeName": "ABC",
      "payeeMcc": "0000",
      "orgMandateId": "AX7834861102",
      "merchantRequestId": "834861102",
      "merchantCustomerId": "1234567891",
      "mandateTimestamp": "2022-06-30T12:56:46+05:30",
      "mandateName": "XYZ",
      "initiatedBy": "PAYER",
      "gatewayResponseStatus": "SUCCESS",
      "gatewayResponseMessage": "",
      "gatewayResponseCode": "00",
      "gatewayReferenceId": "218157918989",
      "gatewayMandateId": "AX7834861102",
      "blockFund": "false",
      "bankAccountUniqueId": "f120f755ff68e41dde5b2dfb4c1d03e94e0a3d0b9021622b588103d81d8cc254",
      "amountRule": "EXACT",
      "amount": "3000.00",
      "accountReferenceId": "<Account Reference Id>",
    },
    "action": "upiCreateMandate"
  },
  "event": "process_result",
  "errorMessage": "",
  "errorCode": "",
  "error": false
}
```

