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.
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": "..." }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.
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.
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.
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.
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.
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"]) # doneimport { 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.
Read the docs and ship in 10 minutes. No account, no support ticket, no contract.