Find a plan
GET /api/esim/plans, optionally filtered by two-letter countryCode. No auth and no side effect.
public agent contracts
Use separate public 402 entrypoints for card issuance, active-card funding, and eSIM purchase. The Base-USDC payer becomes the owner; fulfillment continues asynchronously and credentials stay owner-private.
01 · discover
| Interface | URL | Authority |
|---|---|---|
| Agent contract | /api/agent | Flows, constraints, auth and x402 headers |
| OpenAPI | /api/openapi.json | HTTP schema |
| Remote MCP | /mcp | Read-only discovery; no wallet authority |
| Card purchase | POST /api/card/purchase | Public fixed-price 402 entrypoint; payer becomes owner |
| Card contract | /api/card/discovery | Payment, economics, issuance, and credential rules |
| Card top-up | POST /api/card/topup | Public dynamic-price 402 entrypoint; active owner card required |
| Top-up contract | /api/card/topup/discovery | Limits, fee, payment, recovery, and funding rules |
| Plans | /api/esim/plans | Current public catalog and quote |
| Purchase | POST /api/esim/purchase | Public 402 entrypoint; payer becomes owner |
| eSIM contract | /api/esim/discovery | Catalog, payment, ownership and delivery rules |
| Config | /api/config | Current network, asset and availability flags |
| Readiness | /api/esim/ready | eSIM-only database, x402 and fulfillment health |
| API catalog | /.well-known/api-catalog | RFC 9727 linkset |
02 · issue card
{"idempotencyKey":"..."} to /api/card/purchase without a payment header.eip155:8453, native USDC, amount 25000000, expected payee, and resource /api/card/purchase.PAYMENT-SIGNATURE. The payer becomes the owner and issuance is queued.replayed: true.POST https://api.x402card.org/api/card/purchase # 402 POST https://api.x402card.org/api/card/purchase # same body + PAYMENT-SIGNATURE, once POST https://api.x402card.org/api/auth/challenge # owner continuation GET https://api.x402card.org/api/cards # owner bearer session
A settled purchase is not an active card. Provider issuance and platform-fee settlement are separate states.
03 · top up card
{"amountUsdCents":5000,"idempotencyKey":"..."} to /api/card/topup without a payment header.eip155:8453, native USDC, expected payee, dynamic atomic amount, and resource /api/card/topup.PAYMENT-SIGNATURE. The payer must own the active card.replayed: true.POST https://api.x402card.org/api/card/topup # 402
POST https://api.x402card.org/api/card/topup # same body + PAYMENT-SIGNATURE, once
GET https://api.x402card.org/api/orders/{orderId} # owner bearer session
Report success only when the funding job reaches funded. Retrying, funding, and operator review are not card-credit proof.
04 · buy eSIM
GET /api/esim/plans, optionally filtered by two-letter countryCode. No auth and no side effect.
POST /api/esim/purchase with the live plan id and one stable idempotency key, without a payment header. This returns 402 and does not allocate a profile.
Validate the 402 requirements, then repeat the same POST with one PAYMENT-SIGNATURE. The payer becomes the owner.
Preserve delivery.token and send it as X-Esim-Delivery-Token while polling the order until fulfilled.
GET .../credentials with the same delivery header. Response contains ICCID, QR/LPA, and installation links with Cache-Control: no-store, private.
Preserve PAYMENT-RESPONSE, order id, delivery token, terminal status, and installation response outside shared logs and public model context.
05 · continue eSIM
{"planId":"...","idempotencyKey":"..."} to /api/esim/purchase without a payment header.eip155:8453, native Base USDC, resource /api/esim/purchase, expected payee, and quoted atomic amount.PAYMENT-SIGNATURE. This is the only settlement.delivery.token. Never log, publish, index, or send the token to another user.X-Esim-Delivery-Token. If the paid response is lost, repeat only the same purchase body and idempotency key; require replayed: true.GET https://api.x402card.org/api/esim/plans?countryCode=ID
POST https://api.x402card.org/api/esim/purchase # 402
POST https://api.x402card.org/api/esim/purchase # same body + PAYMENT-SIGNATURE, once
GET https://api.x402card.org/api/esim/orders/{orderId} # X-Esim-Delivery-Token
GET https://api.x402card.org/api/esim/orders/{orderId}/credentials # same header
06 · verify
Plans are dynamic. Do not rely on examples, search snippets, cached JSON-LD, or a prior catalog response.
Use the same order and idempotency key. A verified replay returns access without settling another transfer.
Delivery token, QR, LPA and ICCID are private user artifacts. Keep them out of logs, analytics, prompts, tickets, and durable public storage.
The remote MCP intentionally has no wallet authority and does not create or pay orders. Use it to discover contracts; use an owner-controlled signer and the HTTP/x402 sequence above to purchase.