Docs
Purchases and Subscriptions
Purchases and Subscriptions
How checkout, webhooks, entitlements, and subscription changes work.
Purchase Lifecycle
- Client requests checkout session (
/api/v1/pay/checkout). - User completes payment on Stripe-hosted checkout or PaymentSheet.
- Webhook is verified and normalized (
/api/v1/webhooks/stripe). - Order is marked paid and entitlement receipt is minted.
- 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.