Accounts
Configure automatic wallet top-up
PATCH
/account/auto-topup
bearer_auth
Partially updates this account's auto-topup configuration. Omitted fields keep their stored value; the response echoes the effective configuration with all amounts as integer euro-cents. Fields: `enabled` (boolean), `threshold_cents` (integer >= 0), `amount_cents` (integer 100-1000000 — the same envelope as the manual top-up), and `monthly_limit_cents` (integer, must stay >= the effective `amount_cents`).
Nothing is charged here — recharging runs via the dedicated auto-topup flow only when the wallet crosses `threshold_cents`, and the payment provider's confirmation remains the only crediting path. Dormant while auto-topup is disabled for the deployment: the route answers 404 (hidden); GET /account/balance always carries the summary.
Parameters
| Name | In | Type | Required | Description |
Authorization |
header |
string |
yes |
`Bearer <token>` obtained from `POST /login`. |
Request body
| Field | Type | Required | Description |
enabled |
boolean |
no |
Turns automatic top-up on or off. |
threshold_cents |
integer |
no |
Wallet balance (euro-cents, tax-excluded) that triggers a recharge. |
amount_cents |
integer |
no |
Recharge amount in euro-cents (EUR 1-10000), tax-excluded: the actual charge applies VAT on top (2000c → 2400c at 20%) while the wallet is credited the tax-excluded amount.
|
monthly_limit_cents |
integer |
no |
Maximum auto-topup spend per calendar month, compared tax-excluded against the accrued (tax-excluded) spend; must stay >= `amount_cents`.
|
{
"enabled": true,
"threshold_cents": 500,
"amount_cents": 2000,
"monthly_limit_cents": 20000
}
Responses
| Status | Description |
200 |
Effective auto-topup configuration after the merge. |
400 |
Invalid field — the error names the offending field (unknown field, wrong type, out-of-range amount, monthly limit below amount). |
401 |
Missing or invalid credentials. |
404 |
Route hidden (auto-topup disabled) or account not found. |
409 |
Account is not ready yet (`status` is not `ready`). |
502 |
Storage write failed; a generic error is returned and no internals are leaked. |
200 example
{
"auto_topup": {
"enabled": true,
"threshold_cents": 500,
"amount_cents": 2000,
"monthly_limit_cents": 20000
}
}