Skip to main content

Sync studio Stripe subscription

Projects the state of a Stripe subscription (referenceId = studioId) in profiles.profile_plan and billing fields. Internal endpoint (cron/BFF).
1 min read
post/internal/billing/stripe/sync
Request example
Response
post/internal/billing/stripe/sync

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Body

application/json
eventIdstringrequired#
eventTypestringrequired#
studioIdstringrequired#
planstringrequired#
statusstringrequired#
periodStartMsinteger#
periodEndMsinteger#
billingIntervalenum<string>#
Options:monthyear
extraMemberSeatsinteger#

Range: 0–100

aiCreditPacksinteger#

Range: 0–100

pendingExtraMemberSeatsinteger#

Range: 0–100

pendingAiCreditPacksinteger#

Range: 0–100

pendingPlanenum<string>#
Options:basepro
pendingBillingIntervalenum<string>#
Options:monthyear
pendingEffectiveAtMsinteger#
stripeSubscriptionIdstring#
stripeCustomerIdstring#

Responses

OK.