Use Shoppex as the billing engine behind your SaaS. Your app handles signup, dashboard, and feature flags. Shoppex handles the checkout, card/PayPal/crypto, trials, renewals, failed-payment retries, and plan changes.Documentation Index
Fetch the complete documentation index at: https://docs.shoppex.io/llms.txt
Use this file to discover all available pages before exploring further.
Why this works well
No Stripe integration to build
Shoppex already orchestrates PSPs. You get card, PayPal, and crypto without wiring each one.
Real subscription lifecycle events
Trial started, trial ended, renewed, cancelled, upcoming renewal — Shoppex emits them all as webhooks.
Flow
- The user signs up in your app.
- Your backend creates an order for the subscription product via
POST /dev/v1/orders(notPOST /dev/v1/payments). - The user completes payment in hosted checkout.
- Shoppex emits subscription lifecycle webhooks.
- Your app updates entitlements from those events.
Shape
| Piece | Responsibility |
|---|---|
| Your SaaS app | Signup, user record, feature flags, cancellation UI |
| Webhook handler | Toggle feature flags based on subscription lifecycle events |
| Shoppex | Plan pricing, trial logic, renewal billing, dunning, crypto support |
Feature-flag pattern
Link your user record to the Shoppex customer on signup, then toggle entitlements on subscription events:Treat
planActiveUntil as the source of truth in your feature-flag middleware. subscription:cancelled means “will not renew” — the user still has access until current_period_end.Subscription management
Expose plan changes inside your own UI by calling the Dev API from your backend:POST /dev/v1/subscriptions/{id}/change-plan— upgrade / downgradePOST /dev/v1/subscriptions/{id}/pause//resumePOST /dev/v1/subscriptions/{id}/cancelGET /dev/v1/subscriptions/{id}/billing-history
Pitfalls
- Idempotency on signups — if your signup and checkout are two clicks apart, send the same
Idempotency-Keyon retry or you will create duplicate subscriptions. subscription:upcomingis your churn signal — sent before the next renewal, good trigger for “upgrade your plan” emails or feature-usage reminders.- Dunning is automatic — Shoppex retries failed payments on its own schedule. Do not build your own retry loop on top.
Related
Architecture Reference
Setup B (Next.js SSR) is the typical SaaS shape.
Dev API Subscriptions
Full subscription endpoint surface.