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

# Example Integrations

> Runnable examples showing StellarX402 in real integration shapes.

All examples live in [github.com/stellar/x402-stellar/examples](https://github.com/stellar/x402-stellar) and are runnable with a single command.

## Buyer-side

| Example                    | What it shows                                              |
| -------------------------- | ---------------------------------------------------------- |
| `examples/buyer-fetch`     | Minimal `fetchWithPayment` against the buyer quickstart.   |
| `examples/buyer-discover`  | Full Bazaar search + pay flow.                             |
| `examples/buyer-agent-mcp` | An MCP-speaking agent that discovers and calls paid tools. |
| `examples/buyer-budgeted`  | Smart-account budget layered on top.                       |

## Seller-side

| Example                    | What it shows                                   |
| -------------------------- | ----------------------------------------------- |
| `examples/seller-express`  | One-route Express server with `requirePayment`. |
| `examples/seller-fastapi`  | Same, in FastAPI.                               |
| `examples/seller-next-app` | Next.js app-router route handler.               |
| `examples/seller-upto-llm` | Metered pricing for an LLM completion endpoint. |

## Operator-side

| Example                            | What it shows                                         |
| ---------------------------------- | ----------------------------------------------------- |
| `examples/operator-docker-compose` | Facilitator + Postgres + Grafana in one compose file. |
| `examples/operator-k8s`            | Kubernetes manifests with sponsor-balance alert.      |

## Running an example

```bash theme={null}
git clone https://github.com/stellar/x402-stellar
cd x402-stellar/examples/buyer-fetch
cp .env.example .env   # fill in your Testnet keypair
npm install && npm start
```

Each example's README lists what environment variables it needs.
