HTTP/402 · x402 PROTOCOL · USDC · USDT

402 Payment Required.
eSIM data for the agent web.

Buy travel mobile data with one HTTP request. No account, no API key, no human in the loop. Pay on-chain in USDC or USDT, get the eSIM QR back in seconds. Built for AI agents, autonomous bots, and short-lived workflows that need connectivity on demand.

One request. One payment. One eSIM.
$ curl
curl -X POST https://api.esimahora.com/api/v1/x402/order \
  -H "Content-Type: application/json" \
  -d '{"country":"JP","plan":"5GB-30D"}'

# 402 Payment Required
# x-payto: 0x742d35cc6634c053... usdc polygon
# x-amount: 6.21
# x-expires: 2026-05-15T14:30:00Z

# After your wallet pays:
curl https://api.esimahora.com/api/v1/x402/order/abc123
# 200 OK
# { "iccid": "...", "qr_code_data": "LPA:1$...", "qr_image_url": "..." }
$0.55 minimum order · USDC/USDT on Polygon or TON · 5-10 sec settlement
WHAT IS x402

An HTTP status code that pays itself.

HTTP 402 was reserved in 1997 for "Payment Required" — and stayed unused for 28 years. The x402 protocol finally fills it: when you call an API that costs money, the server replies with 402 + the payment details (recipient address, amount, chain, expiry). Your client pays on-chain, retries the request, and gets the resource.

Why this matters for eSIM data: a travel eSIM is a perfect API-payable resource — small ($0.55-$50), stateless, instantly delivered as a QR code. We expose the entire eSIM Ahora catalog (179 countries, 2,500+ plans) over x402 so any program — AI agent, autonomous service, IoT device — can buy connectivity without registering an account, holding a card, or even running interactive code.

USE CASES

Who buys eSIMs without a human?

AI / LLM agent

AI travel agents

A trip-planning agent books a flight + hotel and needs to pre-provision data for the device that will receive the boarding pass. The agent calls our API, pays from its budget wallet, attaches the QR to the trip artifact.

Autonomous infra

Autonomous trading bots

A surveillance / monitoring bot deployed on a VPS in a different region needs failover connectivity over a USB modem. It buys an emergency local eSIM the moment its primary link degrades.

IoT / unattended

On-demand kiosks / IoT

A vending kiosk crosses borders inside a shipping container, hits a region with no network, and self-purchases the local data plan. No truck driver action, no central ops console.

Privacy / pseudonymous

No-account workflows

A privacy-focused user wants travel data without leaving an account history with a connectivity company. x402 means the only record is an on-chain payment to a contract address.

QUICKSTART

Three idioms.

Python (httpx + any x402 wallet)
python
import httpx
from your_wallet import sign_and_pay  # any x402-compatible wallet

# 1. Request the eSIM (no auth, no account)
r = httpx.post("https://api.esimahora.com/api/v1/x402/order",
               json={"country": "JP", "plan": "5GB-30D"})
assert r.status_code == 402

# 2. Pay the on-chain invoice (your wallet's job)
sign_and_pay(
    to=r.headers["x-payto"],
    amount=r.headers["x-amount"],
    chain="polygon",
)

# 3. Poll until ready (~5-10 sec on Polygon)
while True:
    r = httpx.get(f"https://api.esimahora.com/api/v1/x402/order/{order_id}")
    if r.status_code == 200:
        esim = r.json()
        break
    time.sleep(2)

print(esim["qr_image_url"])  # done
Node.js (Coinbase fetch402)
javascript
import { fetch402 } from '@coinbase/x402-fetch';

const esim = await fetch402('https://api.esimahora.com/api/v1/x402/order', {
  method: 'POST',
  body: JSON.stringify({ country: 'JP', plan: '5GB-30D' }),
});
// fetch402 transparently handles the 402 → wallet pay → retry loop

console.log(esim.qr_image_url);

No SDK to install. The protocol is just HTTP. Any client that can read response headers and sign a transaction works. We test against the Coinbase x402 reference clients in Python, Node, and Go — but the wire format is open and minimal.

PRICING

Pay-per-call. No commitment.

PER ORDER
$0.55 – $50
Same pricing as the consumer site (eSIM Ahora). 1GB Turkey: $0.72. 5GB Japan/30d: $6.21. 10GB Europe-30: $14. Full catalog of 2,500+ plans.
CHAINS
USDC · USDT
Polygon (5-10 sec, $0.001 gas). TON (3-5 sec, $0.005 gas). No bridges, no wrapped tokens. We accept native stablecoins on the chain you specify.
No subscription. No per-API-key fee. No volume tiers (yet — high-volume customers can email us for a wholesale discount: see Contact).

$ curl -X POST /order

Read the docs and ship in 10 minutes. No account, no support ticket, no contract.