---
page_source: https://juspay.io/in/docs/upi-plugin-direct-psp/android/process-payloads/upi-onboarding-and-pay
page_title: UPI Onboarding and Pay
---


## UPI Onboarding and Pay



> **Note**
> The following parameters are to be passed in request if it is a pay flow i.e., merchantRequestId, merchantVpa, amount.




###   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
    - **Protected**:
      - Description: Protected payload is a stringified JSON of the details mentioned in the below table.
      - Value:
        - **Kid**:
          - Description: Key ID to identify the public-private key pair used for signature generation.It will be provided to you by the Juspay team.
          - Value: Example: uat833359804655gg748702e324111
          - Tags: String, Mandatory
        - **Alg**:
          - Description: Algorithm to generate JWS signature in respect to base 64.
          - Value: RS256
          - Tags: String, Mandatory
      - Tags: String, Mandatory
    - **Signature**:
      - Description: Generated by base 64 encoding of signaturePayload and Protected.
      - Tags: String, Mandatory
    - **SignaturePayload**:
      - Description: Base 64 encoded stringified signature payload
      - Value:
        - **MerchantId**:
          - Description: Unique identifier associated with an account created by juspay.
          - Value: Example: stock
          - Tags: String, Mandatory
        - **MerchantChannelId**:
          - Description: As provided by Juspay.
          - Value: Example: ABC123
          - Tags: String, Mandatory
        - **MerchantVpa**:
          - Description: VPA of the merchant.
          - Value: Example: abc@xyz
          - Tags: String, Mandatory
        - **Amount**:
          - Description: Amount to be paid. Numeric String with two decimals. If it's use for mutual funds then total amount of the mutual fund would be considered.
          - Value: Example: 2.00
          - Tags: String, Mandatory
        - **MerchantRequestId**:
          - Description: Merchant generated unique request Id for the transaction.
          - Value: Example: ABC123456789
          - Tags: String, Mandatory
        - **MerchantCustomerId**:
          - Description: Any unique reference associated with your customer.
          - Value: Example: abcde12345
          - Tags: String, Mandatory
        - **MutualFundDetails**:
          - Description: Mutual funds details payload. If Mutual funds opted then all the parameters inside it are mandatory.
          - Value:
            - **MemberId**:
              - Description: Member Id required for the customer
              - Value: Example: DECIMLON
              - Tags: String, Mandatory
            - **UserId**:
              - Description: User id for the customer.
              - Value: Example: DECIML
              - Tags: String, Mandatory
            - **Amount**:
              - Description: Amount to be passed in mutual fund.
              - Value: Example: 13.00
              - Tags: String, Mandatory
            - **FolioNumber**:
              - Description: Folio number for the particular mutual fund.
              - Value: Example: 977584255500
              - Tags: String, Mandatory
            - **SchemeCode**:
              - Description: Code value of that particular mutual fund
              - Value: Example: MCGPG
              - Tags: String, Mandatory
            - **InvestmentType**:
              - Description: Type of the investment.
              - Value: Value: LUMPSUM/SIP
              - Tags: String, Mandatory
            - **PanNumber**:
              - Description: PAN number of the customer
              - Value: Example: AJJPM7414Q
              - Tags: String, Mandatory
            - **AmcCode**:
              - Description: The asset management company code of the mutual funds.
              - Value: Example: PLF
              - Tags: String, Mandatory
            - **MfPartner**:
              - Description: Mutual fund partner.
              - Value: value: CAMS/NSE/BSE/KFIN
              - Tags: String, Mandatory
            - **OrderNumber**:
              - Description: Mutual fund's order number
              - Value: 32158
              - Tags: String, Mandatory
          - Tags: JSON, Optional
        - **Timestamp**:
          - Description: Time when request is created in milliseconds.
          - Value: Example: 1665996901100
          - Tags: String, Mandatory
        - **BankAccountHashes**:
          - Description: Array of bank account hashes generated using below method:bankAccountHashes = sha256( account Number + first 4 digit of account IFSC)
            
            From account Number the leading zeros should be removed and then the hash should be calculated.
            
            Eg: accNo = 0000123456789 ifsc = ABCD0000345 Hash will be calculated on 123456789ABCD
          - Value: Example: ["fejgfvhef67t376", "gryiu349rewiufdhsy8934"]
          - Tags: Array, Optional
      - Tags: String, Mandatory
    - **AccountRefId**:
      - Description: Reference Id of the account to be used for pay if user is onboarded.
      - Value: Example: A1234
      - Tags: String, Optional
    - **ShowStatusScreen**:
      - Description: Pass false to hide payment status screen. Default value: true
      - Value: Possible values: true/false
      - Tags: String, Optional
    - **BankCodes**:
      - Description: Array of bank codes for the respective bank accounts.
      - Value: Example: ["550055", "551100"]
      - Tags: Array, Optional
    - **UdfParameters**:
      - Description: Stringified JSON for udf parameters.
      - Tags: 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: Account selected for payment
      - 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
            - **Ifsc**:
              - Description: IFSC Code
              - Value: Example: ABCD0123456
              - Tags: String
          - Tags: JSON
      - Tags: JSON
    - **OrderId**:
      - Description: Order Id of the transaction.
      - Value: Example: ABC123456789
      - Tags: String
    - **MutualFundDetails**:
      - Description: Mutual funds details payload. If Mutual funds opted then all the parameters inside it are mandatory.
      - Value:
        - **MemberId**:
          - Description: Member Id required for the customer
          - Value: Example: DECIMLON
          - Tags: String
        - **UserId**:
          - Description: User id for the customer.
          - Value: Example: DECIML
          - Tags: String
        - **Amount**:
          - Description: Amount to be passed in mutual fund.
          - Value: Example: 13.00
          - Tags: String
        - **FolioNumber**:
          - Description: Folio number for the particular mutual fund.
          - Value: Example: 977584255500
          - Tags: String
        - **SchemeCode**:
          - Description: Code value of that particular mutual fund
          - Value: Example: MCGPG
          - Tags: String
        - **InvestmentType**:
          - Description: Type of the investment.
          - Value: Value: LUMPSUM/SIP
          - Tags: String
        - **PanNumber**:
          - Description: PAN number of the customer
          - Value: Example: AJJPM7414Q
          - Tags: String
        - **AmcCode**:
          - Description: The asset management company code of the mutual funds.
          - Value: Example: PLF
          - Tags: String
        - **MfPartner**:
          - Description: Mutual fund partner.
          - Value: value: CAMS/NSE/BSE/KFIN
          - Tags: String
        - **OrderNumber**:
          - Description: Mutual fund's order number
          - Value: 32158
          - Tags: String
      - Tags: JSON
    - **TxnUuid**:
      - Description: Unique reference number for the transaction
      - Value: Example: ABC123456789
      - Tags: String
    - **AccountRefId**:
      - Description: Reference Id for selected for the account.
      - Value: Example: abcd12345abcde
      - Tags: String
    - **UdfParameters**:
      - 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
{"success":false,"message":"No Data found for the given path"}
```

#### Kotlin Code Snippet:

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



###    


> **Note**
> For more calls refer this section [Additional Processes](../miscellaneous/additional-processes)



