put
/{tenantId}/v1/billing/topup-configSave auto-topup configuration
Requires Authentication
Billing
Payments
Upserts the auto-topup configuration. Saving resets the failure
counter and clears auto_disabled_at, so a "fix card + save" flow
re-enables an auto-disabled config without a separate call.
Path Parameters
| Name | Type | Description |
|---|---|---|
tenantIdrequired | string (uuid) | Tenant UUID |
Request Body
required
enabledboolean
thresholdCreditsinteger (int64)
required
- Wallet balance (in credits) below which the auto-topup fires.topupAmountCreditsinteger (int64)
required
- Credits to add on each trigger. Bounded server-side by the auto-topup limits (£20-£5000 ex-VAT in the default config).paymentMethodIdstring (uuid)
required
- Must reference an active method belonging to this tenant.cooldownSecondsinteger
required
- Minimum seconds between consecutive auto-topups.Responses
Saved
Response Bodyapplication/json
tenantIdstring (uuid)
enabledboolean
thresholdCreditsinteger (int64)
topupAmountCreditsinteger (int64)
paymentMethodIdstring (uuid)
cooldownSecondsinteger
lastAutoTopupAtstring (date-time)
consecutiveFailuresinteger
autoDisabledAtstring (date-time)
autoDisabledReasonstring
updatedAtstring (date-time)
Code Examples
curl -X PUT 'https://api-next.checkio.co.uk/{tenantId}/v1/billing/topup-config' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
"enabled": true,
"thresholdCredits": 0,
"topupAmountCredits": 0,
"paymentMethodId": "00000000-0000-0000-0000-000000000000",
"cooldownSeconds": 0
}'