Billing
Testing
Validate billing in development with Stripe test mode and Buildspace webhook processing.
Buildspace billing has a strict environment mapping:
devapp environments use Stripetestmodeprodapp environments use Stripelivemode
Local checklist
- Connect a Stripe test account from Studio.
- Enable billing for the app's development environment.
- Create at least one product and price in Studio.
- Start Checkout from your app with a test-mode API key.
- Confirm the subscription or entitlement state through the SDK after Checkout completes.
What to verify
listProducts()andlistPrices()return your expected catalog.- Checkout redirects to a Stripe-hosted page for the creator's connected account.
- The success page does not immediately grant access without a synced entitlement check.
getEntitlements()orgetSubscription()reflects the Stripe event after webhook processing.
Avoid false positives
If Checkout returned a URL, that only proves session creation worked. Payment success still depends on Stripe checkout completion plus webhook sync back into Buildspace.
Test-mode banner
When your app environment is wired to a Stripe test account, end-buyers should
not be prompted for real card details. Render a "Test mode" banner whenever
getStatus().testMode is true.
import { createClient, shouldShowTestBanner } from "@buildspacestudio/sdk/client";
const buildspace = createClient(process.env.NEXT_PUBLIC_BUILDSPACE_KEY!);
const status = await buildspace.billing.getStatus();
if (shouldShowTestBanner(status)) {
// Render a banner like: "Test mode — payments are simulated."
}The same getStatus() method is available on the server SDK for SSR. The
response also exposes enabled, mode, and status so you can decide when to
show pricing pages, gate features behind enabled, or block live Checkout
attempts during initial setup.