Docs Purchases and Subscriptions

Purchases and Subscriptions

How checkout, webhooks, entitlements, and subscription changes work.

Purchase Lifecycle

  1. Client requests checkout session (/api/v1/pay/checkout).
  2. User completes payment on Stripe-hosted checkout or PaymentSheet.
  3. Webhook is verified and normalized (/api/v1/webhooks/stripe).
  4. Order is marked paid and entitlement receipt is minted.
  5. Client retrieves entitlements with /api/v1/entitlements/get.

Subscription Lifecycle

  • Portal access: POST /api/v1/subscriptions/portal
  • Cancellation: POST /api/v1/subscriptions/cancel
  • Validation: POST /api/v1/entitlements/validate
  • Event replay: GET /api/v1/events/replay

Security Behavior

  • Checkout, portal, and cancel are auth-required by default.
  • Webhook signatures are required (Stripe and PayPal).
  • Token-in-query redirects are disabled by default.
  • Sensitive fields are scrubbed from logs.