GET/organizations/{organizationId}/billing
Get organization billing
Operation organizations.billing.get
Description
Returns the organization's billing state: plan status, billing period, seat counts, which members hold sync seats, and whether the subscription can be cancelled directly. Any organization member may call it.
Authentication
Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.
Parameters
| Name | In | Type | Details |
|---|---|---|---|
organizationId | path | string | required
|
Responses
200 OK
application/jsonOrganizationBillingResponse
An organization's sync billing snapshot: whether it may sync, its plan period, and its seats.
16 fields
organizationIdstringrequiredactiveMemberCountintegerrequired- at least 0
Members reachable through the signed
Membersgroup, as the server counts them.assignedSeatCountintegerrequired- at least 0
Members who hold a sync seat; always the length of
assignedUserIds.assignedUserIdslist of stringrequired- each item: not empty
Members who may sync within the licensed seat count.
currentUserHasSyncSeatbooleanrequiredTrue when the caller holds one of the sync seats.
statusstringrequired- one of
local,trialing,active,disabled,deleting,purged
Billing state; it decides whether the organization may sync at all. A
localorganization is free and syncs nothing.- one of
trialEndsAtstringrequirednullableproviderstringrequirednullable- always
revenuecat
- always
canCancelDirectlybooleanrequiredTrue when a Stripe subscription can be cancelled from the app, even while a native store owns billing.
subscriptionSourcestringrequirednullable- one of
native,stripe
Store of record for the current or lapsed subscription, or null when nothing would conflict with a new purchase.
- one of
currentPeriodStartsAtstringrequirednullablecurrentPeriodEndsAtstringrequirednullableseatCountintegerrequired- at least 0
Licensed seats in the current paid period.
pendingSeatCountintegerrequirednullable- at least 1
Seat count of a native plan change the store scheduled but has not applied yet.
disabledAtstringrequirednullableWhen sync stopped because billing lapsed.
purgeAfterstringrequirednullableWhen a disabled organization's synced data becomes eligible for purge.
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 500 | Internal Server Error |
|
| 503 | Service Unavailable |
|
Additional rules
The server also enforces these rules, which the schema above cannot express.
assignedSeatCountequals the number ofassignedUserIdsin the response.