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

# Introduction

> Faremeter is a collection of composable TypeScript libraries for making and accepting machine payments over HTTP.

It is built on the [x402 protocol](/concepts/how-x402-works) and the HTTP `402 Payment Required` standard, with support for [MPP (Machine Payments Protocol)](/concepts/mpp) via an x402v2 adapter.

```bash theme={null}
pnpm add @faremeter/rides
```

```typescript theme={null}
import { payer } from "@faremeter/rides"

await payer.addLocalWallet(process.env.PAYER_KEYPAIR_PATH)
const response = await payer.fetch("https://helius.api.corbits.dev")
```

Faremeter handles wallet detection, payment negotiation, and settlement transparently. Your code makes HTTP requests. Faremeter handles the payments.

<Tip>
  Want to skip setup and start experimenting? The [TypeScript Playground](https://github.com/faremeter/faremeter-ts-playground) is a pre-configured monorepo with all `@faremeter/*` packages ready to import. Clone it, run `pnpm install`, and start building under `apps/`.
</Tip>

## Not a developer?

Faremeter is a **reference implementation** of the [x402 protocol](https://www.x402.org/) — an open standard for paying for HTTP resources. Think of it like how a web browser implements the HTTP standard: x402 defines the rules, and faremeter is one set of tools that follows them.

Here is what happens when a machine pays for an API call:

1. A program requests data from a server.
2. The server says "that costs \$0.01" (HTTP 402 response).
3. The program signs a payment using its wallet — no human involved.
4. The program retries the request with the payment attached.
5. A facilitator verifies the payment and settles it on a blockchain.
6. The server delivers the data.

This enables **machine-to-machine payments** without accounts, API keys, invoices, or manual approval. AI agents, IoT devices, and automated pipelines can pay for resources the same way humans pay for subscriptions — except instantly and per-request.

Faremeter works with both **Solana** and **EVM** blockchains (like Base), using stablecoins like USDC so prices are predictable.

## Packages

Faremeter is modular. Use what you need.

| Package                     | Purpose                                                            |
| --------------------------- | ------------------------------------------------------------------ |
| `@faremeter/rides`          | High-level SDK. Three lines to pay for an API.                     |
| `@faremeter/fetch`          | Fetch wrapper with pluggable payment handlers.                     |
| `@faremeter/middleware`     | Server middleware for Express and Hono.                            |
| `@faremeter/payment-solana` | Solana payment schemes (SOL, SPL tokens).                          |
| `@faremeter/payment-evm`    | EVM payment schemes (EIP-3009 gasless USDC).                       |
| `@faremeter/wallet-*`       | Wallet adapters (keypair, private key, Crossmint, Squads, Ledger). |
| `@faremeter/facilitator`    | Run your own payment facilitator.                                  |
| `@faremeter/info`           | Network and asset lookups.                                         |
| `@faremeter/types`          | TypeScript types with runtime validation.                          |

## Next steps

<CardGroup cols={2}>
  <Card title="Why Faremeter" href="/why-faremeter">
    Design philosophy and motivation.
  </Card>

  <Card title="Quick Start" href="/quickstart">
    Make your first payment in three steps.
  </Card>

  <Card title="Concepts" href="/concepts/how-x402-works">
    Understand the x402 protocol and payment flow.
  </Card>

  <Card title="Recipes" href="/recipes/ai-agent-payments">
    Complete working examples for common use cases.
  </Card>

  <Card title="Marketplace" href="/marketplace/overview">
    Publish to or consume APIs from a multi-tenant proxy.
  </Card>
</CardGroup>
