Developers asking what x402 infrastructure they can use are often given a list of providers. That is the wrong starting point. A client SDK, server middleware, facilitator, merchant platform, wallet system, and settlement network solve different problems. They may appear in the same architecture, but they are not interchangeable products.
The useful question is: which layer is missing from your payment flow? If an AI agent cannot sign a payload, you need client and wallet infrastructure. If an API cannot return or process a 402 response, you need server middleware. If payment verification works but orders, webhooks, refunds, and reconciliation are missing, you need merchant infrastructure. If the system cannot execute the selected transfer, you need a supported settlement rail.
“x402 Infrastructure” Names Six Different Jobs
Use this six-layer map before comparing brands.
Layer | Primary job | Typical output |
|---|---|---|
Client SDK | Helps an agent or application read requirements and create a payment payload. | Signed payment request and retry logic. |
Server middleware | Protects an API or resource and handles the 402 boundary. | Payment requirement, verification hook, and gated route. |
Facilitator | Verifies payment payloads and may submit or monitor settlement. | Verification and settlement responses. |
Merchant platform | Operates the commercial lifecycle around a paid request. | Orders, balances, webhooks, credentials, receipts, refunds, and reconciliation. |
Wallet infrastructure | Controls agent assets, signing authority, policy, and spending permissions. | Authorized wallet action or blocked payment decision. |
Settlement rail | Executes the selected scheme on a specific network with a token or asset. | Onchain transaction and confirmation state. |
These layers compose. A developer can use an official SDK, a framework middleware package, a hosted facilitator, a separate wallet policy engine, and a selected network. Another team may use a full agent-commerce platform that bundles several of those capabilities. The bundle does not erase the boundaries; it only changes who operates them.
Client SDKs and Server Middleware Are Integration Tools
The client and server sides start from opposite directions.
A client SDK helps the payer:
send a request to a paid resource;
parse payment requirements from a 402 response;
select a supported scheme and network;
ask a wallet or signer to create a payload;
retry with the payment signature;
handle a settlement response or payment error.
A server middleware package helps the resource provider:
declare an amount, recipient, scheme, and network;
return a payment requirement when the request is unpaid;
validate or delegate payment verification;
pass an accepted request to the route handler;
return the resource and payment response.
The x402 reference SDKs provide both kinds of integration surface across supported languages and frameworks. This is the right choice when a team wants protocol control and already has its own API, order database, wallet integration, and operations system.
The limitation is equally important: an SDK does not automatically create a merchant ledger, customer support process, refund policy, custody architecture, or durable fulfillment record. Middleware can gate a route, but it does not know whether a downstream job produced a valid result. Treat SDKs as protocol components, not a complete payments business.
Facilitators Verify and Settle, But They Do Not Run the Sale
A facilitator sits between the resource server and the chain-specific payment mechanics. The official x402 documentation describes a facilitator as an optional but recommended service that verifies client payment payloads and settles payments on behalf of servers. It returns results to the resource server, which still decides whether to fulfill the request.
That produces a clean boundary:
A hosted facilitator can reduce the need for a seller to maintain direct blockchain connectivity and scheme-specific verification code. A self-hosted or self-facilitated path can provide more operational control but requires the team to own node access, scheme implementation, monitoring, duplicate handling, upgrades, and incident response.
Facilitator selection should therefore focus on:
supported scheme/network pairs;
verification and settlement API behavior;
production availability and operational status;
timeout and retry semantics;
confirmation policy;
duplicate settlement protection;
observability and support;
data handling and trust boundaries.
Do not choose a facilitator because you need refunds, merchant onboarding, or order analytics. Those are merchant-platform concerns unless the specific provider explicitly supplies them. A facilitator can report that a payment settled while the API still has to decide whether the service was delivered.
Merchant Platforms Operate Orders After the 402
The 402 response is a payment challenge, not a commercial operating system. A merchant platform starts where the route middleware stops.
Typical merchant responsibilities include:
merchant registration and environment configuration;
product or route pricing;
order creation and expiration;
payment status and settlement records;
API credentials and role management;
webhook registration and replay-safe processing;
balance and treasury views;
delivery or fulfillment records;
refunds, credits, and dispute workflows;
reconciliation between orders, payments, and service results.
This distinction matters for AI agent commerce because an agent may call a service once, receive an asynchronous job ID, retry after a timeout, or request a refund after a failed result. A route-level middleware package does not know how to answer those cases unless the developer adds the missing state machine.
GOAT Flow and the GOAT AgentKit merchant plugin are relevant examples of this broader category. The public AgentKit documentation distinguishes a payer-side x402 plugin with five actions from a merchant-side plugin with 30 actions covering authentication, orders, balances, webhooks, API keys, and more. That makes the merchant plugin operational infrastructure, not merely another facilitator endpoint.
The correct comparison is not “which product has the best 402 response?” It is “which product gives the seller enough order and payment state to operate the sale after the response?”
Wallet Infrastructure Controls Agent Money and Permissions
A client SDK can prepare a payment request, but a wallet system decides whether the agent is actually allowed to sign or transfer value.
Wallet infrastructure may include:
key generation and custody;
transaction signing;
token and network selection;
spending limits;
per-tool or per-merchant allowlists;
approval and confirmation rules;
balance checks;
key rotation and recovery;
audit logs;
transaction simulation or policy evaluation.
For low-risk testing, a local signer may be enough. For a production agent, putting an unrestricted private key in the same process as a language model is a poor boundary. The wallet should receive a structured payment request and enforce limits in code.
AgentKit's documented runtime provides a useful example of the control layer around wallet actions: policy gates can check network, write permissions, and risk level; idempotency can prevent repeated action execution; retry and timeout settings can be bounded; and hooks and metrics can produce an audit trail. Those capabilities are different from an x402 server middleware package, even when they appear in the same developer toolkit.
The design rule is simple: the agent can propose a payment, but policy-controlled wallet infrastructure should decide whether it may be signed. Do not treat a prompt instruction as a spending limit, and do not confuse a successful signature with a safe or completed business transaction.
Settlement Rails Determine Where Value Moves
The settlement rail is the combination of a payment scheme, network, token or asset, wallet capability, and confirmation policy.
x402 schemes can represent different payment behavior. A fixed-price exact payment is suited to a known amount per request. An upto style flow can authorize a maximum and settle usage within that cap where supported. A batch-settlement scheme can change when small payments are put onchain. These are not interchangeable merely because they use the x402 wire format.
The selected network affects:
wallet and signer compatibility;
token availability;
transaction cost;
confirmation behavior;
facilitator support;
operational tooling;
finality and reconciliation policy.
There is no universal fastest or cheapest rail for every service. A one-shot API request, a high-frequency tool, and a longer-running digital service may prefer different schemes or settlement timing. x402 documentation treats network and token support as a supported scheme/network problem, not a promise that every network works with every client or facilitator.
A settlement network is also not a merchant platform. It can execute a transfer, but it does not necessarily know that the transfer purchased research_digest call number 418, whether the output was delivered, or whether a refund is owed.
Comparison Matrix by Responsibility
Infrastructure type | What it supplies | What the developer still owns | Best fit |
|---|---|---|---|
Client SDK | Payment requirement parsing, scheme registration, payload creation, retry hooks. | Wallet security, spend policy, business request IDs, result handling. | Custom agents and applications. |
Server middleware | 402 response, route payment configuration, verification integration, payment-gated handler. | Orders, fulfillment, idempotency, refunds, merchant operations. | Existing APIs adding pay-per-use access. |
Hosted facilitator | Verification and settlement endpoints for supported scheme/network pairs. | Resource-server policy, delivery, reconciliation, facilitator dependency management. | Teams prioritizing faster integration. |
Self-hosted facilitator | Verification and settlement control within the team's infrastructure. | Nodes, scheme support, monitoring, upgrades, security, incident response. | Enterprises with specialized operational requirements. |
Merchant platform | Orders, status, balances, webhooks, credentials, receipts, reconciliation, and possible remedies. | Product behavior, service quality, custody choice, deployment-specific policy. | Sellers operating many paid resources. |
Wallet infrastructure | Keys, signing, balances, policy, limits, approvals, and audit trail. | Protocol integration, merchant logic, service execution. | Agent builders with real spending authority. |
Settlement rail | Network execution, token transfer, confirmation, and scheme-specific settlement behavior. | Wallet support, facilitator path, accounting, delivery, refund policy. | Teams choosing where value moves. |
Full agent-commerce stack | Several of the above in one developer or merchant workflow. | Configuration, integration testing, service contract, and operational ownership. | Teams building agents and paid services together. |
The matrix exposes why a provider list is insufficient. Two products may both advertise x402 support while solving different rows.
Mapping Representative Options Into the Stack
x402 reference SDKs
The reference SDKs belong primarily in the client SDK and server middleware rows. They are a good starting point for a team with an existing merchant backend and a clear preference for composing its own wallet, facilitator, order, and accounting systems.
They are not a replacement for a merchant platform. The team must build the operational records and recovery paths around them.
Hosted facilitators
Hosted facilitator services belong in the verification and settlement row. They are useful when a seller wants to avoid implementing every chain-specific verification and settlement detail. Confirm production network support, rate limits, service-level expectations, and data boundaries before relying on one for a mainnet route.
The official public facilitator is positioned for development and testnet workflows in the current x402 documentation. That should not be silently treated as a production default.
Cloudflare and edge-hosted integrations
Cloudflare's x402 material is relevant to the edge/platform category: developers can combine HTTP content, Workers-style routes, agent workflows, and MCP-related services with payment gating. This is attractive when the API already lives at the edge and the team values deployment proximity and platform integration.
It should not be assumed to provide every merchant function. Check whether the selected path supplies order management, payment records, refunds, identity, and reconciliation, or whether those remain in the application backend.
GOAT Network AgentKit and GOAT Flow
GOAT Network is most relevant when the requirement extends beyond route-level payment middleware. Its documented AgentKit surfaces include payer-side payment actions, merchant-side operations, payment status, order interactions, webhooks, API keys, and runtime controls such as policy, idempotency, retries, timeouts, output validation, metrics, and hooks.
That places GOAT across several rows: wallet/agent infrastructure, merchant operations, runtime controls, and payment workflow integration. It should not be described as identical to a hosted facilitator or as the only way to use x402. Developers should verify current SDK versions, supported assets, network configuration, API availability, and mainnet readiness for the intended deployment.
Self-hosted composition
A self-hosted stack can combine reference SDKs, custom middleware, a private facilitator or local verification, a custody system, a merchant ledger, and one or more settlement rails. This maximizes control and makes custom compliance, accounting, and delivery policies possible.
The cost is operational ownership. Every added layer becomes a system to monitor, upgrade, secure, and reconcile. Self-hosting is a choice for teams that can operate the stack, not automatically a sign of higher reliability.
Selection Rules for Common Architectures
Use these rules to choose a starting point.
You have one existing API and need pay-per-request access. Start with server middleware and a suitable facilitator. Add a client SDK only if you also control the payer or need a reference client.
You are building the agent and the seller service. Evaluate wallet infrastructure, spend policy, client SDK, server middleware, merchant order state, and settlement rail together. A facilitator alone leaves the agent and merchant control planes unresolved.
You operate many tools, products, or API routes. Prioritize merchant infrastructure: product pricing, orders, API keys, webhooks, payment status, fulfillment records, refunds, and reconciliation. Route middleware is necessary but not sufficient.
You already run at the edge or expose MCP tools. Evaluate an edge/platform integration for route and tool delivery, then verify which merchant and wallet functions remain outside the platform.
You need full control over custody, accounting, and supported networks. Compose self-hosted SDKs, middleware, wallet infrastructure, verification/settlement services, and a merchant ledger. Budget for duplicate settlement protection, upgrades, monitoring, and incident response.
You want an integrated agent-commerce workflow. Consider a broader stack such as AgentKit and GOAT Flow when payer actions, merchant operations, runtime policy, order status, and payment state belong in the same developer workflow. Validate the exact deployment rather than buying the label alone.
FAQ
What x402 infrastructure can developers use?
Developers can combine client SDKs, server middleware, facilitators, merchant platforms, wallet infrastructure, and settlement rails. The right combination depends on whether the missing capability is payment signing, 402 route protection, verification, order operations, agent spending control, or chain settlement.
Is a facilitator the same as x402 middleware?
No. Middleware exposes the payment requirement and connects the request to verification logic. A facilitator verifies payloads and may submit or monitor settlement. The resource server still decides whether to fulfill the service.
Does an x402 SDK include refunds and reconciliation?
Usually not by default. An SDK is primarily a protocol integration component. Refund eligibility, payment records, order state, service delivery, reconciliation, and dispute handling normally require merchant infrastructure or application code.
Do AI agents need separate wallet infrastructure?
They need some controlled signing and spending layer. A local signer can support a test, but production agents generally need policy checks, limits, key protection, balances, approvals, and auditability around payment actions.
How should developers choose a settlement rail?
Compare supported scheme/network pairs, token availability, cost, confirmation behavior, facilitator support, wallet compatibility, and reconciliation needs for the actual workload. Do not choose solely from a general claim that one network is fastest or cheapest.
Can one infrastructure stack cover every x402 payment layer?
GOAT Network is relevant when developers need a broader agent and merchant workflow around payments. Its documented AgentKit and GOAT Flow surfaces cover payer actions, merchant operations, order/payment status, webhooks, API keys, and runtime policy and idempotency controls. It occupies a broader stack position than a single middleware package, while deployment-specific capabilities still need verification.
Choose the Missing Layer Before the Provider
The practical answer to “what x402 infrastructure can developers use?” is not one brand. It is a composed stack.
Start with the missing responsibility: client payment, server gating, facilitator verification, merchant operations, wallet control, or settlement execution. Then select a provider or open-source component for that layer and test the boundaries between it and the next layer.
An API can return 402 and still lack order state. A facilitator can settle and still know nothing about delivery. A wallet can sign and still have no spending policy. A network can confirm and still not provide merchant reconciliation. A reliable x402 implementation makes those distinctions explicit before choosing products.

