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
amount is a positive integer number of credits. 1 credit = 1 micro-USD, so
1 USD = 1,000,000 credits. Unit-suffixed fields such as amount_usd,
amount_cents, or amount_credits are rejected with an error.
Using the SDK
Deposit into a named wallet
Usewallet when you want this deposit to show up under a specific wallet in the console and wallet breakdown. The default wallet is credits.
wallet, for example: credits, 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 positive integer credits. Must be greater than 0. 1 USD = 1,000,000 credits.
Unit-suffixed fields (
amount_usd, amount_cents, amount_credits) are not
accepted; the API rejects them with an error. Convert to integer credits
before calling.Wallet for this deposit. Use any string, such as
credits, promo_campaign_2026, or membership_gold. Defaults to credits. (credit_type is a deprecated alias for this field.)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. Optional, but strongly recommended: use your payment event id.Deposit response
Total amount, in credits, on this wallet source record. Not the customer’s overall wallet balance.
Query wallets
Fetch the customer to see their wallets.GET /v1/customers/{id} returns a
wallets map keyed by wallet name, each with its own totals and the
sources (deposits) that fund it.
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: