The DIY approach: issue keys, meter usage, invoice
Paywall vs API keys + metered billing
The traditional way to monetise an API is to issue API keys, meter usage, and invoice (often via a metered-billing provider). It works for known customers but assumes a human signs up first. Paywall lets agents pay per call with no key to provision.
| Paywall (x402) | API keys + metered billing | |
|---|---|---|
| Onboarding | No signup — pay per call | Caller signs up, gets a key |
| Billing | Paid at call time in USDC | Meter usage, invoice later |
| Unknown callers | Native — agents just pay | Hard — must provision first |
| Build effort | One middleware | Keys + metering + invoicing |
| Reconciliation | Signed, retried webhooks | Your own pipeline |
- Familiar and fully under your control
- Great for known, contracted customers with monthly plans
- Mature billing providers exist for usage metering
- No new protocol for your existing human customers to learn
- No key/plan provisioning for callers you’ll never meet
- Payment happens in the request itself (signed 402), not a monthly invoice
- Test mode proves the whole loop before going live
- Fail-closed: unpaid or unverifiable requests get a 502, never free content
Your customers are known businesses on monthly contracts, and you already have key management and billing in place.
You want to charge unknown, autonomous callers without provisioning anything, and bill per request instead of per month.
FAQ
Yes. You can gate only the routes you choose with the SDK; existing keyed routes and customers are untouched.
For pay-per-call agents, no — payment happens in the request and payouts are automatic. You can keep your existing billing for human customers.