Skip to main content
A Wallet is the core primitive in Axis. Every AI agent you deploy gets its own wallet — a scoped spending account that constrains exactly how much the agent can spend, over what time window, with which merchants, and until when. You define all of these rules at creation time. Wallet rules cannot be changed after creation, so configure them carefully before issuing the wallet to an agent.
All monetary amounts — spendLimitPerTx, spendLimitPeriod, and any balance values — are integers in kobo, the smallest unit of the Nigerian Naira. ₦1 = 100 kobo. For example, a ₦5,000 transaction limit is represented as 500000.

Create a wallet

Send a POST request to /api/wallets with the configuration for your new agent wallet. The response includes the wallet record, a virtual bank account for funding, and a one-time API key for the agent to use.

Request body

Validation rules

Keep these constraints in mind when building your wallet creation form:
  • spendLimitPerTx must be less than or equal to spendLimitPeriod.
  • If expiry is provided, it must be a future datetime. Submitting a past or present timestamp will be rejected.
  • If useAllowlist is true, merchantAllowlist must contain at least one merchant name.

Example request

POST /api/wallets

Example response

The response body wraps three objects: the wallet record, a virtual bank account for funding, and a one-time API key.
201 Created
The response contains three nested objects:
  • data.wallet — the wallet record with all configuration and current balance.
  • data.virtualAccount — the bank account details used to fund this wallet. Share accountNumber, accountName, and bankName with whoever needs to top up the agent’s balance.
  • data.apiKey — the API key the agent uses to authenticate payment requests. Contains fullKey only in this response — it is never returned again.
Save apiKey.fullKey immediately. Axis stores only a hashed version of the key. After this response, only the keyPrefix is visible — the fullKey cannot be recovered. If it is lost, you must revoke the key and issue a new one.

Retrieve a wallet

Fetches the full wallet record, its linked virtual account, and a list of its API keys (prefixes only — no fullKey).

Example response

200 OK
Note that apiKeys is an array — a wallet may have multiple keys (e.g. after a rotation). Each entry shows only keyPrefix, not fullKey.

List wallets for a user

Returns all wallets associated with a given user ID.

Example response

200 OK

Wallet status values

Every wallet has a status field that reflects its current state:

React hook example

The hook below wraps the wallet creation endpoint, stores the apiKey.fullKey securely, and clears it from memory once you have handed it to your secret store.
src/hooks/useCreateWallet.ts

Usage in a component

src/components/CreateWalletForm.tsx