Skip to main content
Provision a new wallet for an AI agent. Each wallet is fully isolated — it carries its own virtual bank account, spend controls, and API key. The agent uses that key to authorise payments; your backend never touches the agent’s funds directly.
Canonical path: POST /api/wallets POST /api/onboarding redirects to this endpoint — use the canonical path for all new integrations.

Endpoint

Authentication

Requires a valid Session JWT in the Authorization header.

Request Body

string
required
Human-readable label for this wallet. Used in the dashboard and transaction receipts. Must be between 1 and 100 characters.
string
required
The ID of the user who owns this wallet, as returned during sign-up. Must be a valid UUID.
integer
required
Maximum amount the agent may spend in a single transaction, denominated in kobo (100 kobo = ₦1). Requests above this threshold are automatically blocked. Must be a positive integer and must not exceed spendLimitPeriod.
integer
required
Maximum cumulative spend allowed within the rolling window defined by periodWindowDays, denominated in kobo. Must be greater than or equal to spendLimitPerTx.
integer
default:"30"
required
Length of the rolling spend window, in days. The period counter resets on a rolling basis — not calendar-month aligned. Defaults to 30.
string
required
ISO 8601 datetime at which this wallet should automatically deactivate (e.g. "2026-01-31T23:59:59Z"). Must be a timestamp in the future at the time of the request.
boolean
default:"false"
When true, the wallet will only approve payments to merchants listed in merchantAllowlist. All other merchants are blocked regardless of spend limits.
string[]
An array of merchant name strings. Required when useAllowlist is true (must contain at least one entry). Merchant names are matched case-insensitively against the name reported by the payment terminal at authorisation time.

Cross-field Validation Rules

The following constraints are enforced in addition to individual field validation:
  • spendLimitPerTxspendLimitPeriod — the per-transaction cap cannot exceed the rolling-period cap. A 400 error is returned if this rule is violated.
  • merchantAllowlist required when useAllowlist is true — the array must contain at least one merchant name. Omitting it or sending an empty array returns 400.
  • expiry must be in the future — the timestamp is validated against the server clock at request time. A past expiry returns 400.

Example Request


Response 201 Created

The response envelope contains success: true and a data object with three nested objects: wallet, virtualAccount, and apiKey.
boolean
Always true for a successful creation.
object
Container for the created resources.

Example Response

data.apiKey.fullKey is returned exactly once — at creation time. It is never returned again in any subsequent API response. Store it securely (e.g. in a secrets manager or encrypted environment variable) before discarding the response. If the key is lost, you must rotate it via the key-management endpoint.

Error Responses