Payment Flow
Meterflow separates payment movement from payment operations. Solana moves value; Meterflow explains what happened, who paid, what was served, what failed, which provider earned, and whether the agent stayed inside policy.
A provider registers a route, unit, price, accepted asset, recipient wallet, and customer policy.
A caller receives machine-readable payment terms for the requested capability.
The agent or operator submits a Solana payment and retries with proof.
Meterflow verifies policy, records request state, attributes revenue, and exposes an audit trail.
Protocol Adapter
Meterflow supports x402 and MPP as payment rails over the same product model. The control plane is intentionally protocol-neutral so future HTTP 402-style rails can normalize into the same Meterflow objects: meter, budget decision, receipt, provider revenue row, webhook event, and registry signal.
Machine-readable 402 quotes, Solana USDC settlement context, retry with proof, and receipt updates after verification.
Challenge, credential, and payment receipt headers for opt-in callers without changing provider meters or dashboards.
Every rail writes to the same receipt graph with payer, provider, route, amount, policy, response, latency, and settlement metadata.
Agent spend caps should apply before any supported rail can spend against a protected route or MCP tool.
MPP Payment Rail
MPP is an open machine-to-machine payment protocol for charging API requests, tool calls, or content in the same HTTP flow. Meterflow mounts MPP beside x402 so a provider can keep one meter while callers choose the payment rail they support.
Callers request MPP with `X-Meterflow-Payment-Protocol: mpp`, `Accept-Payment: mpp`, `paymentProtocol=mpp`, or an `Authorization: Payment` retry.
The current adapter uses the Solana MPP method with a one-time `charge` intent and USDC-denominated route prices.
Verified calls return `Payment-Receipt` and write `paymentProtocol`, `paymentIntent`, `paymentMethod`, and `paymentReference` into the Meterflow ledger.
x402 remains the default unless a caller opts into MPP or `METERFLOW_DEFAULT_PAYMENT_PROTOCOL=mpp` is configured.
Required production config: `MPP_SECRET_KEY`, `MPP_PAY_TO` or `X402_PAY_TO`, and a Solana RPC URL through `MPP_SOLANA_RPC_URL` or `HELIUS_RPC_URL`.
Dashboard
The dashboard is the product surface. It is where providers manage metered products and where agent operators control spend before autonomous workflows run.
- MetersDefine the route, billing unit, price, asset, provider, owner wallet, and route status.
- ReceiptsVisualize successful and failed paid requests with payer wallet, proof, amount, route, and response status.
- Agent BudgetsAttach limits to a wallet, client key, task, route allowlist, and expiration window.
- MCP ToolsPackage, price, meter, and monitor MCP tools through hosted gateway paths.
- Provider RegistryExpose useful endpoints with price, uptime, latency, receipt volume, and utility-driven ranking signals.
- Settlement WalletInspect wallet context for provider funding, settlement operations, and gateway costs.
Meters
A meter describes what is billable. Meterflow treats hosted APIs, MCP tools, data feeds, and provider workflows as products that share one accounting model.
Wrap Your API In 10 Minutes
Hosted gateway meters let providers keep their API on their own infrastructure while Meterflow handles payment requirements, budget checks, receipts, failed-payment state, revenue views, and webhook events.
If `route` is omitted, Meterflow generates `/gateway/{meterId}/*`. Callers use `https://meterflow.fun/proxy/gateway/{meterId}/path`. Upstream auth can be attached to the meter, but secret values are never returned by the API.
Receipts
Receipts connect payment proof to usage. They are the difference between “money moved” and “this route was served to this agent under this policy.” Wallet-authenticated users can see API-key receipts and x402 receipts paid by their wallet.
Agent Budgets
Agent budgets let operators approve bounded spend without handing automation unlimited wallet access.
MCP Tools
MCP tools are treated as meters, so budgets, receipts, revenue views, settlement metadata, registry metadata, and exports work the same way as API routes. The built-in token-risk tool is a demo; builders can package their own tools.
Provider Registry
The registry is the distribution layer for paid agent services. A listed provider should be discoverable by route, category, price, protocol support, latency, receipt volume, uptime, and verification status.
Registry ranking is one of the cleanest MFLOW utility surfaces: holders and bonded providers can unlock verification, fee relief, better listing controls, higher route limits, and longer receipt retention without changing USDC settlement.
MFLOW Utility
USDC is the payment asset for request settlement. MFLOW is the utility layer for provider verification, fee relief, registry ranking, higher policy limits, longer receipt retention, premium analytics, and future provider bonding. Non-holders can still use paid Meterflow routes, but their quotes include a protocol fee. Holders can receive reduced or zero protocol fees depending on the configured utility tier.
- Provider ReputationMFLOW-backed providers can receive dashboard badges and registry preference.
- Non-Holder FeeMetered quotes and receipts track base price, protocol fee, and total USDC amount.
- Control LimitsUtility tiers can increase meter counts, budget counts, webhook volume, and receipt retention.
- Future BondingProvider bonding is represented in the product model but does not require staking contracts in the current MVP.
Meterflow Routes
Meterflow routes are priced product surfaces. The built-in token-risk tool demonstrates the MCP pattern; hosted gateway routes are how providers wrap their own APIs without moving infrastructure into Meterflow.
| Route | Category | Use |
|---|---|---|
| /mcp/token-risk | MCP Tool | Built-in paid tool call with budget checks and receipts |
| /gateway/{meterId}/* | Hosted API | Provider-owned endpoint wrapped with pricing, payment, and accounting |
| /v1/meters | Control Plane | Create, test, and manage billable product surfaces |
| /v1/receipts | Ledger | Inspect paid request proof, payer, amount, policy, and response status |
| /v1/providers/revenue | Provider Revenue | Roll up calls and estimated earnings by meter |
Authentication
Operators connect a Solana wallet to create and manage client keys. Registration uses a server-issued nonce so wallet signatures cannot be replayed.
Use the returned key as a bearer token.
Provider Revenue And Webhooks
Providers can query revenue by meter and subscribe to signed webhook events for receipt creation, verified settlement, payment failure, and budget exhaustion.
Gateway API
The gateway exposes Meterflow-native routes for provider onboarding, hosted route testing, receipt inspection, and paid request delivery.
SDK
The JavaScript SDK wraps the control-plane routes for hosted meters, receipts, budgets, MCP tools, revenue views, and webhooks.
Settlement
Meterflow is designed around USDC-denominated request accounting on Solana. The dashboard treats the wallet as the source of identity, funding, budget approval, and settlement context.
- Provider walletReceives revenue for the metered route.
- Operator walletControls keys, budgets, and revocation for agents.
- Agent client keyIdentifies the automated caller and applies policy before spend.
- Receipt ledgerLinks quote, proof, response, amount, route, and payer into one searchable record.