Buildspace
Billing

Customer Portal

Let paid users manage their subscription, payment method, and invoices through Stripe-hosted pages.

Use the Stripe-hosted customer portal for self-serve billing management.

Browser flow

await bs.billing.redirectToPortal({
  returnUrl: `${window.location.origin}/account`,
});

Server flow

const portal = await bs.billing.createPortalSession({
  appUserId: "customer_123",
  returnUrl: "https://app.example.com/account",
});

Browser portal redirects work for the signed-in Buildspace user. Server-side portal creation is the right default when you use external auth or store billing identity as appUserId.

On this page