Swap your OpenAI client base URL and key, include a stable user id, and you
can charge for usage in minutes.
Create a paywall & choose mode
Create a paywall in the dashboard and choose your mode. This sets how money flows and cannot be changed later.
- Default (App‑scoped wallet) — You collect payments directly (e.g., Stripe or your own rails). Users’ balances live in your app’s scope. You credit balances via Deposit API and charges deduct from that balance. No end‑user authorization step.
- Shared (Cross‑app wallet) — Paywalls hosts a user‑controlled wallet that can be spent across apps. Users authorize your paywall. You earn per usage and later withdraw. End‑user authorization required.
Choose a mode
Compare Default vs Shared mode, trade‑offs, and examples.
Configure a model provider
- Default mode (required)
Connect a provider via BYOK. Works with OpenAI, TogetherAI, OpenRouter, or any OpenAI‑compatible API.
Model providers
Model selection & routing
Paywalls Proxy
OpenAI-compatible proxy
Configure payments / top‑ups
- Default mode
Paste a restricted Stripe API key in the
dashboard. Paywalls auto‑creates checkout links and subscribes to webhooks to
credit balances. Or use custom rails and call Deposit API after you receive
funds.
Connect Stripe
Fast path with Stripe test/live keys.
Test keys & environments
How to test end‑to‑end safely.
Copy API key & base URL; make your first request
Grab your paywall API key (sk‑paywalls‑…) and point your OpenAI client at the Paywalls base URL.
Always include a stable, pseudonymous user id: body
user (recommended) or header X‑Paywall‑User. Keep your key server‑side.- Node (OpenAI SDK)
- Python (OpenAI SDK)
- fetch (JS)
- cURL
Pass user id
All supported methods and client examples.
Client SDKs
Node, Python, Go, .NET, cURL, and more.
Understand responses & next steps
- Default mode
- Paywall‑required flows arrive as normal assistant messages — render them as any chat reply.
- If the user must top up, the message already includes the link. After completion, the next requests proceed normally.
- Stripe webhooks auto‑deposit into the app‑scoped balance.
Request Lifecycle
How requests are processed, metered, and charged.
Monetization recipes
Common patterns and examples.