For resellers & developers

The eSIM API for resellers, agencies & apps

Sell prepaid travel eSIMs for 190+ destinations under your own brand. A REST API with instant delivery, live usage per ICCID, sandbox keys and wallet billing.

What you can do with the API

Full plan catalog

Fetch every travel plan with your own B2B pricing, coverage and validity.

Instant order delivery

Place an order and receive the QR code / LPA activation string in seconds.

Live usage per ICCID

Check line status, activation date, data used and expiry for any eSIM you sold.

Sandbox environment

Build and test with mega_test_ keys — no wallet or real eSIM is consumed.

Wallet billing

Prepaid wallet, no per-call fees. Top up by card (Stripe) or bank (Wise).

Webhooks

Get notified on order events so you can automate your own fulfilment.

WordPress & WooCommerce

WordPress shop? Install the plugin and start selling eSIMs.

Official WooCommerce plugin: sync the catalog, your customers pay you, and on payment the eSIM is ordered automatically from your MegaEsim wallet. QR / LPA / ICCID are emailed to the buyer. The API key stays server-side — never in the public frontend.

  1. Download the zip and upload it in WordPress → Plugins → Add New.
  2. WooCommerce → MegaEsim eSIM → paste your key (mega_test_ for sandbox, mega_live_ for live sales).
  3. Test connection, then Sync catalog. Set your retail markup.

Partner API v1 documentation

Public REST API reference. Create a partner account to get your live and sandbox API keys, then use the examples below.

Base URL — browser

https://megaesim.us/api/v1

Manual tests or calls from an authenticated browser session.

Base URL — server

https://api.megaesim.us/api/v1

Recommended for backends (Render, Node, Python) — bypasses Cloudflare bot challenges.

Authentication: Authorization: Bearer mega_live_…

Endpoints

MethodPathDescription
GET/meVerify the key and return account info
GET/plansPlan catalog (B2B pricing per account)
GET/plans/{id}Plan details
GET/walletWallet balance + recent transactions
GET/ordersOrder list (?limit=25, max 100)
POST/ordersPlace an order (debits wallet)
GET/orders/{id}Order status
GET/orders/{id}/esimeSIM data after delivery (QR, LPA, ICCID)
GET/esims/{iccid}/usageLive usage per ICCID (activation, data, expiry)
Verify key — GET /me

Response 200: ok, accountEmail, apiKeyName, apiKeyId.

Request

GET https://megaesim.us/api/v1/me
Authorization: Bearer mega_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Catalog — GET /plans

Returns plans[]: id, name, nameEn, dataDescription, coverage, priceEuro, priceCents, validityDays, carrier, hasInstantDelivery, available, outOfStock.

Request

GET https://megaesim.us/api/v1/plans
Authorization: Bearer mega_live_…
Wallet — GET /wallet

Returns balanceCents, currency, and transactions[]. There is no top-up endpoint in the API — fund the wallet in the portal: card (Stripe, with fee) or Wise (any amount from €30, no fee, credit 1:1).

Request

GET https://megaesim.us/api/v1/wallet
Authorization: Bearer mega_live_…
Place order — POST /orders

Response: orderId, amountCents, fulfillmentStatus, autoDelivered, autoRefunded, manualPending, emailSent, esimId (if auto-delivered).

Poll status: GET /orders/{id} — same order object as in the list.

FieldRequiredDescription
planIdyesPlan ID from /plans
deliveryEmailnoEnd-customer email; omit = your account
customerNotenoInternal note (max 500 chars)
idempotencyKeyrecommendedSame key → same order

Request

POST https://megaesim.us/api/v1/orders
Authorization: Bearer mega_live_…
Content-Type: application/json

{
  "planId": 42,
  "deliveryEmail": "[email protected]",
  "customerNote": "Internal ref #12345",
  "idempotencyKey": "your-unique-key-2026-001"
}
Poll eSIM — GET /orders/{id}/esim

After delivery: esim with iccid, activationCode, qrCodeData, smdpAddress, deliveredAt.

If not ready yet: 404 with code esim_not_ready.

Request

GET https://megaesim.us/api/v1/orders/123456/esim
Authorization: Bearer mega_live_…
Live usage — GET /esims/{iccid}/usage

Look up usage and line status using the ICCID returned by /orders/{id}/esim.

200 response → usage object: iccid, supported, status (active | inactive | paused | expired | unknown), dataPlanStatus, dataUsedMb, activatedAt, orderedAt, expiresAt, expiryKind (data_ends | install_by | after_activation), planValidityDays, dailyResetAt, refreshedAt.

Data is cached ~3 minutes per eSIM. Add ?refresh=1 for a live read (use sparingly).

Usage fields are available only for eSIMs on networks that report consumption; otherwise supported:false and usage fields are null. Remaining data is not exposed — only dataUsedMb (total).

Unknown ICCID on your account → 404 esim_not_found. Usage provider temporarily down → 503 usage_upstream_unavailable.

Request

GET https://megaesim.us/api/v1/esims/8939104610004735215/usage
Authorization: Bearer mega_live_…

Common errors

  • 401Invalid key, revoked key, or API access disabled
  • 402 · insufficient_balanceInsufficient wallet balance
  • 404 · plan_not_foundPlan not found
  • 404 · esim_not_readyeSIM not delivered yet
  • 404 · esim_not_foundNo eSIM with that ICCID on your account
  • 409 · out_of_stockPlan unavailable
  • 429Rate limit exceeded (see below)
  • 503 · usage_upstream_unavailableUsage provider temporarily unavailable

Rate limits (per API key)

Reads (GET): 120 / minute · Orders (POST /orders): 30 / minute. When exceeded: HTTP 429 + retryAfterSec.

Security

  • Keep the key server-side only — never expose it in a public frontend.
  • Use idempotencyKey on every order (retry-safe).
  • Revoke compromised keys immediately in the section above.
  • Responses do not expose internal provisioning details.

Recommended flow

  1. GET /plans — show the catalog with your B2B prices.
  2. GET /wallet — check balance before ordering.
  3. POST /orders with idempotencyKey — place the order.
  4. If autoDelivered: false, poll GET /orders/{id} until fulfillmentStatus = delivered.
  5. GET /orders/{id}/esim — fetch QR / LPA / ICCID for the customer.
  6. GET /esims/{iccid}/usage — check line usage, activation and expiry anytime.

Support: Technical or commercial questions: [email protected]

Ready to integrate?

Create a partner account and get a sandbox key instantly to start testing.

Technical or commercial questions: [email protected]

eSIM API for Resellers & Travel Agencies — MegaEsim Partner API · MegaEsim