Billing getSubscription
Get current subscription status for the authenticated user.
Responses
Successful response
subscriptionIdrequiredtierrequiredscaleis legacy: no longer sold, kept so existing subscriptions resolve.statusrequiredcurrentPeriodEndrequiredusageThisMonthnumber · requiredusageLimitrequiredbillingCycleStartrequiredeverPaidboolean · requiredEver made a real Stripe payment (top-up or paid plan) — lifetime full model catalog.
intervalrequiredHow the active subscription is billed; null for free/none. Plan changes must stay on this interval, so the pricing toggle follows it.
seatsrequiredPurchased seats on a per-seat Team plan; null otherwise.
Billing createSubscription
Create a new subscription.
Request Body
tierrequiredintervalrequired
couponCodestringOptional Stripe promotion code (customer-facing, e.g. "LAUNCH100") to pre-apply at checkout.
seatsobjectPurchased seat counts for a paid team (Stripe line-item quantities).
currencyCheckout currency; default usd. huf = the Hungarian pricing page.
Responses
Successful response
successboolean · required
subscriptionIdstringclientSecretstringcheckoutUrlstringmessagestring
Billing updateSubscription
Update subscription tier (upgrade/downgrade).
Request Body
newTierrequired
intervalcouponCodestringOptional promo code — only applied when upgrading from a free tier to a first paid plan.
seatsobjectPurchased seat counts for a paid team (Stripe line-item quantities).
currencyCheckout currency when coming from a free/local plan; a live subscription keeps its own.
Responses
Successful response
successboolean · required
subscriptionIdstringclientSecretstringcheckoutUrlstringmessagestring
Billing syncAppleTransaction
Verify a signed StoreKit transaction and apply it to the account (iOS in-app purchase).
Responses
Successful response
subscriptionIdrequiredtierrequiredscaleis legacy: no longer sold, kept so existing subscriptions resolve.statusrequiredcurrentPeriodEndrequiredusageThisMonthnumber · requiredusageLimitrequiredbillingCycleStartrequiredeverPaidboolean · requiredEver made a real Stripe payment (top-up or paid plan) — lifetime full model catalog.
intervalrequiredHow the active subscription is billed; null for free/none. Plan changes must stay on this interval, so the pricing toggle follows it.
seatsrequiredPurchased seats on a per-seat Team plan; null otherwise.
Billing getSubscriptionBilling
Verified recurring price, currency, interval and status of your own subscription, and whether Team seats can be changed.
Responses
Successful response
providerrequiredsubscriptionIdrequiredtierrequiredscaleis legacy: no longer sold, kept so existing subscriptions resolve.statusrequiredRaw Stripe status when provider = stripe, else the stored status.
currencyrequiredintervalrequiredrecurringSubtotalrequiredΣ unit price × quantity of the live items, minor units, before discounts/tax.
cancelAtPeriodEndboolean · requiredcurrentPeriodEndrequiredms
seatsrequiredPurchased seats per Stripe items; null on a legacy fixed Team or non-seat plan.
seatPricesrequiredLive item price per kind; a kind not on the subscription uses the configured seat price in the same currency/interval.
occupiedrequiredSeats in use, owner included — the lowest totals the editor may pick.
legacyTeamboolean · requiredFixed-price Team subscription: saving seats migrates it to Standard/Premium seat pricing.
canEditSeatsboolean · requiredseatEditBlockedReasonrequiredseatEditMessagerequiredpendingSeatChangeboolean · requiredA seat change is waiting on payment.
pendingSeatPaymentobjectHow to finish that payment (owner only — this is their own subscription).
unconfirmedQuoteIdstringA submitted seat change whose outcome is unknown; confirmTeamSeatChange with it (safe to repeat) resolves it.
Billing getTeamSeatQuote
Preview (via Stripe) the cost of changing your Team Standard/Premium seats. Owner only; nothing is charged.
Request Body
seatsobject · requiredPurchased seat counts for a paid team (Stripe line-item quantities).
Responses
Successful response
quoteIdstring · requiredsubscriptionIdstring · requiredseatsobject · requiredPurchased seat counts for a paid team (Stripe line-item quantities).
previousSeatsrequiredlegacyMigrationboolean · requiredcurrencyrequiredintervalrequiredseatPricesobject · requiredPrice per seat per billing interval, minor units of SubscriptionBilling.currency.
recurringSubtotalnumber · requiredNew recurring subtotal per interval (minor units, before discounts/tax).
previousRecurringSubtotalnumber · requiredamountDuenumber · requiredEvery change is prorated immediately (Stripe always_invoice): amountDue is charged now; a negative total is credited to the customer's Stripe balance. Money, minor units of
currency.totalnumber · requiredStripe preview invoice total; negative = credit to the customer balance.
linesobject[] · requiredallowanceDeltanumber · requiredUsage credits (not money) added to (>0) or removed from (<0) the team's allowance when the change applies: the pool difference prorated to the rest of the current allowance period. Applied exactly once, together with the Stripe change (after payment if one is required). A removal is reserved at confirm and refused if those credits are already used.
allowancePeriodEndnumber · requiredms — end of the allowance period allowanceDelta is prorated to.
prorationDatenumber · requiredms
currentPeriodEndnumber · requiredexpiresAtnumber · requiredms — confirm before this; a submitted quote's retries resolve regardless.
Billing getUsageStatus
Get usage status: balances, monthly plan usage, and anchored session/weekly rate-limit windows. Pass projectId to see the pool that funds work in that project (a team's, if it is a team project).
Responses
Successful response
totalBalancenumber · requiredmanualBalancenumber · requiredsubscriptionBalancenumber · requiredtierrequiredscaleis legacy: no longer sold, kept so existing subscriptions resolve.hasActivePaidSubscriptionboolean · requiredallowExtraSpendboolean · requiredcreditLimitnumber · requiredmonthlyTopUprequiredpercentUsednumber · requiredusageThisMonthnumber · requiredbillingCycleStartrequiredsessionrequiredweeklyrequired
fundedByTeamOwnerIdstringSet when this is a TEAM's pool, not the user's own: the paying team's owner id. Undefined = the user's own account funds work here.
Billing getTeams
List every team the authenticated user belongs to, as owner or member.
Responses
Successful response
ownerIdstring · requiredThe team is addressed by its funding owner on this API.
organizationIdstring · requiredThe organization row behind it (better-auth organization plugin / SSO).
ownerEmailstring · requiredmaxSeatsnumber · requiredisOwnerboolean · requiredmyRolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
canManageboolean · requiredactiveboolean · requiredpromoBoostboolean · requiredmembersobject[] · requiredinvitesobject[] · required
ownerNamestringnamestringOrganization display name.
tierThe owner's subscriptionTier: tells a free team from a paid/legacy one (with
activefor dormant).premiumSeatsnumberPremium seats bought on a per-seat plan; undefined on fixed plans.
ownerSeatTypeThe owner's own seat on a per-seat plan.
joinDomainstringEmail domain that auto-joins this team on signup/sign-in; undefined = off.
eligibleDomainstringDomain the owner is eligible to enable (their own, when not a public mail provider).
teamProjectIdsstring[]The team's shared projects: every member holds write access, and work inside one of them is billed to THIS team's pool. Empty = not set up yet. Optional until the multi-team backend lands.
teamLandingProjectIdstringThe team project a new member lands in on join (their
/). One of teamProjectIds; managers may re-point it. Unset when the team has none.
teamProjectIdstring · deprecated · required
Billing addTeamMember
Invite someone to the team by email — emails a join link they must accept.
Request Body
emailstring · required
roleownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |
Billing revokeTeamInvite
Billing setTeamProject
Attach/detach one of the owner's projects as a shared team project (owner/admin). Members get write access and work there is billed to the team pool.
Request Body
projectIdstring · requiredProject to attach/detach — must be owned by the team owner. Required: a team may hold several projects, so there is no "the" one to infer.
isTeamProjectboolean · requiredtrue = shared team project (members get write access, spend draws the pool).
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |
Billing setTeamLandingProject
Pick which team project new members land in on join (owner/admin). Must already be a team project.
Request Body
projectIdstring · requiredMust already be one of the team's projects.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |
Billing setTeamJoinDomain
Enable/disable auto-join for everyone on the owner's company email domain (owner only).
Request Body
enabledboolean · requiredtrue = auto-join on the owner's verified email domain, false = off.
ownerIdstringTeam to act on, identified by its owner's user id.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |
Billing previewTeamInvite
Preview an invite before signing in. Non-consuming.
path Parameters
tokenstring · required
Responses
Successful response
ownerEmailstring · requiredMasked (
j***@acme.com) — a forwarded link must not leak the owner's address.emailstring · requiredFull invited address — the invite email already contains it, and the sign-in form prefills from it.
rolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
teamNamestring · required
Billing acceptTeamInvite
Billing setTeamMemberRole
Promote/demote a team member between admin and member (owner only).
path Parameters
memberIdstring · required
Request Body
memberIdstring · requiredrolerequiredRole of a user within a team (IAM). owner: billing + full control; admin: manage members; member: belongs only.
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |
Billing setTeamMemberSeat
Move a team member between Standard and Premium seats (owner only).
path Parameters
memberIdstring · required
Responses
Successful response
Decision Table
| Variant | Matching Criteria |
|---|---|
| type = null | |
| type = object · requires: ownerId, organizationId, ownerEmail +8 more |