Demo mode: a reference storefront for eSIM operators. Prices are live, payments are off. Run your own operator →
Travel eSIM · demo
English

eSIM operator kit

Contents

🌐 English · Русский · Español · Français · 中文

Sell eSIMs to AI agents

AI agents book flights and hotels; the next thing a traveller needs is mobile data on arrival. On the AIMarket rails an agent finds an eSIM seller through a hub, gets a signed quote, pays one x402 payment in USDC and receives the activation code: no account, no API key, no checkout page.

This kit makes your eSIM business one of those sellers. It is a reference in both senses:

Try it now: the demo node answers agents at https://modelmarket.dev/providers/esim, and the demo storefront runs at esim-shop.modelmarket.dev. Neither sells anything.

Where it sits in the ecosystem

flowchart LR
  subgraph agents["AI agents"]
    A1["Travel agent<br/>MCP client"]
    A2["Your app's backend"]
  end
  subgraph fed["AIMarket federation"]
    HUB["Hub · modelmarket.dev<br/>market_search · market_invoke"]
    HUB2["Other hubs"]
  end
  subgraph kit["Your eSIM operator — this kit"]
    NODE["Seller node /agents<br/>esim.quote · esim.order · esim.status"]
    FED["Federation node<br/>/.well-known/ai-market.json"]
    STORE["Storefront /<br/>people, 5 languages"]
  end
  subgraph you["Your business"]
    SUP["Supplier<br/>eSIM Access · Airalo · eSIM Go<br/>or your own system"]
    CRM["CRM · billing · accounting<br/>(webhooks)"]
    W["Your wallets<br/>Base · Tron · TON · Solana · EVM"]
  end
  A1 -->|search| HUB
  HUB <-->|federation| HUB2
  HUB -->|admits, lists| FED
  FED --- NODE
  A1 -->|quote, then order over x402| NODE
  A2 -->|same API| NODE
  STORE --> SUP
  NODE --> SUP
  NODE -.->|events| CRM
  STORE -.->|events| CRM
  A1 -.->|USDC| W
  STORE -.->|buyers pay| W

The hub routes discovery, never money: an agent pays your node directly, and hubs take no fee on those direct sales.

Who it is for

You areYou useStart here
An existing eSIM operator, MVNO or resellerYour supplier account (eSIM Access, Airalo, eSIM Go) or your own systems behind five HTTP endpoints or the SDK; webhooks into your CRM and billing; your price list as a CSV; your own storefront staysOnboarding · Integrations · SDK
A new operatorThe whole kit with a wholesale account (eSIM Access, Airalo or eSIM Go): agent node, federation node, storefront, HTTPSOperator guide
An agent developerThe esim.*@v1 API of any seller: quote, buy over x402, check usageAgent guide

Ready integrations

Where the eSIMs come fromWhere the news of each sale goes
eSIM Access✅ live-testedCRM, billing, accounting (signed webhooks)✅
Airalo Partner API🟡 built to the published APITelegram, Slack (relay included)✅
eSIM Go API v2.5🟡 built to the published APIGoogle Sheets (Apps Script included)🟡
Your own system: 5 HTTP endpoints, any language✅n8n, Make, Zapier, HubSpot, Salesforce📘 recipes
Anything else: the SDK's supplier interface✅Your own app or storefront: the agent API✅

Setup for each, step by step: Integrations.

How an agent buys

sequenceDiagram
  autonumber
  participant Ag as AI agent
  participant Hub as AIMarket hub
  participant N as Your seller node
  participant S as Your supplier
  participant B as Base (USDC)
  Ag->>Hub: market_search "eSIM for Japan, 5 GB"
  Hub-->>Ag: esim.quote@v1 at your node (and other sellers)
  Ag->>N: POST /agents/quote {country: JP, min_gb: 5}
  N-->>Ag: offers, cheapest first, signed (Ed25519)
  Ag->>N: POST /agents/order {offer_id}
  N-->>Ag: 402 Payment Required (x402: USDC on Base, the price, your address)
  Ag->>N: the same request with a signed USDC authorization
  N->>S: order (idempotent by the payment)
  S-->>N: the profile
  N->>B: settle the payment
  N-->>Ag: activation code, QR, install link, status token

The payment settles only after the eSIM exists. A refused order costs nothing; the same payment sent twice gets the same eSIM; an uncertain settlement retains the profile for reconciliation.

How an existing operator plugs in

flowchart TB
  Q{"What do you have?"}
  Q -->|"an account at eSIM Access,<br/>Airalo or eSIM Go"| A2["A · The whole kit<br/>SUPPLIER: esimaccess, airalo or esimgo"]
  Q -->|"a provisioning system, an inventory of profiles,<br/>or a supplier the kit does not know"| B["B · HTTP supplier<br/>implement 5 endpoints in your stack"]
  Q -->|"a Node.js platform"| C["C · SDK<br/>@aimarket/esim-rails in your code"]
  Q -->|"your own agent API already,<br/>in any language"| D["D · The contract<br/>esim.*@v1 + conformance check"]
  B --> R["The kit: agent node, federation node,<br/>payments, optional storefront"]
  C --> R2["Your service, with createNode()"]
  D --> R3["esim-rails check https://you/agents"]
  A2 --> R
  R --> F["aimarket node knock → listed on hubs"]
  R2 --> F
  R3 --> F
PathYou buildThe kit gives you
A whole kitnothing: ./onboard.sheverything below, on eSIM Access, Airalo or eSIM Go
B HTTP supplierGET /catalog, POST /orders, GET /profiles, POST /profiles/{id}/cancel, GET /balance (spec)agent node, x402, ten payment networks, storefront, federation, webhooks
C SDKa supplier object in your Node.js codecreateNode() with signing, x402, idempotent orders, schemas
D contractesim.quote@v1, esim.order@v1, esim.status@v1 in your own stackJSON Schemas and esim-rails check, then the federation node

Every path ends the same way: your node announces itself to an AIMarket hub, passes its admission check, and agents searching the federation see your offers. Order and payment events reach your CRM, billing or accounting through signed webhooks.

What is in the box

PartWhat it does
Seller node for agents (rails/)esim.quote and esim.status, free and signed; esim.order paid over x402 in USDC on Base, settled only after delivery
SDK @aimarket/esim-rails (rails/)createNode, the supplier interface and adapters (eSIM Access, Airalo, eSIM Go, HTTP), webhooks, schemas, esim-rails check
Contract (rails/spec/)JSON Schemas of esim.*@v1, the HTTP supplier and webhook events
Federation node (node/)aimarket node: your capabilities on AIMarket hubs, signed with your node's key
Storefront (store/)a page per country in five languages; USDC and USDT on Base, Ethereum, Arbitrum, OP, Polygon, BNB Chain and Avalanche; USDT on Tron; USDC on Solana; USDT and TON on TON; cards through Stripe if you add it
Price list (config/)your retail prices over the margin: fixed per plan or per country and size, a margin per country or region, plans turned off; esim-rails prices checks a list
Webhooksorder.* and agent_order.* events, HMAC-signed, for your own systems
HTTPS (Caddyfile)Caddy on 80 and 443, Let's Encrypt

Quick start

The whole kit (path A):

git clone https://github.com/alexar76/esim-operator-kit.git && cd esim-operator-kit
./onboard.sh            # asks for the domain, store name and keys; demo mode; joins the federation
./onboard.sh --hub      # the same with your own hub

The SDK in your own Node.js service (path C):

import { createNode, httpSupplier, createWebhooks, ed25519Signer } from "@aimarket/esim-rails";

const node = createNode({
  supplier: httpSupplier({ url: "https://ops.example.com/esim", secret: process.env.SUPPLIER_SECRET }),
  events: createWebhooks({ url: "https://crm.example.com/hooks/esim", secret: process.env.WEBHOOK_SECRET }),
  signer: ed25519Signer(process.env.PROVIDER_KEY_PEM), secret: process.env.STATUS_SECRET,
  store: myOrderStore, publicUrl: "https://esim.example.com/agents", paywall: await myX402Paywall(),
});
node.app.listen(9490);

Check any seller node against the contract (path D):

node rails/bin/esim-rails.mjs check https://esim.example.com/agents --country JP

Documents

EnglishРусскийEspañolFrançais中文
Onboarding, use cases and interactionrailsrailsrailsrailsrails
Integrationsintegrationsintegrationsintegrationsintegrationsintegrations
SDK referencesdksdksdksdksdk
Operator guideoperatoroperatoroperatoroperatoroperator
Agent guideagentsagentsagentsagentsagents
Cases: agents buy and get refunds, and the hub counts confirmed deliveries, with transactionscasescasescasescasescases
Your own hub: in the federation on your own termsown hubown hubown hubown hubown hub

Rendered, with diagrams: esim.modelmarket.dev/kit. Specs: HTTP supplier · JSON Schemas · secrets/README.md.

Money, keys and data

Security policy: SECURITY.md. Contributing: CONTRIBUTING.md. Changes: CHANGELOG.md.

Ecosystem

ProjectRelation to the kit
AIMarket hub · modelmarket.devFederation and discovery: agents search it, your node announces to it (aimarket node, PyPI aimarket-hub)
x402 · Coinbase Developer PlatformThe agent payment: USDC on Base, settled by the CDP facilitator
eSIM Access · Airalo · eSIM GoBuilt-in suppliers; any other through the HTTP supplier or the SDK
Free toolsx402 check, MCP scans: the same rails, for developers

Tests

cd rails && npm ci && npm test      # node, SDK, suppliers, price lists, webhooks, schemas, conformance check
cd ../store && npm ci && npm test   # storefront, ten networks, pages, the /kit docs

No network and no keys needed. A live test order against eSIM Access (2026-10-14) bought, read and cancelled a profile through this code; the same payment sent twice found the same profile. A real agent purchase over x402 on a private test node was delivered and settled on Base (0.31 USDC, transaction 0xe61f…0982); paid from the seller's own wallet, it was refused with self_send_not_allowed.

License

MIT — see LICENSE.

The kit on GitHub →