> ## Documentation Index
> Fetch the complete documentation index at: https://celoref.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Tools

> x402 payment signing and payment-aware fetching.

# Payment Tools

These are the core money-moving tools in PIXA.

## `pay`

`pay` signs an x402 payment authorization.

Use it when:

* a seller returns `402 Payment Required`
* an API needs a payment header before it will return content
* the agent already knows the payment amount and network

The tool is designed to return the payment header value that the caller can attach to the seller request.

## `x402_fetch`

`x402_fetch` fetches a URL and handles the payment-required round trip.

Use it when:

* the agent wants one call instead of manually fetching and retrying
* the service is x402-enabled
* the flow should stay inside PIXA instead of custom code

## Practical rule

If the API is on a non-Algorand chain, PIXA may first need to route value through the hub or a hosted flow before the request can complete.

That is why the docs should always describe the payment path clearly.
