Quick comparison
Prerequisites
- Node.js 20+
- pnpm
- SolvaPay account (for real-backend examples)
- Supabase project (for Supabase examples)
Run any example
.env instead of .env.local when the example README says so.
Example notes
express-basic
- Good first project for
payable.http() - Uses stub mode and header-based customer identity
- README: examples/express-basic/README.md
express-provider-linkage
- Provider-owned client + IdP: backend calls
ensureCustomer(externalRef)before metering - Simulates post-CLI-login requests with
x-provider-user-id - README: examples/express-provider-linkage/README.md
nextjs-auth0
- Auth0 Regular Web App + embedded Pay As You Go checkout
- Canonical web reference for Auth0
sub→ SolvaPay customer linkage - README: examples/nextjs-auth0/README.md
checkout-demo
- Embedded checkout with React components
- Uses Supabase auth and purchase gating
- README: examples/checkout-demo/README.md
hosted-checkout-demo
- Hosted checkout and hosted customer portal
- Lower PCI complexity than embedded checkout
- README: examples/hosted-checkout-demo/README.md
supabase-edge
- Fetch-native backend for Supabase Edge Functions using
@solvapay/server/fetch - One two-line file per handler;
solvapayWebhookfactory for webhooks - README: examples/supabase-edge/README.md
mcp-time-app
- MCP app UI resource + protected tools
- Demonstrates
createSolvaPayMcpServerandregisterPayablewith OAuth context - README: examples/mcp-time-app/README.md
mcp-oauth-bridge
- Local discovery metadata for non-hosted MCP origin
- OAuth + dynamic client registration bridge pattern
- README: examples/mcp-oauth-bridge/README.md
mcp-checkout-app
- Full 5-intent MCP App (plans, checkout, top-up, usage, paywall)
- Hybrid checkout: embedded Stripe Elements via
<PaymentForm>on compliant hosts (basic-host, ChatGPT); auto-falls back to hosted SolvaPay checkout on hosts that ignore_meta.ui.csp(Claude) - Ships with
createMcpAppAdapterwired toSolvaPayProviderand a paywalled demo toolbox - README: examples/mcp-checkout-app/README.md
cloudflare-workers-mcp
- Single
fetchhandler built withcreateSolvaPayMcpFetchfrom@solvapay/mcp/fetch— OAuth discovery, bridge routes, tool calls, and the widget iframe in one worker - Ships a seeded stock-predictor demo toolbox (
predict_price_chart,predict_direction) to exercise the paywall end-to-end - README: examples/cloudflare-workers-mcp/README.md
supabase-edge-mcp
- Same toolbox as
cloudflare-workers-mcp, deployed as a single Supabase Edge Function - Uses
Deno.serve(createSolvaPayMcpFetch(…))from@solvapay/mcp/fetch - Pair with
supabase-edge-mcp-proxyif you need a custom domain in front of Supabase’s/functions/v1/…URL shape (required for RFC 9728.well-known/oauth-protected-resourcediscovery) - README: examples/supabase-edge-mcp/README.md
supabase-edge-mcp-proxy
- Cloudflare Worker that remaps
https://your-subdomain/*→https://<proj>.supabase.co/functions/v1/mcp/* - Fixes OAuth Protected Resource Metadata discovery for MCP Inspector and ChatGPT connectors
- README: examples/supabase-edge-mcp-proxy/README.md