Skip to main content
PATCH
Update automatic top-up settings

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

id
integer
required

The numeric ID of the account

Body

application/json
enabled
boolean
required

Whether to recharge automatically.

floor_cents
integer
required

Balance at which a recharge triggers. Must be below recharge_amount_cents.

Example:

1000

recharge_amount_cents
integer
required

How much to charge each time.

Example:

5000

expected_digest
string
required

The configuration_digest from your last read.

idempotency_attempt
string

Optional client-supplied key so a retried request does not charge twice.

Response

Success

The shape every billing control returns: the current values, where they were read from, whether the account may change them, and the digest that guards the next write.

configuration
object

The current settings.

freshness
object

Where this answer came from and how current it is. Billing reads several systems, so every response says which one it used — treat state other than fresh as a reason to be careful with the numbers rather than a failure.

eligibility
object

Whether this account can use the control, and why not when it cannot.

dunning_state
string | null

Set when the account is in collections, which restricts some controls.

pending
boolean

True while a previous change is still being applied at the provider.

limits
object

Accepted bounds for each amount, where the control has them.

error
object | null

Set when the control could be read but something is wrong with it.

configuration_digest
string

Fingerprint of the current configuration. Send it back as expected_digest when you write, and a 409 means someone changed it first.