- Customer selects a plan in your application
- The React SDK calls your authenticated merchant callback with
{ planCode, returnUrl } - Your backend derives the customer, validates the plan and return origin, and calls Nozle with
sk_ - Nozle keeps the current plan active and computes the exact invoice or proration
- If money remains due, Nozle returns a hosted Stripe URL or embedded client secret
- Customer completes payment with Stripe
- Stripe sends signed payment events to Nozle
- Nozle applies the paid plan change only after verified success
Plan checkout is payment-gated: a paid plan change is not applied until Stripe confirms payment through the webhook. If prepaid credits reduce the exact amount due to zero, Nozle applies the change transactionally and returns
type: "completed" without creating a Stripe session.Required Stripe webhook setup
When you connect a Stripe account, Nozle registers a Stripe webhook endpoint for that account and stores Stripe’s webhook signing secret. Your Stripe account must allow webhook endpoint creation. The webhook target is derived from your public Nozle API URL:payment_intent.succeededpayment_intent.payment_failedpayment_intent.canceled
API shape
Plan checkout:/checkout endpoint; browser sessions never call /billing/upgrade or /subscriptions/change.
Response
sk_. A Nozle publishable key is valid only for the plan catalog. If you mount embedded Stripe checkout yourself, your app also needs the Stripe publishable key for the same Stripe account connected in Nozle.
Credit-funded completion response:
React implementation
Option A — CheckoutButton (simplest)
Option B — Custom flow with useCheckoutSession
Option C — Embedded Stripe Checkout
Server-side plan changes
For B2B scenarios where payment is already handled outside embedded checkout:subscribe() requires a secret key (sk_). Embedded checkout should be used when Nozle needs to collect payment before activating a paid plan.
Mixed Entity plan checkout
Seat-based products can sell different Entity plans in one invoice and one payment. Your backend first creates or reuses active placeholder Entities, then calls the bulk Entity checkout endpoint with the selected plan for each placeholder.{ proSeats: 2, maxSeats: 1 }; your backend derives the customer, creates stable Entity IDs, validates the return origin, and calls Nozle.
Use billing_time: "anniversary" when the first successful purchase should establish the customer’s renewal day. Later Entity purchases align to that day and use Nozle’s invoice proration.
See Entity Subscriptions for the complete request and response.