Skip to content

Top up credits automatically from the saved card

PUT
/billing/auto-topup
curl --request PUT \
--url https://api.global.stillbox.example/v1/billing/auto-topup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true, "below_usd": 1, "amount_usd": 1 }'
Media typeapplication/json
object
enabled
required
boolean
below_usd
required

Top up when the balance falls below this (0 to 1,000).

number format: double
amount_usd
required

Credits added each time (10 to 1,000), before tax.

number format: double

Example generated

{
"enabled": true,
"below_usd": 1,
"amount_usd": 1
}

Billing

Media typeapplication/json
object
card_payments
required

Whether this region takes card payments; otherwise credits are added by invoice.

boolean
card_required
required

Sandboxes can’t run until a card is verified (the free tier’s card check) or credits are added.

boolean
card_verified
required
boolean
card_check
required

Whether owners can save a card without a payment (POST /billing/card-check); automatic top-ups charge the saved card.

boolean
card

The saved card, which automatic top-ups charge.

object
brand
required
string
last4
required
string
auto_topup
required
object
enabled
required
boolean
below_usd
required

Top up when the balance falls below this (0 to 1,000).

number format: double
amount_usd
required

Credits added each time (10 to 1,000), before tax.

number format: double
payments
required
Array<object>
object
id
required
string
kind
required
string
Allowed values: checkout topup card_check
amount_usd
required
number format: double
state
required
string
Allowed values: open paid failed expired
invoice_url
string
error
string
created_at
required
string format: date-time

Example

{
"payments": [
{
"kind": "checkout",
"state": "open"
}
]
}

The request is invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

Only an owner can do this (owner_only), or the invitation is for another address (not_invited)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No saved card yet

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}