Ask402

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

Short answer

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 planx402
Before the first callCreate an account, add a payment method, generate a keyNothing. A funded wallet is enough
What grants accessThe keyThe payment
BillingMonthly, prepaid credits, or a tierEach request, as it happens
Smallest sensible purchaseWhatever the cheapest plan costsA fraction of a cent
Secret to protectThe keyThe wallet's signing key
Seller knows the customerYes, by accountOnly the paying address
Refunds and disputesThrough the card or the contractOnly if the seller sends money back
Works for a first-time visitorNoYes

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.
  • 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.

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?

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 defines a subscription payment type. x402 has batch-settlement for many small payments against one funded balance. See 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 and how to price an x402 API.

Sources

Facts checked against these sources on . Protocols change, so the official specification wins if it disagrees with this page. Read this page as Markdown.

Who writes this. Ask402 is published by Havok Holdings LLC, which also runs Agent402, one of the x402 services covered here. Agent402 is labelled wherever it appears. Everything else is described from each project’s own documentation, and nobody pays to be listed.