Skip to main content

updateWalletPayment

BooleanWrapper updateWalletPayment(WalletQuantityRequestDto)

PUT /api/2.0/portal/payment/updatewallet

Change a wallet service quantity

Buys more units of a wallet service - extra administrators, disk storage, backup, AI tools, AI search or Docs Connect - or writes down the quantity that service will have after the next renewal, depending on productQuantityType. With Add (1) the units are bought at once and paid out of the portal wallet, so the wallet needs a sub-account in the accounting currency and enough money on it; with Set (0) nothing is charged now and the quantity only takes effect in the next period, where an empty or zero quantity cancels a change scheduled earlier. Renew and Sub are not accepted here. The portal needs a billing customer and the caller has to be a DocSpace administrator; a service that is an add-on to the plan also needs the plan itself to be paid, otherwise the answer is 402. Minimum quantities apply - disk storage starts at 100 units, the Docs Connect Dev Pack at 10, and the administrators may not be fewer than the portal already has - and in the Add form they are checked only while the portal does not hold that service yet. Asking for the Docs Connect plan in the Set form while Docs Connect Dev Pack is active schedules the reversion to it at the next period, while the upgrade in the other direction is not done here at all: use POST api/2.0/settings/docscloud/switchtodevpack. The result is true when the change was accepted; the call is mutating, spends money in its Add form and is limited to ten requests a minute per user by default. Price the same purchase without paying for it with PUT api/2.0/portal/payment/calculatewallet.

Parameters​

NameInTypeDescriptionNotes
WalletQuantityRequestDtobodyWalletQuantityRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200true when the purchase or the scheduled change was accepted, false when the provider declined itBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no quantity, quantity does not hold exactly one product, the quantity type is not Set or Add, the product is not a wallet service, the quantity is below the minimum for it or is empty or zero where a purchase needs one, or that service is already set--
402The plan of the portal is not paid and the requested service is an add-on to it, or in the Add form the billing service declines the purchase, answers with an error or cannot be reached--
403The caller is not a DocSpace administrator, or the portal has no billing service configured--
404This portal has no billing customer, or its wallet has no balance or no sub-account in the accounting currency--
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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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