Billing methods run on your server with a secret key. Derive the Nozle customer from the authenticated application user or workspace.
List plans
Each Plan contains code, name, amount_cents, amount_currency, and interval.
Create checkout
checkout() requires an sk_ key and may return:
Handle every result shape explicitly:
Validate the exact HTTPS return origin on your server before passing it to Nozle.
Stripe webhook processing is authoritative. A checkout result, browser redirect, or client callback does not by itself prove that a paid subscription is active.
Direct subscription
subscribe() requires an sk_ key and returns SubscribeResult. Use checkout for payment-gated plan changes; use direct subscription only where your configured product flow does not require an interactive payment.
Cancellation
The policy defaults to end_of_period and also accepts immediate.
Entity subscriptions
Use Entity subscriptions when users, agents, projects, or workspaces under one paying customer can have different plans.
Change or cancel only that Entity:
Every method requires an sk_ key. See Entity Subscriptions for lifecycle and payment behavior.
The Node.js SDK currently exposes single-Entity checkout and plan changes. For a mixed seat-pool purchase, call the bulk Entity checkout endpoint from the same trusted backend and return only the Stripe result to your browser. Do not loop over entitySubscriptions.checkout(): that would create separate invoices and payments.
Settlement transitions
Preview and apply merchant-configurable cancellation, downgrade, and uncancel operations:
Apply requires an idempotency key up to 255 bytes. See Subscriptions for settlement options and validation rules.
Customer creation
Create or update the customer before subscribing when needed:
See Customers and Entities for lifecycle methods.