# x402 vs API keys and subscriptions: when is pay-per-call better?

> An API key identifies an account that was set up in advance and is billed later. x402 skips the account, and each request carries its own payment. x402 suits software that needs to use a service right now with no sign-up, and very small or occasional purchases. Keys and plans still suit steady, high-volume use, invoicing, and anything that depends on knowing the customer.

## Side by side

| | API key with a plan | x402 |
|---|---|---|
| Before the first call | Create an account, add a payment method, generate a key | Nothing. A funded wallet is enough |
| What grants access | The key | The payment |
| Billing | Monthly, prepaid credits, or a tier | Each request, as it happens |
| Smallest sensible purchase | Whatever the cheapest plan costs | A fraction of a cent |
| Secret to protect | The key | The wallet's signing key |
| Seller knows the customer | Yes, by account | Only the paying address |
| Refunds and disputes | Through the card or the contract | Only if the seller sends money back |
| Works for a first-time visitor | No | Yes |

The x402 FAQ makes the case for the right-hand column: API keys need account setup, a payment method and key handling in several steps, where x402 works through HTTP itself.

## Where x402 is the better fit

- **AI agents.** An agent that discovers a useful tool mid-task cannot stop to fill in a sign-up form. With x402 it can pay and continue.
- **Occasional use.** Nobody subscribes to a service they need twice a year. Paying a cent each time makes that use possible.
- **Many small sellers.** A buyer can use fifty APIs without fifty accounts, fifty keys and fifty invoices.
- **Selling to strangers.** A seller gets paid by anyone, anywhere, without building billing, sign-up or dunning.

## Where keys and plans are the better fit

- **Heavy, steady use.** At high volume a flat plan is simpler than a payment on every request, and often cheaper to run.
- **Businesses that need invoices.** Accounting departments expect a vendor, a contract and a monthly bill.
- **Paying by card.** x402 does not natively take cards. See [using x402 services without a crypto wallet](https://www.ask402.ai/x402/use-x402-without-a-crypto-wallet).
- **Per-customer rules.** Rate limits, feature flags and support tiers all depend on knowing who is calling.
- **When you must know your customer.** x402 tells you an address, not an identity. See [accounts and KYC](https://www.ask402.ai/x402/x402-kyc-and-accounts).

## What you give up with each

**With keys:** every new customer has to get past your sign-up before paying you anything, a leaked key can run up someone else's bill, and software cannot become your customer by itself.

**With x402:** payments are final, the buyer needs tokens in a wallet, and you learn little about who your users are. See [is x402 safe?](https://www.ask402.ai/x402/is-x402-safe)

## You can use both

They are not exclusive. One service can offer both.

- **Same API, two doors.** Keep keys for contract customers and add x402 on the same routes for everyone else.
- **x402 for collection only.** The FAQ notes you can meter and aggregate usage in a billing system and use x402 just to execute the charge.
- **A free tier plus x402.** Let anyone try a limited version, then charge per call beyond it.

## Related protocols

If recurring billing is what you want from a 402-based protocol, [MPP](https://www.ask402.ai/x402/what-is-mpp) defines a subscription payment type. x402 has `batch-settlement` for many small payments against one funded balance. See [payment schemes](https://www.ask402.ai/x402/x402-payment-schemes).

## Deciding

Ask who your next customer is. If it is a company that will sign a contract, a key is fine. If it is a program that has never heard of you and needs an answer in the next second, it cannot use a key, and x402 is how it pays.

To see how sellers set this up, read [how to accept x402 payments](https://www.ask402.ai/x402/how-to-accept-x402-payments) and [how to price an x402 API](https://www.ask402.ai/x402/how-to-price-an-x402-api).

## Sources

- [x402 FAQ](https://docs.x402.org/faq)
- [x402 documentation](https://docs.x402.org/)
- [x402 repository README](https://github.com/x402-foundation/x402/blob/main/README.md)

---

Facts checked against the sources above on 2026-11-20. Canonical page: https://www.ask402.ai/x402/x402-vs-api-keys
