402 Payment Required standard, with support for MPP (Machine Payments Protocol) via an x402v2 adapter.
Not a developer?
Faremeter is a reference implementation of the x402 protocol — 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:- A program requests data from a server.
- The server says “that costs $0.01” (HTTP 402 response).
- The program signs a payment using its wallet — no human involved.
- The program retries the request with the payment attached.
- A facilitator verifies the payment and settles it on a blockchain.
- The server delivers the data.
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
Why Faremeter
Design philosophy and motivation.
Quick Start
Make your first payment in three steps.
Concepts
Understand the x402 protocol and payment flow.
Recipes
Complete working examples for common use cases.