---
page_title: IN-APP UPI with UI
product: UPI TPAP SDK
platform: Android
page_source: https://juspay.io/in/docs/upi-tpap-sdk/android/ui-process-payloads/inapp-ui
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/upi-tpap-sdk/llms.txt
---


## 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: upiGetSessionToken
      - 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
  - 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: upiGetSessionToken
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : FAILURE / 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
        - **Account**:
          - 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
            - **IsInitialTopUpDone**:
              - Description: This key will be available in UPI Lite usecase. The value of this either be 'true' or 'topup_txn_pending', the occurence of 'topup_txn_pending' will be very rare and its state will get updated in every 10mins.
              - Value: Possible values: true/topup_txn_pending
              - Tags: Conditional
            - **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
    - **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: -

#### Java Code Snippet:

```java
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetSessionToken",
    "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"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetSessionToken",
    "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: -

#### Java Code Snippet:

```java
{
  "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"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "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
    - **CustomerMobileNumber**:
      - Description: Customer mobile number. Device binding will take place via this number if the parameter is passed.
      - Value: 12 digits mobile number string
      - Tags: String, Conditional
    - **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
        - **Metadata.<issuing_psp>:gateway_reference_id**:
          - Description: In case of multiple merchant VPAs, this field needs to be passed. It can be obtained from the dashboard. Issuing_PSP will be either AXIS_BIZ or YES_BIZ.
            
            Value: ABC123
          - Tags: String, Conditional
      - Tags: String, Mandatory
    - **ShowStatusScreen**:
      - Description: Pass false to hide payment status screen. Default value: true
      - Value: Possible values: true/false
      - Tags: Boolean, Optional
    - **AccountRefId**:
      - Description: Reference Id of the account to be used for pay if user is onboarded.
      - Value: Example: A1234
      - Tags: String, Optional
    - **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: Value: onboardingAndPay
      - Tags: String
    - **Status**:
      - Description: Status of the Operation. Possible values : SUCCESS, PENDING, FAILURE, Pay_Failure, BACKPRESS, USER_ABORTED
      - Value: Example: SUCCESS
      - Tags: String
    - **SelectedAccount**:
      - Description: Selected Account
      - Value:
        - **Vpa**:
          - Description: UPI ID linked to account
          - Tags: String
        - **Account**:
          - Description: Account linked to this vpa
          - Value:
            - **Ifsc**:
              - Description: Account IFSC
              - Tags: String
            - **MpinSet**:
              - Description: Is mpin set
              - Value: true/false
              - Tags: String
            - **BankCode**:
              - Description: IIN Code for the bank
              - Tags: String
            - **ReferenceId**:
              - Tags: String
            - **MaskedAccountNumber**:
              - Description: Account Number with last few digits visible
              - Tags: String
            - **IsPrimary**:
              - Description: Is this account the primary account
              - Value: true / false
              - Tags: String
            - **BankName**:
              - Description: Name of branch in which account is registered
              - Tags: String
          - Tags: JSON
      - Tags: JSON
    - **OrderId**:
      - Description: Order ID for the transaction.
      - Value: Example: ABC1234567890
      - Tags: String
    - **AccountRefId**:
      - Description: Reference Id for selected account
      - Value: A12345
      - Tags: String
    - **UdfParameters**:
      - Description: As passed in request
      - Tags: String
    - **TxnUuid**:
      - Description: Example: moz3hjuAtiiQriCVFBn
      - 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: -

#### Java Code Snippet:

```java
{
  "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>",
    "accountRefId": "<Account reference Id>",
    "showStatusScreen": "true",
    "udfParameters": "{}"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.00",
  "metadata.<issuing_psp>:gateway_reference_id" : "ABC123",
  "order_id": "ABC1234567890"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "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>",
    "accountRefId": "<Account reference Id>",
    "showStatusScreen": "true",
    "udfParameters": "{}"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.00",
  "metadata.<issuing_psp>:gateway_reference_id" : "ABC123",
  "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
        - **Metadata.<issuing_psp>:gateway_reference_id**:
          - Description: In case of multiple merchant VPAs, this field needs to be passed. It can be obtained from the dashboard. Issuing_PSP will be either AXIS_BIZ or YES_BIZ.
            
            Value: ABC123
          - Tags: String, Conditional
      - 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
    - **TxnUuid**:
      - Description: Example: moz3hjuAtiiQriCVFBn
      - Tags: String
    - **SelectedAccount**:
      - Description: Selected Account
      - Value:
        - **Vpa**:
          - Description: Vpa of the customer
          - Tags: String
        - **Account**:
          - Description: Account linked to this vpa
          - Value:
            - **AtmPinLength**:
              - Description: Length of atm pin
              - Tags: String
            - **BankAccountUniqueId**:
              - Description: Unique Identifier for bank account across banks
              - Tags: String
            - **BankCode**:
              - Description: IIN Code for the bank
              - Tags: String
            - **BankName**:
              - Description: Name of branch in which account is registered
              - Tags: String
            - **Ifsc**:
              - Description: Account IFSC
              - Tags: String
            - **IsPrimary**:
              - Description: Is this account the primary account
              - Value: true / false
              - 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: true / false
              - Tags: String
            - **Name**:
              - Description: Name of account holder
              - Tags: String
            - **OtpLength**:
              - Description: Length of OTP
              - Tags: String
            - **ReferenceId**:
              - Tags: String
            - **Type**:
              - Description: Type of account
              - Tags: String
          - Tags: String
      - 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: -

#### Java Code Snippet:

```java
{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id" :"ABC123",
  "order_id": "ABC1234567890"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id" :"ABC123",
  "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
        - **Metadata.<issuing_psp>:gateway_reference_id**:
          - Description: In case of multiple merchant VPAs, this field needs to be passed. It can be obtained from the dashboard. Issuing_PSP will be either AXIS_BIZ or YES_BIZ.
            
            Value: ABC123
          - Tags: String, Conditional
      - 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, Pay_Failure, BACKPRESS, USER_ABORTED
      - 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: -

#### Java Code Snippet:

```java
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "shouldCreateMandate": true,
    "initiationMode": "13",
    "purpose": "76",
    "payType":"P2M_PAY",
    "bankCodes": "["550055", "551100"]",   // Only in case of TPV
    "transactionReference": "111-CM-1122334456-brokerref",
    "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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",
  "bankAccountHashes": "["fejgfvhef67t376", "gryiu349rewiufdhsy8934"]",   //Only in case of TPV
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
  "mandate.block_fund": "true",
  "mandate.payer_revocable: "false"
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "shouldCreateMandate": true,
    "initiationMode": "13",
    "purpose": "76",
    "payType":"P2M_PAY",
    "bankCodes": "["550055", "551100"]",   // Only in case of TPV
    "transactionReference": "111-CM-1122334456-brokerref",
    "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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",
  "bankAccountHashes": "["fejgfvhef67t376", "gryiu349rewiufdhsy8934"]",   //Only in case of TPV
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
  "mandate.block_fund": "true",
  "mandate.payer_revocable: "false"
}
```



### 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
        - **Metadata.<issuing_psp>:gateway_reference_id**:
          - Description: In case of multiple merchant VPAs, this field needs to be passed. It can be obtained from the dashboard. Issuing_PSP will be either AXIS_BIZ or YES_BIZ.
            
            Value: ABC123
          - Tags: String, Conditional
      - 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: -

#### Java Code Snippet:

```java
{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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
{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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)





---

## Complete Code Reference

The following code files are referenced in the steps above:

### InappUI.txt

```
// block:start:getSessionTokenReq

{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetSessionToken",
    "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"
}

// block:end:getSessionTokenReq

// block:start:getSessionTokenResp

{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetSessionToken",
    "status": "LINKED",
    "isDeviceBound": "true",
    "isDeviceActivated": "true",
    "vpaAccounts": [{
      "account": {
        "bankCode": "11111",
        "bankName": "ABCD",
        "maskedAccountNumber": "XXXX203891",
        "mpinLength": "6",
        "mpinSet": "true",
        "isInitialTopUpDone": "true",   //In case of UPI lite
        "referenceId": "A0760cb548bb4dda9d32e3030863dd5",
        "isPrimary": "true",
        "otpLength": "6",
        "atmPinLength": "6"
      },
      "vpa": "abc@xyz"
    }],
    "prefix": "XYZ"
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:getSessionTokenResp

// block:start:onboardingReq

{
  "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"
}

// block:end:onboardingReq

// block:start:onboardingResp

{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboarding",
    "status": "SUCCESS",
    "linkedAccounts": [{
      "account": {
        "bankCode": "11111",
        "bankName": "ABCD",
        "maskedAccountNumber": "XXXX203891",
        "mpinSet": "true",
        "referenceId": "A0760cb548bb4dda9d32e3030863dd5",
        "isPrimary": "true",
        "type": "SAVINGS",
        "ifsc": "ABCD0123456",
        "name": "ABC",
        "branchName": "Bengaluru"
      },
      "vpa": "7834861582-gww@yesg"
    }]
    "selectedAccount": {
      "account": {
        "bankCode": "11111",
        "bankName": "ABCD",
        "maskedAccountNumber": "XXXX203891",
        "mpinSet": "true",
        "referenceId": "A0760cb548bb4dda9d32e3030863dd5",
        "isPrimary": "true",
        "type": "SAVINGS",
        "ifsc": "ABCD0123456",
        "name": "ABC",
        "branchName": "Bengaluru"
      },
      "vpa": "7834861582-gww@yesg"
    }
    "sessionTokenResponse": {
      "status": "LINKED",
      "vpaAccounts": [{
        "account": {
          "bankCode": "11111",
          "bankName": "ABCD",
          "maskedAccountNumber": "XXXX203891",
          "mpinSet": "true",
          "referenceId": "A0760cb548bb4dda9d32e3030863dd5",
          "isPrimary": "true"
        },
        "vpa": "7834861582-gww@yesg"
      }]
    }
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:onboardingResp

// block:start:onboardingAndPayReq

{
  "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>",
    "accountRefId": "<Account reference Id>",
    "showStatusScreen": "true",
    "udfParameters": "{}"
  }
}

"signaturePayload": {
  "merchant_id": "stock",
  "customer_id": "abcde12345",
  "timestamp": "1668389349848",
  "amount": "200.00",
  "metadata.<issuing_psp>:gateway_reference_id" : "ABC123",
  "order_id": "ABC1234567890"
}

// block:end:onboardingAndPayReq

// block:start:onboardingAndPayResp

{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "txnUuid": "mozoghi9Z6PsanCGWK1V",
    "selectedAccount": {
      "vpa": "XXXX",
      "account": {
        "ifsc": "ABCD0000011",
        "mpinSet": "true",
        "bankCode": "123456",
        "referenceId": "A621542c281c4a20b8faf0ee1cb75d",
        "maskedAccountNumber": "XXXXXXX20000",
        "isPrimary": "true",
        "bankName": "Mybank"
      }
    },
    "orderId": "ABCDE12345",
    "status": "SUCCESS",
    "accountRefId": "A621542c281c4a20b8faf0ee1cb75d",
    "udfParameters": "{}"
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:onboardingAndPayResp

// block:start:payReq

{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id" :"ABC123",
  "order_id": "ABC1234567890"
}

// block:end:payReq

// block:start:payResp

{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiTxn",
    "txnUuid": "moz3hjuAtiiQriCVFBn",
    "selectedAccount": {
      "vpa": "abc@xyz",
      "account": {
        "type": "SAVINGS",
        "referenceId": "A0387f9jkl54476183527acfaf9491",
        "otpLength": "6",
        "name": "XXXXat",
        "mpinSet": "true",
        "mpinLength": "6",
        "maskedAccountNumber": "XXXXXXX20000",
        "isPrimary": "true",
        "ifsc": "AAAA1236543",
        "branchName": "",
        "bankName": "MYPSP",
        "bankCode": "500001",
        "bankAccountUniqueId": "082eedaa58700e492179e97841584HJ8d39a4cff9275ef8ee9bc59f9186d3d68",
        "atmPinLength": "4"
      }
    },
    "status": "SUCCESS"
    "orderId": "ABC1234567890"
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:payResp

// block:start:onboardingAndCreateMandateReq

{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "shouldCreateMandate": true,
    "initiationMode": "13",
    "purpose": "76",
    "payType":"P2M_PAY",
    "bankCodes": "["550055", "551100"]",   // Only in case of TPV
    "transactionReference": "111-CM-1122334456-brokerref",
    "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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",
  "bankAccountHashes": "["fejgfvhef67t376", "gryiu349rewiufdhsy8934"]",   //Only in case of TPV
  "mandate.start_date": "166674893389237",
  "mandate.end_date": "16667389373820323",
  "mandate.block_fund": "true",
  "mandate.payer_revocable: "false"
}

// block:end:onboardingAndCreateMandateReq

// block:start:onboardingAndCreateMandateResp

{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "onboardingAndPay",
    "status": "SUCCESS",
    "mandate": {
      "amount": "10.00",
      "amountRule": "EXACT",
      "blockFund": "false",
      "expiry": "2022-01-02T14:17:06+05:30",
      "gatewayMandateId": "YJPMe5c9711f1ede1f5524e2fadb48003aa0",
      "gatewayReferenceId": "806115044725",
      "gatewayResponseCode": "00",
      "gatewayResponseMessage": "Your transaction is successful",
      "gatewayResponseStatus": "SUCCESS",
      "initiatedBy": "PAYER",
      "mandateName": "Test Mandate",
      "mandateTimestamp": "2021-12-30T14:17:06+05:30",
      "merchantCustomerId": "DEMO-1234",
      "merchantRequestId": "eulb1a4418b4ac",
      "orgMandateId": "BJJMe5c9711f1ede1f5524e2f92648y03aa0",
      "payeeMcc": "4924",
      "payeeName": "GROWW",
      "payeeVpa": "growwuat@ypay",
      "payerName": "customer1",
      "payerRevocable": "true",
      "payerVpa": "customer1@ypay",
      "recurrencePattern": "WEEKLY",
      "recurrenceRule": "BEFORE",
      "recurrenceValue": "2",
      "refUrl": "https://www.google.com",
      "remarks": "Sample Remarks",
      "role": "PAYER",
      "shareToPayee": "true",
      "transactionType": "UPI_MANDATE",
      "umn": "uniqueMandateNumber@ypay",
      "validityEnd": "2022/09/20",
      "validityStart": "2022/01/20"
    }
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:onboardingAndCreateMandateResp

// block:start:createMandateReq

{
  "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",
  "metadata.<issuing_psp>:gateway_reference_id": "ABC123",
  "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"
}

// block:end:createMandateReq

// block:start:createMandateResp

{
  "requestId": "79fc93aa-2d98-49c9-bbb1-2beaafd4f3b6",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiTxn",
    "status": "SUCCESS",
    "mandate": {
      "amount": "10.00",
      "amountRule": "EXACT",
      "blockFund": "false",
      "expiry": "2022-01-02T14:17:06+05:30",
      "gatewayMandateId": "YJPMe5c9711f1ede1f5524e2fadb48003aa0",
      "gatewayReferenceId": "806115044725",
      "gatewayResponseCode": "00",
      "gatewayResponseMessage": "Your transaction is successful",
      "gatewayResponseStatus": "SUCCESS",
      "initiatedBy": "PAYER",
      "mandateName": "Test Mandate",
      "mandateTimestamp": "2021-12-30T14:17:06+05:30",
      "merchantCustomerId": "DEMO-1234",
      "merchantRequestId": "eulb1a4418b4ac",
      "orgMandateId": "BJJMe5c9711f1ede1f5524e2f92648y03aa0",
      "payeeMcc": "4924",
      "payeeName": "GROWW",
      "payeeVpa": "growwuat@ypay",
      "payerName": "customer1",
      "payerRevocable": "true",
      "payerVpa": "customer1@ypay",
      "recurrencePattern": "WEEKLY",
      "recurrenceRule": "BEFORE",
      "recurrenceValue": "2",
      "refUrl": "https://www.google.com",
      "remarks": "Sample Remarks",
      "role": "PAYER",
      "shareToPayee": "true",
      "transactionType": "UPI_MANDATE",
      "umn": "uniqueMandateNumber@ypay",
      "validityEnd": "2022/09/20",
      "validityStart": "2022/01/20"
    }
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}

// block:end:createMandateResp
```


---

## See Also

- [Intent Handling](https://juspay.io/in/docs/upi-tpap-sdk/android/interaction-with-sdk/intent-handling)
- [UPI Management with UI ](https://juspay.io/in/docs/upi-tpap-sdk/android/ui-process-payloads/management)
