Skip to main content

setTenantWalletSettings

TenantWalletSettingsWrapper setTenantWalletSettings(TenantWalletSettingsRequestDto)

POST /api/2.0/portal/payment/topupsettings

Set the auto top-up settings

Switches the portal's automatic wallet top-up on or off and sets its thresholds: while it is on, the payment method on file is charged whenever the wallet balance falls below minBalance, enough to bring it up to upToBalance, in currency. The portal needs a billing customer whose wallet balance exists - a portal that has never had one answers 404, so top the wallet up once with POST api/2.0/portal/payment/deposit first - and only the payer may change the settings. The body replaces the stored settings as a whole and an omitted body resets them to the defaults; minBalance is accepted between 5 and 1000 and upToBalance between 6 and 5000. The low-balance warning state (lowBalanceThreshold, lowBalanceNotified) and lastModified may be sent for compatibility but are ignored: the portal keeps the values it had. The call is mutating and idempotent, it charges nothing by itself, it is written to the portal audit trail, and switching the top-up on also re-arms the low-balance warning. The settings as they were stored come back in the answer.

Parameters​

NameInTypeDescriptionNotes
TenantWalletSettingsRequestDtobodyTenantWalletSettingsRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The automatic top-up settings as they were storedTenantWalletSettingsWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read, or settings is sent with minBalance outside 5-1000 or upToBalance outside 6-5000, including when either of them is left out--
403The caller is not the payer of this portal, or the portal has no billing service configured--
404This portal has no billing customer, or its wallet has no balance yet--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

TenantWalletSettingsWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json