> For the complete documentation index, see [llms.txt](https://docs.vapinetwork.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vapinetwork.ai/protocol/x402-payments.md).

# x402 payments

vAPI Call uses x402 for pay-per-call APIs. Payments use USDC on Base and are authorized from a buyer-controlled wallet for one request at a time.

## Payment flow

1. **Request.** The buyer sends the API request without a payment header.
2. **402 challenge.** The API returns `402 Payment Required` with an x402 exact challenge. The challenge states the network, USDC asset, recipient, amount, and validity window.
3. **Signed payment.** The buyer client validates those fields and the user's per-call maximum. The buyer-local wallet also checks its local daily limit. The buyer approves the network and signs a narrowly scoped EIP-3009 authorization.
4. **Settlement.** The client retries the same request once with the authorization. The provider or its facilitator settles the payment.
5. **Response.** The provider returns the API response and settlement result.

The signature fixes the recipient, value, token domain, chain, nonce, and time window. Discovery cannot change those fields after the buyer signs.

<figure><img src="/files/scoSYiVqboODiE7p6Dr1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The provider's live 402 challenge is the payment source of truth. A price or recipient stored in discovery can become stale. Validate the live challenge before signing.
{% endhint %}

Fees per listing source are on [Fees and the splitter](/for-vendors/fees-and-splitter.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vapinetwork.ai/protocol/x402-payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
