A payment scheme defines how a payment is made on a specific blockchain. Schemes handle the chain-specific details: constructing transactions, signing them, and producing the proof that gets sent in theDocumentation Index
Fetch the complete documentation index at: https://docs.faremeter.xyz/llms.txt
Use this file to discover all available pages before exploring further.
X-PAYMENT header (v1) or PAYMENT-SIGNATURE header (v2).
Scheme identification
Every payment is identified by a tuple of three values:| Field | Example | Description |
|---|---|---|
scheme | "exact" | The payment method |
network | "solana-devnet" | The blockchain network |
asset | "USDC" | The token being used |
Solana schemes
SPL Token payments
The primary Solana scheme uses SPL token transfers for payments. The client signs a transaction transferring tokens from their wallet to the merchant’s address.Native SOL
Faremeter also supports native SOL transfers for Solana payments.Flex (prepaid escrow)
The@faremeter/flex scheme replaces per-request transactions with a prepaid escrow account and off-chain authorizations signed by a session key. The facilitator settles actual usage on-chain in batches after the work is done. This decouples service delivery from on-chain confirmation and is the right fit for variable-cost or high-frequency workloads (AI inference, streaming, metered APIs).
EVM schemes
EIP-3009 gasless transfers
The EVM scheme uses EIP-3009transferWithAuthorization for gasless USDC payments. The client signs an EIP-712 typed message authorizing the transfer. The facilitator submits the transaction on-chain and pays the gas fees.
How schemes compose
Faremeter’s plugin architecture allows multiple schemes to coexist. A server can accept both Solana and EVM payments simultaneously:Adding new schemes
New payment schemes can be added through the payment handler interface. See Plugins for community-contributed schemes.Further reading
- Wallets & Signing — How wallets interact with payment schemes.
- Networks & Assets — Supported networks and tokens.