Skip to navigation

Update

Change what the workspace pays for, through the same save as the billing page: the billing interval, and the apps named in apps, added if the workspace does not have them (joining the next invoice, prorated) or changed to the numbers given. An app not named is left as it is; taking one off is removeApp, so that no change can cancel an app by leaving it out. Requires billing:write, which a signed-in session never has.

A number below its floor, the app’s minimum or the seats already handed out, is refused with 422 below_floor, and details.floors says what each least is. The billing page lifts seats to it instead.

With no Stripe subscription yet there is nothing to change: the answer is 402 checkout_required, with the Checkout for everything asked for in details.url, for a person to finish.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
billingIntervalenumOptional

Switch every line at once. Stripe bills the new period from now and credits what is left of the old one. year is refused with 409 annual_unavailable unless annualAvailable.

Allowed values:
appslist of objectsOptional

Apps to add, or to change to the numbers given. An app not named is left as it is: to take one off, use removeApp.

Response

This endpoint returns an object.
billingIntervalenum
How often the subscription is billed. Every line of one subscription shares it.
Allowed values:
annualAvailableboolean
Whether yearly billing can be chosen here. It needs a yearly price for every app.
billingAvailableboolean

Whether this installation can take a subscription at all. When it cannot, updateSubscription answers 409 billing_unavailable.

autoJoinboolean

Whether any verified email domain has autoJoin on, so people can join without an invitation.

autoGrowSeatsboolean

The workspace’s autoGrowSeats (PATCH /organization): with autoJoin, whether full apps grow for newcomers or they wait.

appslist of objects
paymentIssueenumOptional

Absent (null) while every payment has gone through.

Allowed values:
cardAddedAtdatetimeOptional

When a card was put on file, by a completed Checkout or in the billing portal. Absent with no card, or once it is removed. Set, the workspace has subscribed: its trials carry on into the paid plan, and the app stops showing the trial banner.

Errors

401
Unauthorized Error
402
Checkout Required Error
403
Forbidden Error
409
Conflict Error
422
Validation Error
429
Too Many Requests Error
502
Upstream Error