List plans
plans() accepts either pk_ or sk_ credentials.
Each Plan is a typed dictionary containing code, name, amount_cents, amount_currency, and interval.
Create checkout
checkout() requires sk_ and returns one of three typed result variants:
StripeCheckoutResult with a hosted url or embedded client_secret;
CompletedCheckoutResult; or
ScheduledCheckoutResult.
Validate the exact HTTPS return origin before passing a browser-provided URL to this method.
Deprecated success_url
success_url= remains a deprecated alias for return_url=. The SDK emits DeprecationWarning, sends only return_url, and rejects conflicting values with NozleValidationError.
Stripe webhooks remain authoritative. Checkout return values and browser redirects are interface signals, not proof that a paid subscription is active.
Direct subscription
Use checkout for payment-gated changes. Use direct subscription only when the configured flow does not require interactive payment.
Cancellation
The policy defaults to end_of_period and also accepts immediate.
Entity subscriptions
Change or cancel only that Entity:
Every method requires an sk_ key. See Entity Subscriptions for lifecycle and payment behavior.
The Python SDK currently exposes single-Entity checkout and plan changes. For a mixed seat-pool purchase, call the bulk Entity checkout endpoint from your trusted backend. Do not loop over entity_subscriptions.checkout(), because each call creates an independent checkout instead of one combined invoice.
Settlement transitions
Apply requires an idempotency key up to 255 UTF-8 bytes. See Subscriptions for settlement options and validation rules.
Upsert the customer first
See Customers and Entities for lifecycle details.