---
page_title: Link Account to Vpa
product: UPI TPAP SDK
platform: iOS
page_source: https://juspay.io/in/docs/upi-tpap-sdk/ios/headless-process-payloads/link-account-to-vpa
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/upi-tpap-sdk/llms.txt
---


## Link Account to Vpa



The merchant can call this API to link Vpa to 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: upiLinkAccounts
      - Tags: String, Mandatory
    - **CustomerVpa**:
      - Description: Vpa to be checked
      - Tags: String, Mandatory
    - **PrimaryAccountMapping**:
      - Description: Mapping of the primary account
      - Value: Example: ONE_TO_ONE
      - Tags: String, Optional
    - **AccountReferenceIds**:
      - Description: Reference IDs of accounts to be linked to vpa
      - Tags: Array of String, Mandatory
    - **AllowChangingPrimaryAccount**:
      - Description: Can primary account be changed? Default: true
      - 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 to be performed in the SDK.
      - Value: upiLinkAccounts
      - Tags: String, Mandatory
    - **Status**:
      - Description: Status of the API
      - Value: SUCCESS / FAILURE
      - Tags: String, Mandatory
    - **GatewayResponseCode**:
      - Description: Response code returned by NPCI
      - Tags: String, Mandatory
    - **DefaultAccountReferenceId**:
      - Description: Default account reference id
      - Value: A0760cb548bb4dda9d32e3030863dd5
      - Tags: String, Optional
    - **GatewayResponseMessage**:
      - Description: Response message returned by NPCI
      - Tags: String, Mandatory
    - **CustomerMobileNumber**:
      - Description: masked phone number of the customer
      - Value: <Customer mobile number>
      - Tags: String, Mandatory
    - **VpaAccounts**:
      - Description: Details of all the active linked vpas and accounts
      - Value:
        - **Vpa**:
          - Description: Vpa
          - Tags: String, Mandatory
        - **Account**:
          - Description: Account linked to this vpa
          - 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
            - **MpinLength**:
              - Description: Length of mpin
              - Tags: String, Mandatory
            - **MpinSet**:
              - Description: Is mpin set
              - Value: true / false
              - Tags: String, Mandatory
            - **ReferenceId**:
              - Tags: String, Mandatory
            - **OtpLength**:
              - Description: Length of OTP
              - Tags: String, Mandatory
            - **AtmPinLength**:
              - Description: Length of atm pin
              - 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: Array of JSON, Mandatory
      - Tags: Array of JSON, Mandatory
    - **OtherInfo**:
      - Description: As passed in request
      - Tags: String, Optional
  - Tags: JSON
- **Error**:
  - Description: Possible values :- true/false
  - Tags: Boolean
- **ErrorMessage**:
  - Description: Error Message
  - Tags: String
- **ErrorCode**:
  - Description: Error Code
  - Tags: String
- **Event**:
  - Description: Value: process_result
  - Tags: String





#### Code Snippets: -

#### Java Code Snippet:

```java
{"success":false,"message":"Failed to fetch snippet"}
```

#### Kotlin Code Snippet:

```kotlin
{"success":false,"message":"Failed to fetch snippet"}
```


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

#### Request Code Snippet:

```request
{"success":false,"message":"Failed to fetch snippet"}
```

### Response snippets:

#### Response:
```plaintext
{"success":false,"message":"Failed to fetch snippet"}
```



---

## Complete Code Reference

The following code files are referenced in the steps above:

### InappHeadless.txt

```
{"success":false,"message":"Failed to fetch snippet"}
```


---

## See Also

- [Is Vpa Available](https://juspay.io/in/docs/upi-tpap-sdk/ios/headless-process-payloads/is-vpa-available)
- [Set/Reset MPIN](https://juspay.io/in/docs/upi-tpap-sdk/ios/headless-process-payloads/set-reset-mpin)
