Skip to content
Home Prices Guides FAQ Journal

How AI Agents Pay for eSIMs With x402 & Stablecoins: The Machine-Payable Connectivity Flow

An autonomous agent that can browse, call APIs, and reason still hits a wall the moment a resource costs money. x402 — the revived HTTP 402 "Payment Required" standard — is the emerging answer, and connectivity is the first thing an agent has to pay for. Here's the machine-payable flow, and how Roamzy's stablecoin + MCP purchase path maps onto it today.

Give an AI agent a browser, a shell, and a set of API keys and it can plan, code, and call tools all day. But the first time a task requires it to pay for something — an inference credit, a dataset, a proxy, a SIM — it stalls. Human payment rails assume a human: a checkout page, a card number, a 3-D Secure prompt, a login. Agents don't have any of that. The gap between "agent that can act" and "agent that can transact" is the single biggest bottleneck in agentic commerce today.

x402 is the emerging standard built to close that gap, and it does so by reviving one of the oldest unused pieces of the web: the HTTP 402 Payment Required status code. This guide explains what x402 actually is, why connectivity is the canonical first purchase for an autonomous agent, and how Roamzy's existing stablecoin + MCP flow maps cleanly onto the x402 shape today — without pretending it speaks x402 natively.

What x402 actually is

HTTP 402 was reserved in the original spec for "Payment Required" and then sat unused for over three decades because there was never an internet-native way to settle a payment inside a request. x402 — pushed by Coinbase (with Cloudflare and a growing foundation) and live at scale since 2025 — finally wires that code to real money by settling stablecoin payments directly over HTTP.

The mechanics are a request/response loop between three parties: the client (your agent), the resource server (the thing being sold), and a facilitator (a service that verifies and settles the on-chain payment so the server doesn't have to run its own chain infrastructure). The flow:

  1. The agent makes a normal HTTP request to a priced resource.
  2. The server replies 402 Payment Required with a PAYMENT-REQUIRED header carrying structured payment requirements: price, accepted token, recipient address, and network.
  3. The agent constructs a signed payment payload — typically gasless authorization via EIP-3009 for USDC, or Permit2 for other ERC-20 tokens — and retries the same request with the proof in an X-PAYMENT header.
  4. The facilitator verifies and settles; the server returns the data plus an X-PAYMENT-RESPONSE header confirming the transaction.

The whole cycle takes seconds, needs no login, and settles on-chain. x402 is blockchain-agnostic (EVM chains plus Solana and more), charges zero protocol fees, and by early 2026 had processed well over 100 million transactions on Base alone, with tens of thousands of agents actively transacting. It is no longer a thought experiment.

Why connectivity is the canonical first payment

Of all the things an agent might buy, why single out an eSIM? Because connectivity is upstream of every other purchase. Consider the dependency chain:

  • To pay for inference, a dataset, or a proxy, the agent needs a network path to reach that resource.
  • A cloud-hosted agent inherits its host's network — but an edge, robotics, drone, IoT, or field agent is defined by having to acquire its own connectivity before it can do anything else.
  • Connectivity is naturally metered and small-denomination — bytes, not subscriptions — which is precisely the shape x402 micropayments were designed for.

So the canonical machine-payable moment looks like this: agent needs data → hits a priced connectivity resource → settles a stablecoin micropayment → gets connectivity → proceeds with its real task. An agent that can pay for its own bandwidth is an agent that can bootstrap itself anywhere on Earth without a human plugging in a SIM. That is the whole promise, and it is why we think about the best eSIM for AI agents as a payments problem first and a telecom problem second.

The two halves: data budget and payment

A paying agent has to reason about two things in tandem. The first is how much data it needs and what that will cost — a planning problem covered in our agent data-usage guide. The second is how it settles that cost — the payment problem this article is about. x402 is the settlement half; a metered, per-MB connectivity product is the budget half. They only work together: an agent that knows it needs 500 MB but can't pay, or that can pay but is forced into a fixed 5 GB package, is broken in one direction or the other.

Mapping x402 onto Roamzy today

Honesty first: Roamzy does not expose a native HTTP-402 / x402 endpoint today. It does not return live 402 responses and does not speak the x402 header handshake natively. What it does do is settle in stablecoins through the NowPayments crypto processor and expose the buy flow through an MCP server and a REST API. That flow is the same primitive as x402 — a priced connectivity resource settled by a stablecoin payment with no human checkout — which makes Roamzy x402-ready in direction, not in wire format. Here is the concept-to-primitive mapping:

x402 conceptRoamzy primitive today
Priced resource with machine-readable costroamzy_estimate / GET /api/v1/estimate — project country_slug + MB into a USDT cost before committing
PAYMENT-REQUIRED header (accepted token + network)roamzy_payment_options — live list of 11 stablecoin+network combos: USDT on TRON, BSC, Polygon, Optimism, Arbitrum, and TON, plus USDC on Solana, BSC, Polygon, Optimism, and Arbitrum — each with a fee hint
Signed X-PAYMENT payload in a chosen token/chainroamzy_create_order with an explicit pay_currency (e.g. usdcsol, usdttrc20) → NowPayments settlement targeted to that exact network
Facilitator verifies & settles on-chainNowPayments processes the payment; an HMAC-verified IPN webhook confirms and credits balance
X-PAYMENT-RESPONSE confirmation → resource unlockedIPN-driven balance credit + eSIM activation; roamzy_order_status polls to confirm
Micropayment metering (bytes, not subscriptions)Per-MB metered balance: top up in stablecoin, draw down as used, no expiry

Read left-to-right, the shapes line up almost one-for-one. The difference is purely the settlement channel: x402 settles the payment inside the HTTP round-trip; Roamzy settles it alongside the MCP/REST call via the processor and confirms asynchronously over the IPN webhook. The economic primitive — agent pays stablecoin, gets metered connectivity, no login, no KYC — is identical.

What an agent actually calls

A concrete sequence for a Roamzy purchase today:

  1. roamzy_status — check purchases_paused and back off if set.
  2. roamzy_estimate — turn a data budget into an expected USDT cost (planning only; the agent doesn't pre-buy volumes).
  3. roamzy_payment_options — read the enabled stablecoin+network list (this is the analog of parsing a PAYMENT-REQUIRED header) and pick a chain, e.g. USDC on Solana for near-zero fees.
  4. roamzy_create_order with pay_currency set explicitly → settle the stablecoin payment ($20 minimum top-up).
  5. roamzy_order_status — poll until the IPN confirms and the balance is credited.

Because the balance is metered per MB and never expires, a single top-up funds many downstream tasks — the agent tops up once and draws down as it works, which is the subscription-free, pay-as-you-go pattern x402 micropayments encourage. Full request/response shapes are in the API docs and the MCP developer guide.

The failure modes to plan for

Builders moving toward machine payments should know the sharp edges. On the x402 side, the classic pathology is the retry loop: the agent gets a 402, signs, resubmits, gets another 402, and never converges — usually from clock skew in the signed validity window, a chain-ID mismatch (signing against chain X while the facilitator verifies on chain Y), or intermittent facilitator downtime. On Roamzy today the analog is subtler because settlement is asynchronous: the pitfalls are picking a pay_currency whose network the agent's wallet can't actually send on, sending below the $20 minimum, or treating the create-order response as final instead of polling roamzy_order_status for the IPN confirmation. In both worlds the discipline is the same — pin the network explicitly, respect the minimum, and confirm before proceeding.

Where this is heading

x402 turns connectivity into something an agent can buy the way it buys an API call — priced, signed, settled, done. Roamzy is built on the same economic primitive today: anonymous-first, stablecoin-settled, per-MB metered connectivity that an agent reaches through MCP or REST with no human in the loop. It isn't x402 on the wire yet, but it is x402 in spirit — and the buy flow, the token choice, and the metered balance are all live right now. See live per-MB pricing on the prices page or wire it into your agent from the AI agents hub.

FAQ

Does Roamzy support x402 natively today?

No. Roamzy does not expose an HTTP-402 endpoint, does not return live 402 responses, and does not speak the x402 header handshake. It settles in stablecoins via the NowPayments processor and exposes the buy flow over MCP and REST. That flow is the same economic shape as x402 — priced connectivity, stablecoin settlement, no login — which makes it x402-ready in direction, not in wire format.

Which stablecoins and networks can an agent pay with?

Eleven combinations are live: USDT on TRON, BSC, Polygon, Optimism, Arbitrum, and TON, and USDC on Solana, BSC, Polygon, Optimism, and Arbitrum. Call roamzy_payment_options for the current list with per-network fee hints, then pass the matching code as pay_currency. USDC on Solana is near-zero fee; USDT on TRON has the widest wallet support.

Does the agent need an account or KYC to pay?

No. Roamzy is anonymous-first — an agent can estimate, order, and pay in stablecoin without registering an account or passing KYC. This is the same login-less property that makes x402 attractive for autonomous agents.

How does the metered per-MB balance work with micropayments?

The agent tops up a USDT/USDC balance (minimum $20) once, then draws it down per actual MB used, with no expiry. It does not pre-buy fixed data packages. This matches the x402 micropayment model — small, usage-based settlement rather than a fixed subscription — and lets a single top-up fund many downstream tasks. See the data-usage guide for budgeting the consumption half.