Swap your OpenAI client base URL and key, include a stable user id, and you
can charge for usage in minutes.
1
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.
2
Configure a model provider
- Default mode (required)
 
Connect a provider via BYOK. Works with OpenAI, TogetherAI, OpenRouter, or any OpenAI‑compatible API.
3
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.
4
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
 
5
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.