POST /v1/customers/deposit to add funds to a customer’s wallet.
Velobase is an AI gateway first: point your OpenAI or Anthropic SDK at
https://api.velobase.io/v1 and every model call is billed to a customer’s
wallet via the X-Velobase-Customer header. Deposits fund that wallet. The
same wallet also backs the billing primitives (freeze, consume, deduct) for
work you price yourself. See Quickstart for the
gateway flow.Minimal example
Amounts use explicit unit fields:amount_usd, amount_cents, or
amount_credits, where 1 USD = 100 cents = 1,000,000 credits. Prefer
amount_usd.
Using the SDK
Add a wallet category
Usecredit_type when you want this deposit to show up under a specific wallet category in the console and wallet breakdown.
credit_type, for example: default, promo_campaign_2026, membership_gold.
Add a validity period
Usestarts_at and expires_at when these funds should only be usable during a specific time window.
starts_at the funds are inactive. After expires_at they are no longer counted.
Parameter reference
Your internal ID for the customer. If the customer does not exist, it is created automatically.
Amount to add, in US dollars. Must be greater than 0. Provide exactly one amount field.
Amount to add, in cents (1 USD = 100 cents).
Amount to add, in credits (1 USD = 1,000,000 credits).
A bare
amount is legacy and is interpreted as cents, not credits. Prefer
the explicit amount_usd, amount_cents, or amount_credits fields.Wallet category for this deposit. Use any string, such as
default, promo_campaign_2026, or membership_gold. Defaults to default.ISO 8601 datetime. Before this time, the deposited funds do not count toward the available wallet balance.
ISO 8601 datetime. After this time, the deposited funds no longer count toward the available wallet balance. Must be later than
starts_at.Prevents duplicate deposits. Repeating a request with the same key returns the original result with
is_idempotent_replay: true and does not create a second deposit.Display name for the customer. Created or updated on deposit.
Email address for the customer. Created or updated on deposit.
Arbitrary JSON attached to the customer record.
A human-readable note for this deposit.
Deposit response
The customer ID passed in the request.
The underlying wallet source created by this deposit.
Wallet category used for this deposit.
Total amount, in credits, on this wallet source record. Not the customer’s overall wallet balance.
Amount, in credits, added by this specific request.
Start time of this wallet source’s validity window.
Expiry time of this wallet source’s validity window.
The ledger record ID for this deposit.
true when the response was returned from a previous request with the same idempotency_key.Query wallet and categories
Fetch the customer to see their wallets.GET /v1/customers/{id} returns a
wallets map keyed by wallet category, each with its own totals and the
sources (deposits) that fund it.
Map of wallet category to that wallet’s balance. The key is the
credit_type used at deposit time.Total credits in this wallet across its active sources.
Credits already consumed from this wallet.
Credits currently reserved by in-progress staged deduction flows.
Credits available to spend in this wallet:
total - used - frozen.Per-source breakdown. Each entry corresponds to one deposit, with its own validity window via
starts_at and expires_at.Error format
All API errors return an HTTP error status and a structurederror object:
Human-readable description of the error.
High-level error category, such as
bad_request.Stable machine-readable error code for programmatic handling.