Buildspace
Billing

Testing

Validate billing in development with Stripe test mode and Buildspace webhook processing.

Buildspace billing has a strict environment mapping:

  • dev app environments use Stripe test mode
  • prod app environments use Stripe live mode

Local checklist

  1. Connect a Stripe test account from Studio.
  2. Enable billing for the app's development environment.
  3. Create at least one product and price in Studio.
  4. Start Checkout from your app with a test-mode API key.
  5. Confirm the subscription or entitlement state through the SDK after Checkout completes.

What to verify

  • listProducts() and listPrices() 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() or getSubscription() 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.

On this page