# x402 Explained: What an Agent Needs to Pay for an API Call

Canonical: https://tokenprimer.com/news/e0c363ea-7a53-495e-bd9c-73876c037961
Published: 2026-10-07T13:57:49.568Z
Publisher: Token Primer

A practical guide to payment requirements, wallet authorization and spending limits, with AirnodeHub’s current free access and documented V1 payment flow kept distinct.

x402 lets software pay for an API request through HTTP. The seller states its terms, the buyer authorizes payment, and the service verifies and settles it. For an agent, the important distinction is that discovering an API does not supply a wallet or permission to spend.

## How the payment flow works

The [x402 specification](https://github.com/coinbase/x402/blob/main/specs/transports-v2/http.md) defines these V2 HTTP steps:

1. Request the resource without payment.
2. Receive HTTP 402 and decode the PAYMENT-REQUIRED header. Inspect the amount, asset, network and recipient.
3. Apply the application's spending policy before a wallet signs the payment payload.
4. Retry with PAYMENT-SIGNATURE. The server validates the payload and settles payment, directly or through a facilitator.
5. Check the returned resource and PAYMENT-RESPONSE settlement metadata.

A [buyer wallet](https://docs.x402.org/core-concepts/wallet) holds funds and signs payment authorizations. An agent's text instruction is not itself that authorization. Payment-capable software must connect the task to an approved signing path.

## What AirnodeHub supports today

On October 7, 2026, [AirnodeHub's consumer documentation](https://airnodehub-docs.api3.org/api-consumers/) stated that all listings were free during early access. That is a current status, not a promise of permanent free access.

A same-day inspection of the CoinGecko Airnode's [OpenAPI document](https://airnode-coingecko.fly.dev/) found build 0.1.2 and no price field on simplePrice. The check read GET / only; it did not execute an operation or demonstrate payment settlement. Recheck the deployed document before making a call.

The Hub's [HTTP payment documentation](https://airnodehub-docs.api3.org/airnode/http-interface#payments) describes a V1 flow using X-PAYMENT and X-PAYMENT-RESPONSE, with USDC on Base. Those headers must not be substituted with V2 names merely because a newer tutorial uses them. Match the client to the endpoint's documented version.

Its [MCP server](https://airnodehub-docs.api3.org/api-consumers/mcp) has no wallet. If an operation is priced, the tool returns payment requirements and the Airnode URL instead of performing it. An appropriately authorized, payment-capable caller must complete the direct request. Earlier [MCP coverage](https://forkbrief.com/news/aab56674-cf01-483d-9f8c-a8e7a9491e9a) explains the discovery tools separately.

## A per-call cap is not a daily budget

The [buyer SDK guide](https://docs.x402.org/getting-started/quickstart-for-buyers) documents payment limits and permitted assets. Applications should also track cumulative spending and bound retries. These are recommended controls, not built-in AirnodeHub guarantees.

For illustration, 1,000 calls priced at $0.001 each would total $1 in resource charges, before any separate fees. A small individual price can still exceed a budget through repeated calls. This arithmetic is hypothetical, not a Hub price or executed payment test.

Payment receipts and data attestations answer different questions. A receipt records settlement; an attestation identifies the signer and binds a response to its request. Neither establishes factual accuracy. Keep the payment result, returned data and request binding together when evaluating what the agent actually obtained.

## Sources

- [x402 buyer wallet responsibilities](https://docs.x402.org/core-concepts/wallet) — x402
- [MCP | AirnodeHub](https://airnodehub-docs.api3.org/api-consumers/mcp) — airnodehub-docs.api3.org
- [Airnode HTTP interface](https://airnodehub-docs.api3.org/airnode/http-interface) — API3 AirnodeHub
- [x402 V2 HTTP transport specification](https://github.com/coinbase/x402/blob/main/specs/transports-v2/http.md) — x402 project
- [For API consumers | AirnodeHub](https://airnodehub-docs.api3.org/api-consumers/) — airnodehub-docs.api3.org
- [CoinGecko Airnode API definition](https://airnode-coingecko.fly.dev/) — API3 AirnodeHub
- [x402 buyer SDK and spend controls](https://docs.x402.org/getting-started/quickstart-for-buyers) — x402

- [Editorial policy](https://tokenprimer.com/editorial-policy)
- [Request a correction](https://tokenprimer.com/corrections)
