Billing#
Create Stripe Checkout sessions for paid Brandwave plans and process Stripe-driven billing synchronization.
Create billing checkout session#
Create a Stripe Checkout session for an unpaid organization and a selected Brandwave paid plan.
Owner only
typescript
const { data } = await bw.billing.createCheckoutSession({
organizationId: 'org_123',
plan: '...',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier to create Checkout for. |
| plan | 'starter' | 'growth' | 'scale' | Required | Selected paid plan. |
Response#
Returns { data } with the result.
Create billing portal session#
Create a Stripe Customer Portal session for a paid organization.
Owner only
typescript
const { data } = await bw.billing.createPortalSession({
organizationId: 'org_123',
});Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| organizationId | string (UUID) | Required | Organization identifier to launch Stripe Customer Portal for. |
Response#
Returns { data } with the result.