Onboarding a Corporation

Deploy the corporation wallet, register it on-chain and through the API, then log in.

Before You Start

Read the following guides before proceeding:

GuideWhy
Getting StartedPlatform overview and setup
Api BasicsRequired headers and request configuration
AuthenticationHow to obtain the two tokens

Onboarding a corporation combines an on-chain step with two API calls. The corporation is an Account
Abstraction wallet: its address is the corporation's identity everywhere in the API, and the wallet's
signer becomes the corporation owner. Employees are added later, and each of them claims their account
by logging in with their own wallet and email.

The sequence is: deploy the corporation wallet with the corporate policy and executor, call
createCorporationForCorporateWallet on the CorporateAccounts contract, register the legal details through
POST /api/v1/corporations/register, then exchange the partner token for a corporation token at
POST /api/v1/corporations/login. KYB verification follows, and capabilities unlock as verification
levels are passed.

The corporation wallet is not a retail user wallet. It uses CorporateAccounts and
ExecutionDelayCorporatePolicy — see Wallet Deployment.

Verification is covered in Verification (KYB).

Corporation Registration Flow (Simplified)

Detailed documentation available in Wallet Deployment
and Registering a Corporation.

sequenceDiagram
    participant Owner
    participant App as Your App
    participant Corp as Wirex Corporate API
    participant Chain as Blockchain

    Note over App,Corp: Partner authentication
    App->>Corp: 1. POST /api/v1/token
    Corp-->>App: partner_token

    Note over App,Chain: Wallet deployment
    App->>Chain: 2. Deploy corporation AA wallet
    App->>Chain: 3. Install executor, corporate policy + CorporateValidator
    App->>Chain: 4. createCorporationForCorporateWallet
    Chain-->>Corp: CorporationCreated event
    Corp->>App: POST /v2/webhooks/corporations

    Note over App,Corp: API registration
    App->>Corp: 5. POST /api/v1/corporations/register
    Corp-->>App: 200

    Note over Owner,Corp: Corporation session
    App->>Corp: 6. POST /api/v1/corporations/login
    Corp-->>App: corporation_token
StepActionDescription
1POST /api/v1/tokenExchange client credentials for a partner token
2Kernel v3.1Deploy the corporation wallet
3installModule, changeRootValidatorInstall FundsManagement, ExecutionDelayCorporatePolicy and CorporateValidator
4createCorporationForCorporateWallet(partnerId, wallet)Create the corporation on-chain; the recorded creator becomes owner
5POST /api/v1/corporations/registerSupply legal details and complete the owner's employee record
6POST /api/v1/corporations/loginObtain the corporation token used by every other endpoint

Guides

GuideDescription
Wallet DeploymentWallet, modules, policy, and the two on-chain registration paths
Registering a CorporationThe API registration call, its validation and its failure modes

Did this page help you?