x402 Quote Unit Misread: Why a Small API Call Shows an Unusually High Charge

 / 
2

First check whether the quote unit is a "per-call fee" or an "upper-limit preauthorization." The unusual charge you see is probably the max amount from an upto plan, not the real charge.

A few days ago, a friend who does AI data scraping showed me his bill. He called a weather query API priced at 0.005 USDC per call, but his wallet was charged 0.5 USDC. He showed me the x402 quote. The maxAmountRequired field said 0.5 USDC, so he signed it without thinking. That is exactly the problem: this API uses the upto billing mode. The 0.5 USDC is an upper limit, not the actual price.

Two x402 Quote Modes

This is the source of the confusion.

exact (fixed price): The price is set before processing. You pay exactly what is quoted. This fits image generation, file downloads, search results, and other fixed-output services.

upto (usage-based billing after processing): Before processing, you only see a maximum limit. After usage ends, you settle by real usage. Chat completion, streaming data output, and long-running computing tasks often use this mode.

The key point: in upto mode, the amount you sign is an upper limit, not the actual charge. But the wallet popup shows maxAmountRequired as the number you sign. Many users see that number and think they will pay that much.

An API platform's official pricing page clearly separates the two: in exact mode, maxAmountRequired is the payable amount; in upto mode, you first authorize an upper limit, then settle by real usage, and it never exceeds that upper limit.

Which Situation Are You In?

Case A: You saw the upper limit and thought it was the real charge

What happens: the wallet popup shows 0.5 USDC. You sign it. In the end, the wallet is only charged 0.005 USDC.

What is wrong: you did not misread the number, but you misread the mode. The authorized amount in upto mode is the "maximum allowed." The real charge happens after the service finishes.

What to do: check the cost.amount field in the service response, or check the settlement details after x402 settlement. That shows the real charge, not the authorized upper limit.

Done when: you find the actual charge record and confirm it is far lower than the maxAmountRequired you signed.

Case B: You really were charged the upper limit

What happens: the wallet charge equals maxAmountRequired, and you did not get a refund.

Possible reasons:

  1. This is exact mode, and the quote is the real price. The API is simply that expensive. You did not misread the unit; you just expected a lower price.

  2. This is upto mode, but your usage really reached the upper limit. For example, the token count in a chat request hit the model limit.

  3. The server had an error and settled at the upper limit instead of correcting for real usage.

What to do:

  • Go to the service provider's dashboard or call logs and check the "actual usage" and "settlement amount" for this request.

  • Compare actual usage × unit price with the charged amount.

  • If the cost from actual usage is far lower than the charge, send the logs to the service provider for reconciliation.

High-risk warning: in the x402 protocol upto mode, if the upstream service returns a 4xx or 5xx error, settlement is skipped and you are not charged. But if you signed the upper-limit authorization and the service returns a normal 2xx response, settlement is triggered. The charge is based on real usage, but only if the server implements metering correctly. If the server has a bug and treats maxAmountRequired as a fixed amount, you will be overcharged.

Step 1: Check the Actual Settlement Amount

Open your wallet transaction history and find that x402 payment.

How to check:

  • If it was handled by a facilitator, go to the facilitator's dashboard and check settlement details.

  • If the provider offers a tool like x402scan, enter your payment identifier to see the full settlement record.

  • Check the receiving address on a blockchain explorer to see the actual amount received.

Done when: you have the actual settlement amount and can separate the "authorized upper limit" from the "real charge."

Step 2: Compare with the Provider's Pricing Rules

Find the official pricing page for the service you used.

What to check:

  • The pricing unit: per call, per token, per computing time, or per data amount.

  • For chat APIs, check the input/output price per 1M tokens for that model.

  • Confirm your usage, multiply it by the unit price, and see whether it matches the charge.

Done when: you can write a simple formula: actual usage × unit price = actual charge.

Final Check

Put the "signed upper limit" next to the "actual settlement amount."

Where to verify:

  • Check the final charge in your wallet.

  • Check the actual usage of this call in the provider's logs.

  • If it is upto mode, confirm that maxAmountRequired is only for preauthorization, not the final charge.

If the real charge is far lower than the signed upper limit, you met normal upto behavior. It was a false alarm. If the real charge equals the upper limit but your usage did not reach it, keep the logs and contact the provider's support team for reconciliation.