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:
| Guide | Why |
|---|---|
| Getting Started | Platform overview and setup |
| Api Basics | Required headers and request configuration |
| Authentication | How 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
CorporateAccountsand
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
| Step | Action | Description |
|---|---|---|
| 1 | POST /api/v1/token | Exchange client credentials for a partner token |
| 2 | Kernel v3.1 | Deploy the corporation wallet |
| 3 | installModule, changeRootValidator | Install FundsManagement, ExecutionDelayCorporatePolicy and CorporateValidator |
| 4 | createCorporationForCorporateWallet(partnerId, wallet) | Create the corporation on-chain; the recorded creator becomes owner |
| 5 | POST /api/v1/corporations/register | Supply legal details and complete the owner's employee record |
| 6 | POST /api/v1/corporations/login | Obtain the corporation token used by every other endpoint |
Guides
| Guide | Description |
|---|---|
| Wallet Deployment | Wallet, modules, policy, and the two on-chain registration paths |
| Registering a Corporation | The API registration call, its validation and its failure modes |
Updated 20 days ago

