> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wirexapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Onboarding a User

Register users, deploy wallets, and complete KYC verification.

## Before You Start

Read the following guides before proceeding:

| Guide                                  | Why                                        |
| -------------------------------------- | ------------------------------------------ |
| [Getting Started](https://docs.wirexapp.com/docs/getting-started) | Platform overview and setup                |
| [Api Basics](https://docs.wirexapp.com/docs/api-basics)           | Required headers and request configuration |
| [Authentication](https://docs.wirexapp.com/docs/authentication)   | How to obtain access tokens                |

***

User onboarding in Wirex BaaS combines on-chain wallet deployment with identity verification. Each user receives an Account Abstraction (AA) wallet that serves as their primary address for holding assets and interacting with the platform. The wallet is deployed on Base network and registered in the Wirex Accounts smart contract.

Identity verification (KYC) is required before users can access financial features. Wirex supports three verification flows: Wirex-hosted (redirect users to complete verification in Wirex UI), SumSub shared (share existing SumSub verification), and reliance (submit full identity data via API). The appropriate flow depends on your existing verification infrastructure and user experience requirements.

The onboarding sequence is: authenticate user, deploy AA wallet with required modules, register wallet on-chain, then complete KYC verification. Users receive webhook notifications as their verification status progresses through Applied, InReview, and Approved states.

> Looking for External Authorization (Master Account) integration? See [External Authorization](https://docs.wirexapp.com/docs/extauth-overview).

> KYC flows are covered in the [KYC](https://docs.wirexapp.com/docs/KYC) section.

## User Registration Flow (Simplified)

> Detailed documentation available in [On-Chain Registration](https://docs.wirexapp.com/docs/onchain-registration) and [API Registration](https://docs.wirexapp.com/docs/api-registration).

```mermaid
sequenceDiagram
    participant User
    participant App as Your App
    participant BaaS as Wirex BaaS
    participant Chain as Blockchain

    Note over User,BaaS: Authentication
    User->>App: Sign in
    App->>BaaS: POST /api/v1/oauth2/token
    BaaS-->>App: access_token

    Note over App,Chain: Wallet Deployment
    App->>Chain: Deploy AA wallet (ZeroDev SDK)
    App->>Chain: Install modules (executor + policy)
    App->>Chain: Register in Accounts contract
    Chain-->>BaaS: Event detected
    BaaS->>App: POST /v2/webhooks/wallets

    Note over App,BaaS: API Registration
    App->>BaaS: POST /api/v2/user
    BaaS-->>App: user_id
```

| Step | Action                      | Description                      |
| ---- | --------------------------- | -------------------------------- |
| 1    | `POST /api/v1/oauth2/token` | Obtain access token              |
| 2    | ZeroDev SDK                 | Deploy AA wallet on Base         |
| 3    | Install modules             | Add executor and policy modules  |
| 4    | Accounts contract           | Register wallet on-chain         |
| 5    | Webhook                     | Wallet confirmation notification |
| 6    | `POST /api/v2/user`         | Complete API registration        |