---
page_source: https://docs.juspay.io/upi-inapp/flutter/ui-process-payloads/inapp-ui
page_title: IN-APP UPI with UI
---


## IN-APP UPI with UI




### 1. Get Session Token



This operation will provide the merchant with necessary information about the users onboarding status and VPA accounts available (if any). Based on the response, users will be redirected to different entry points in the onboarding & pay flow.


###   Process Parameters


> **Note**
> Status Description
> 
> NOPERMISSION - User has not given necessary permissions yet (SMS, Phone). FRESH - Necessary permissions are provided but the user is not registered. BOUND - User registered on device but no accounts are found. LINKED - User registered on device and valid accounts are found.




## 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: getSessionToken
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload
      - 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.Ex: stock
          - Tags: String, Mandatory
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Tags: String, Mandatory
      - 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: getSessionToken
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : NOPERMISSION / FRESH / BOUND / LINKED Accounts will be available only in case status is LINKED.
      - Tags: String
    - **IsDeviceBound**:
      - Description: If the current device is in bound state or not.
      - Value: Possible values: true/false
      - Tags: String
    - **IsDeviceActivated**:
      - Description: If the device is in active state or not
      - Value: Possible values: true/false
      - Tags: String
    - **Prefix**:
      - Description: Prefix to append before requestID
      - Value: Example: ABC
      - Tags: String
    - **VpaAccounts**:
      - Description: It's an array of Vpa Accounts. We will get this only after successful linking of accounts.
      - Value:
        - **Vpa**:
          - Description: Vpa
          - Tags: String
        - **Accounts**:
          - Description: Accounts linked to this vpa
          - Value:
            - **BankCode**:
              - Description: IIN Code for the bank
              - Tags: String
            - **BankName**:
              - Description: Name of bank
              - Tags: String
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Tags: String
            - **MpinLength**:
              - Description: Length of mpin
              - Tags: String
            - **MpinSet**:
              - Description: Is mpin set?
              - Value: Possible values: true/false
              - Tags: String
            - **ReferenceId**:
              - Description: Account Reference Id
              - Tags: String
            - **OtpLength**:
              - Description: Length of OTP
              - Value: Example: 6
              - Tags: String
            - **AtmPinLength**:
              - Description: Length of atm pin
              - Value: Example: 6
              - Tags: String
            - **Type**:
              - Description: Type of account
              - Value: Example: Savings
              - Tags: String
            - **BranchName**:
              - Description: Name of branch in which account is registered
              - Tags: String
            - **BankAccountUniqueId**:
              - Description: Unique Identifier for bank account across banks
              - Tags: String
            - **Ifsc**:
              - Description: Account IFSC
              - Tags: String
            - **IsPrimary**:
              - Description: Is this account the primary account
              - Value: Possible values: true/false
              - Tags: String
            - **Name**:
              - Description: Name of account holder
              - Value: Example: ABC
              - Tags: String
          - Tags: Array of JSON
      - Tags: Array of JSON
    - **CustomerMobileNumber**:
      - Description: Masked phone number of the customer
      - Value: <Customer mobile number>
      - Tags: String
    - **DeviceFingerPrint**:
      - Description: Unique fingerprint of the device
      - Tags: String
    - **ExpiryTimestamp**:
      - Description: Expiry time of token
      - Tags: String
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "getSessionToken",
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload used for signature generation>"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848"
}
```



### 2. UPI Onboarding




###   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. Should be onboarding for this call.
      - Value: Value: onboarding
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - 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
        - **Customer_id**:
          - Description: Any unique reference associated with your customer.
          - Value: Example: abcde12345
          - Tags: String, Mandatory
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
  - 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: Value: onboarding
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, FAILURE
      - Value: Example: SUCCESS
      - Tags: String
    - **LinkedAccounts**:
      - Description: Array of bank accounts linked
      - Value:
        - **Vpa**:
          - Description: UPI ID linked to account
          - Value: Example: abc@xyz
          - Tags: String
        - **Account**:
          - Description: Account Details
          - Value:
            - **BankCode**:
              - Description: Bank Code
              - Value: Example: 123456
              - Tags: String
            - **BankName**:
              - Description: Bank Name
              - Value: Example: YES Bank
              - Tags: String
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Value: Example: XXXXXXXXX1234
              - Tags: String
            - **MpinSet**:
              - Description: Is MPIN set?
              - Value: Value: true/false
              - Tags: String
            - **ReferenceId**:
              - Description: Unique Identifier for the account
              - Value: Example: abcd1234xyz
              - Tags: String
            - **IsPrimary**:
              - Description: Is the account primary?
              - Value: Value: true/false
              - Tags: String
            - **Type**:
              - Description: Type of account: SAVINGS/CURRENT/OVERDRAFT
              - Value: Example: SAVINGS
              - Tags: String
            - **Ifsc**:
              - Description: IFSC Code
              - Value: Example: ABCD0123456
              - Tags: String
            - **Name**:
              - Description: Account Holder Name
              - Value: Example: ABC
              - Tags: String
            - **BranchName**:
              - Description: Branch Name
              - Value: Example: Bengaluru
              - Tags: String
          - Tags: JSON
      - Tags: Array
    - **SelectedAccount**:
      - Description: Account selected from array of linked accounts
      - Value: Details of selected bank account
      - Tags: JSON
    - **SessionTokenResponse**:
      - Description: In case status=LINKED, this key will contain all the required user information.
      - Value: Refer above section
      - Tags: JSON
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "8cbc3fad-8b3f-40c0-ae93-2d7e75a8624a",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboarding",
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload>",
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848"
}
```



### 3. UPI Onboarding and Payment




###   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. Should be onboardingAndPay for this call.
      - Value: Value: onboardingAndPay
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - 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
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals
          - Value: Example: 2.00
          - 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
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **ShowStatusScreen**:
      - Description: Pass false to hide payment status screen. Default value: true
      - Value: Possible values: true/false
      - Tags: Boolean, 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: Value: onboardingAndPay
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, PENDING, FAILURE
      - Value: Example: SUCCESS
      - Tags: String
    - **LinkedAccounts**:
      - Description: Array of bank accounts linked
      - Value:
        - **Vpa**:
          - Description: UPI ID linked to account
          - Value: Example: abc@xyz
          - Tags: String
        - **Account**:
          - Description: Account Details
          - Value:
            - **BankCode**:
              - Description: Bank Code
              - Value: Example: 123456
              - Tags: String
            - **BankName**:
              - Description: Bank Name
              - Value: Example: YES Bank
              - Tags: String
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Value: Example: XXXXXXXXX1234
              - Tags: String
            - **MpinSet**:
              - Description: Is MPIN set?
              - Value: Value: true/false
              - Tags: String
            - **ReferenceId**:
              - Description: Unique Identifier for the account
              - Value: Example: abcd1234xyz
              - Tags: String
            - **IsPrimary**:
              - Description: Is the account primary?
              - Value: Value: true/false
              - Tags: String
            - **Type**:
              - Description: Type of account: SAVINGS/CURRENT/OVERDRAFT
              - Value: Example: SAVINGS
              - Tags: String
            - **Ifsc**:
              - Description: IFSC Code
              - Value: Example: ABCD0123456
              - Tags: String
            - **Name**:
              - Description: Account Holder Name
              - Value: Example: ABC
              - Tags: String
            - **BranchName**:
              - Description: Branch Name
              - Value: Example: Bengaluru
              - Tags: String
          - Tags: JSON
      - Tags: Array
    - **SelectedAccount**:
      - Description: Account selected from array of linked accounts
      - Value: Details of selected bank account
      - Tags: JSON
    - **SessionTokenResponse**:
      - Description: In case status=LINKED, this key will contain all the required user information.
      - Value: Refer above section
      - Tags: JSON
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload used for signature generation>"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.00",
  "order_id": "ABC1234567890"
}
```



### 4. UPI Payment (P2M)




###   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. Should be upiTxn for this call.
      - Value: Value: upiTxn
      - Tags: String, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - Tags: String, Mandatory
    - **AccountRefId**:
      - Description: Reference ID for selected account
      - Value: Example: ABC123456789
      - 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
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals
          - Value: Example: 2.00
          - 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
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
      - Tags: String, Mandatory
  - 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: Value: upiTxn
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, PENDING, FAILURE
      - Value: Example: SUCCESS
      - Tags: String
    - **Order_id**:
      - Description: Order ID for the transaction.
      - Value: Example: ABC123456789
      - Tags: String
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiTxn",
    "accountRefId": "ABC123456789",
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload used for signature generation>"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.00",
  "order_id": "ABC1234567890"
}
```



### 5. UPI Onboarding and Mandate Creation




###   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. Should be onboardingAndPay for this call.
      - Value: Value: onboardingAndPay
      - Tags: String, Mandatory
    - **ShouldCreateMandate**:
      - Description: Value: true
      - Tags: Boolean, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - 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
        - **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**:
          - Description: 'REQUIRED' means that the transaction for this order has to be definitely converted to a mandate. 'OPTIONAL' means that the final decision of conversion of the transaction lies at the /txns api call with the flag 'should_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
  - 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: Value: onboardingAndPay
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, PENDING, FAILURE
      - Value: Example: SUCCESS
      - Tags: String
    - **Mandate**:
      - Description: Contains relevant mandate data
      - Value:
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals
          - Value: Example: 500.00
          - Tags: String
        - **AmountRule**:
          - Description: Values possible: FIXED/VARIABLE
          - Value: Example: FIXED
          - Tags: String
        - **BlockFund**:
          - Description: Values possible: true/false
          - Tags: Boolean
        - **Expiry**:
          - Description: Timestamp upto which mandate creation request is valid. It will only be present if mandate is initiated by PAYEE.
          - Value: Timestamp in YYYY-MM-DDTHH:MM:SS+05:30 format, request timestamp plus expiry minutes passed in request.
          - Tags: Timestamp
        - **GatewayMandateId**:
          - Description: UPI request id returned by gateway for the mandate
          - Value: Example: abc12345
          - Tags: String
        - **GatewayReferenceId**:
          - Description: Customer reference number (rrn) for the mandate Operation
          - Value: Example: 1234567890
          - Tags: String
        - **GatewayResponseCode**:
          - Description: Response code returned by gateway for the mandate Operation.
          - Value: Example: 00
          - Tags: String
        - **GatewayResponseMessage**:
          - Description: Response message returned by gateway for the mandate Operation.
          - Value: Example: Your transaction is successful.
          - Tags: String
        - **GatewayResponseStatus**:
          - Description: Response status returned by gateway
          - Value: Example: SUCCESS
          - Tags: String
        - **InitiatedBy**:
          - Description: Describes whether PAYER or PAYEE has initiated the mandate.
          - Value: Example: PAYER
          - Tags: String
        - **MandateName**:
          - Description: Name of the mandate
          - Value: Example: Test Mandate
          - Tags: String
        - **MandateTimestamp**:
          - Description: Timestamp of when this request was attempted
          - Value: Example: 2021-12-30T14:17:06+05:30.
          - Tags: YYYY-MM-DDTHH:MM:SS+05:30
        - **OrgMandateId**:
          - Description: upiRequestId of the create request.
          - Value: Example: abcd123456
          - Tags: String
        - **PayeeMcc**:
          - Description: Merchant Category Code of the payee merchant.
          - Value: Example: 1234
          - Tags: String
        - **PayeeName**:
          - Description: Name of the Payee involved in mandate. It will be present only if role is PAYER.
          - Value: Example: ABC
          - Tags: String
        - **PayeeVpa**:
          - Description: VPA of payee
          - Value: Example: abc@xyz
          - Tags: String
        - **PayerName**:
          - Description: Name of the Payer involved in mandate. It will be present only if role is PAYEE.
          - Value: Example: XYZ
          - Tags: String
        - **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: Value: true/false
          - Tags: String
        - **PayerVpa**:
          - Description: vpa of payer
          - Value: Example: pqr@xyz
          - Tags: String
        - **RecurrencePattern**:
          - Description: Recurrence Pattern for Mandate
          - Value: Example: WEEKLY
          - Tags: String
        - **RecurrenceRule**:
          - Description: Recurrence Rule for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Value: Example: ASPRESENTED
          - Tags: String
        - **RecurrenceValue**:
          - Description: Recurrence Value for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Value: Example: 2
          - Tags: String
        - **RefUrl**:
          - Description: Reference url for the mandate. It will be same value if passed in request else it will be a default url.
          - Value: Example: www.abcxyz.com
          - Tags: String
        - **Remarks**:
          - Description: Any mandate summary. If passed in request, it will be same in response else a default value is sent.
          - Value: Example: UPI Mandate
          - Tags: String
        - **Role**:
          - Description: Role of the customer for this mandate.
          - Value: Value: PAYER/PAYEE
          - Tags: String
        - **ShareToPayee**:
          - Description: Describes whether the mandate will be shared with payee or not. For onetime mandate it can be true or false. Default value is true.
          - Value: Value: true/false
          - Tags: String
        - **TransactionType**:
          - Description: Type of Mandate Creation
          - Value: Example: UPI_MANDATE
          - Tags: String
        - **Umn**:
          - Description: Unique Mandate Number used for execution of the mandate. Will be sent only if mandate is initiated by Payer.
          - Value: Example: uniqueMandateNumber@xyz
          - Tags: String
        - **ValidityEnd**:
          - Description: Date before which mandate can be executed.
          - Value: Example: 2022/09/20
          - Tags: String
        - **ValidityStart**:
          - Description: As passed for validityStart in request
          - Value: Example: 2022/01/20
          - Tags: String
      - Tags: JSON
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "shouldCreateMandate": true,
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload used for signature generation>"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.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"
}
```



### 6. UPI Mandate Creation




###   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. Should be onboardingAndPay for this call.
      - Value: Value: upiTxn
      - Tags: String, Mandatory
    - **ShouldCreateMandate**:
      - Description: Value: true
      - Tags: Boolean, Mandatory
    - **MerchantKeyId**:
      - Description: Key ID to identify the public-private key pair used for signature generation.
      - Value: Example: 1234
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Signature generated for the signaturePayload.
      - Tags: String, Mandatory
    - **AccountRefId**:
      - Description: referenceId of the account you are using for pay. Can be retrieved from getSesionToken/onboarding Response
      - Value: Example: abcd1234xyz
      - 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
        - **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**:
          - Description: 'REQUIRED' means that the transaction for this order has to be definitely converted to a mandate. 'OPTIONAL' means that the final decision of conversion of the transaction lies at the /txns api call with the flag 'should_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
  - 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: Value: upiTxn
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, PENDING, FAILURE
      - Value: Example: SUCCESS
      - Tags: String
    - **Mandate**:
      - Description: Contains relevant mandate data
      - Value:
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals
          - Value: Example: 500.00
          - Tags: String
        - **AmountRule**:
          - Description: Values possible: FIXED/VARIABLE
          - Value: Example: FIXED
          - Tags: String
        - **BlockFund**:
          - Description: Values possible: true/false
          - Tags: Boolean
        - **Expiry**:
          - Description: Timestamp upto which mandate creation request is valid. It will only be present if mandate is initiated by PAYEE.
          - Value: Timestamp in YYYY-MM-DDTHH:MM:SS+05:30 format, request timestamp plus expiry minutes passed in request.
          - Tags: Timestamp
        - **GatewayMandateId**:
          - Description: UPI request id returned by gateway for the mandate
          - Value: Example: abc12345
          - Tags: String
        - **GatewayReferenceId**:
          - Description: Customer reference number (rrn) for the mandate Operation
          - Value: Example: 1234567890
          - Tags: String
        - **GatewayResponseCode**:
          - Description: Response code returned by gateway for the mandate Operation.
          - Value: Example: 00
          - Tags: String
        - **GatewayResponseMessage**:
          - Description: Response message returned by gateway for the mandate Operation.
          - Value: Example: Your transaction is successful.
          - Tags: String
        - **GatewayResponseStatus**:
          - Description: Response status returned by gateway
          - Value: Example: SUCCESS
          - Tags: String
        - **InitiatedBy**:
          - Description: Describes whether PAYER or PAYEE has initiated the mandate.
          - Value: Example: PAYER
          - Tags: String
        - **MandateName**:
          - Description: Name of the mandate
          - Value: Example: Test Mandate
          - Tags: String
        - **MandateTimestamp**:
          - Description: Timestamp of when this request was attempted
          - Value: Example: 2021-12-30T14:17:06+05:30.
          - Tags: YYYY-MM-DDTHH:MM:SS+05:30
        - **OrgMandateId**:
          - Description: upiRequestId of the create request.
          - Value: Example: abcd123456
          - Tags: String
        - **PayeeMcc**:
          - Description: Merchant Category Code of the payee merchant.
          - Value: Example: 1234
          - Tags: String
        - **PayeeName**:
          - Description: Name of the Payee involved in mandate. It will be present only if role is PAYER.
          - Value: Example: ABC
          - Tags: String
        - **PayeeVpa**:
          - Description: VPA of payee
          - Value: Example: abc@xyz
          - Tags: String
        - **PayerName**:
          - Description: Name of the Payer involved in mandate. It will be present only if role is PAYEE.
          - Value: Example: XYZ
          - Tags: String
        - **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: Value: true/false
          - Tags: String
        - **PayerVpa**:
          - Description: vpa of payer
          - Value: Example: pqr@xyz
          - Tags: String
        - **RecurrencePattern**:
          - Description: Recurrence Pattern for Mandate
          - Value: Example: WEEKLY
          - Tags: String
        - **RecurrenceRule**:
          - Description: Recurrence Rule for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Value: Example: ASPRESENTED
          - Tags: String
        - **RecurrenceValue**:
          - Description: Recurrence Value for Mandate. It will not be present for ONETIME, DAILY and ASPRESENTED recurrence pattern.
          - Value: Example: 2
          - Tags: String
        - **RefUrl**:
          - Description: Reference url for the mandate. It will be same value if passed in request else it will be a default url.
          - Value: Example: www.abcxyz.com
          - Tags: String
        - **Remarks**:
          - Description: Any mandate summary. If passed in request, it will be same in response else a default value is sent.
          - Value: Example: UPI Mandate
          - Tags: String
        - **Role**:
          - Description: Role of the customer for this mandate.
          - Value: Value: PAYER/PAYEE
          - Tags: String
        - **ShareToPayee**:
          - Description: Describes whether the mandate will be shared with payee or not. For onetime mandate it can be true or false. Default value is true.
          - Value: Value: true/false
          - Tags: String
        - **TransactionType**:
          - Description: Type of Mandate Creation
          - Value: Example: UPI_MANDATE
          - Tags: String
        - **Umn**:
          - Description: Unique Mandate Number used for execution of the mandate. Will be sent only if mandate is initiated by Payer.
          - Value: Example: uniqueMandateNumber@xyz
          - Tags: String
        - **ValidityEnd**:
          - Description: Date before which mandate can be executed.
          - Value: Example: 2022/09/20
          - Tags: String
        - **ValidityStart**:
          - Description: As passed for validityStart in request
          - Value: Example: 2022/01/20
          - Tags: String
      - Tags: JSON
  - 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: -

#### Flutter Code Snippet:

```flutter
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiTxn",
    "shouldCreateMandate": true,
    "merchantKeyId": "<Merchant Key Id>",
    "signature": "<Generated signature for signature payload>",
    "signaturePayload": "<Stringified signature payload used for signature generation>",
    "accountRefId" : "<Account reference taken from session>"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.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"
}
```



###    


> **Note**
> For more calls refer this section [Management Calls](management)



