Skip to content

Set auto top-up

PUT
/v1/wallet/auto-top-up

Configure "when my balance drops below X, add Y, but never more than Z per month" so you never get paused mid-book waiting on a manual top-up. It charges the primary saved card off-session. Set both a threshold and an amount to enable it, or omit both to disable it; the monthly cap is independently optional.

Authorizations

Bearer

JWT bearer token from POST /v1/auth/login.

Type
HTTP (bearer)
or
ApiKey

Scoped API key for non-interactive clients (issued by PBI #1426).

Type
API Key (header: X-Api-Key)

Request Body

application/json

Payload for PUT /wallet/auto-top-up (#1889): "when balance below ThresholdUsd, add AmountUsd, never
more than MonthlyCapUsd/month." ThresholdUsd/AmountUsd must both be set (enable) or both
null (disable); MonthlyCapUsd is independently optional (no cap when null).

How much to add each time auto top-up fires, in USD; set together with ThresholdUsd.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

The most auto top-up will add in a calendar month, in USD; null means no cap.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Trigger a top-up once the balance falls below this amount, in USD; set together with AmountUsd to enable, or both null to disable.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Responses

OK

application/json

What the user sees of their wallet: a remaining balance, or — for a whitelisted account — that the
work is included at no charge.

The amount (#1889) auto top-up adds each time it fires, or null when disabled.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

The owner's opt-in auto-top-up monthly cap (#1889), or null for no cap.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

The owner's opt-in auto-top-up "balance below $X" threshold (#1889), or null when disabled.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Spendable credit: BalanceUsd − ReservedUsd (#1479). This is the
figure the affordability gate uses
, so a client that shows the raw balance while the gate compares
against this will disagree with it whenever a batch is in flight — show this as the spendable number, and
the balance as the settled one.

Default0
Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Remaining prepaid credit in USD (meaningless when Unlimited).

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Currency code for BalanceUsd (always USD for now).

Default"USD"

True when a charged account's balance has fallen to/below the configured low-balance threshold — the
cue an agent uses to prompt a top-up before the next batch is blocked. Always false when Unlimited.

Defaultfalse

The owner's opt-in low-balance email alert threshold (#1890), or null when disabled.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

The owner's opt-in monthly spending ceiling (#1890), or null when disabled.

Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

Credit currently held against batches that are in flight but not yet charged (#1479) — the committed
never-exceed quotes of the owner's queued/running jobs. Always 0 when Unlimited
(such an account is never charged, so nothing is ever held).

Default0
Format"double"
Pattern"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"

True for a whitelisted account — show "included / no charge", not a balance.

Playground

Server
Authorization
Body

Samples

Powered by VitePress OpenAPI