Update automatic top-up settings
Turns automatic recharging on or off and sets its thresholds. floor_cents must be below recharge_amount_cents, both must fall inside limits, and enabling it requires a usable payment method — each of those fails with its own error.type rather than a generic validation error.
Supply idempotency_attempt if you might retry, so a repeat does not charge twice.
Writes are guarded by expected_digest: send the configuration_digest from your last read, and if someone changed the setting in between you get a 409 whose error.current_state is the configuration as it now stands. Re-read, show the user what changed, and resubmit.
Authorizations
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
The numeric ID of the account
Body
Whether to recharge automatically.
Balance at which a recharge triggers. Must be below recharge_amount_cents.
1000
How much to charge each time.
5000
The configuration_digest from your last read.
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.
The current settings.
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.
Whether this account can use the control, and why not when it cannot.
Set when the account is in collections, which restricts some controls.
True while a previous change is still being applied at the provider.
Accepted bounds for each amount, where the control has them.
Set when the control could be read but something is wrong with it.
Fingerprint of the current configuration. Send it back as expected_digest when you write, and a 409 means someone changed it first.