---
page_source: https://docs.juspay.io/upi-inapp/flutter/headless-process-payloads/get-accounts
page_title: Get Accounts
---


## Get Accounts



The merchant can call this API to allow a customer to fetch Account


###   Process Parameters



## Request Payload
- **RequestId**:
  - Description: Unique uuid-v4 string
  - Value: Example: abcd-12345-abcd-12345
  - Tags: String, Mandatory
- **Service**:
  - Description: Value: in.juspay.hyperapi
  - Tags: String, Mandatory
- **Payload**:
  - Description: Parameters required to call Hyper SDK API
  - Value:
    - **Action**:
      - Description: Operation to be performed in the SDK.
      - Value: upiGetAccounts
      - Tags: String, Mandatory
    - **BankCodes**:
      - Description: Array of Bank IIN numbers to be searched for accounts
      - Tags: Array of String, Mandatory
    - **AccountType**:
      - Description: To be passed when credit account needs to be linked
      - Value: CREDIT
      - Tags: String, Optional
    - **UdfParameters**:
      - Description: Passed by merchant
      - 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 to be performed in the SDK.
      - Value: upiGetAccounts
      - Tags: String, Mandatory
    - **Status**:
      - Description: If upiGetAccounts was success or failed
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **Accounts**:
      - Description: Contains details about customer's accounts
      - Value:
        - **BankCode**:
          - Description: IIN Code for the bank
          - Tags: String, Mandatory
        - **BankName**:
          - Description: Name of bank
          - Tags: String, Mandatory
        - **MaskedAccountNumber**:
          - Description: Account Number with last few digits visible
          - Tags: String, Mandatory
        - **OtpLength**:
          - Description: Length of OTP
          - Tags: String, Mandatory
        - **AtmPinLength**:
          - Description: Length of atm pin
          - Tags: String, Mandatory
        - **MpinLength**:
          - Description: Length of mpin
          - Tags: String, Mandatory
        - **MpinSet**:
          - Description: Is mpin set
          - Value: true / false
          - Tags: String, Mandatory
        - **ReferenceId**:
          - Tags: String, Mandatory
        - **AccountNumber**:
          - Tags: String, Optional
        - **Type**:
          - Description: Type of account
          - Tags: String, Optional
        - **BranchName**:
          - Description: Name of branch in which account is registered
          - Tags: String, Optional
        - **BankAccountUniqueId**:
          - Description: Unique Identifier for bank account across banks
          - Tags: String, Optional
        - **Ifsc**:
          - Description: Account IFSC
          - Tags: String, Optional
        - **IsPrimary**:
          - Description: Is this account the primary account
          - Value: true / false
          - Tags: String, Optional
        - **Name**:
          - Description: Name of account holder
          - Tags: String, Optional
      - Tags: JSON, Mandatory
    - **VpaSuggestions**:
      - Description: Suggestions of available VPAs
      - Tags: Array of String, Optional
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetAccounts",
    "bankCodes": ["code1", "code2"]
  }
}
```

#### Kotlin Code Snippet:

```kotlin
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetAccounts",
    "bankCodes": ["code1", "code2"]
  }
}
```


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

#### Request Code Snippet:

```request
{
  "requestId": "f7443c1d-9acb-4b3d-9ae5-0e3c33dfcf5b",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetAccounts",
    "bankCodes": ["code1", "code2"]
  }
}
```

### Response snippets:

#### Response:
```plaintext
{
  "requestId": "<request id passed>",
  "service": "in.juspay.hyperapi",
  "payload": {
    "action": "upiGetAccounts",
    "status": "SUCCESS" / "FAILURE",
    "accounts": [ < list of accounts > ],
    "vpaSuggestions": [],
    "otherInfo": "{}"
  },
  "error": false,
  "errorMessage": "",
  "errorCode": "",
  "event": "process_result"
}
```

