Tearleads

OrganizationBillingResponse

An organization's sync billing snapshot: whether it may sync, its plan period, and its seats.

Shape

object

16 fields
  • organizationIdstringrequired
  • activeMemberCountintegerrequired
    • at least 0

    Members reachable through the signed Members group, 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.

  • currentUserHasSyncSeatbooleanrequired

    True 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 local organization is free and syncs nothing.

  • trialEndsAtstringrequirednullable
  • providerstringrequirednullable
    • always revenuecat
  • canCancelDirectlybooleanrequired

    True 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.

  • currentPeriodStartsAtstringrequirednullable
  • currentPeriodEndsAtstringrequirednullable
  • seatCountintegerrequired
    • 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.

  • disabledAtstringrequirednullable

    When sync stopped because billing lapsed.

  • purgeAfterstringrequirednullable

    When a disabled organization's synced data becomes eligible for purge.

Other fields are allowed.

Used by