API v2 is in alpha and may change at any time. Use v1 for production.
Guides

Quickstart

You need an API key from console.gmjroaming.com and some account balance.

TerminalCode
export GMJ_KEY="your-api-key" export GMJ="https://api.gmjroaming.com/api/v1"

1. Check your account

TerminalCode
curl "$GMJ/user" -H "X-API-KEY: $GMJ_KEY" -H "Accept: application/json"

data.balance is your balance in USD.

2. Find a destination

TerminalCode
curl "$GMJ/list-country?search=japan" -H "X-API-KEY: $GMJ_KEY"
JSONCode
{ "status": "success", "code": 200, "data": [ { "country_name": "Japan", "country_code": "jp", "image": "https://gmjroaming.com/img/country/jp.svg" } ] }

Pass country_code as locationCode in the next step. Regions such as asia or europe work too.

3. Pick a package

TerminalCode
curl "$GMJ/list-esim?locationCode=jp" -H "X-API-KEY: $GMJ_KEY"

Each package has a packageCode, a name, priceUsd (your price) and volume (bytes).

4. Buy it

The body is an array. Generate your own transaction_id and store it: it's your reference for this purchase. The call waits until the eSIM is ready, so allow up to 60 seconds.

TerminalCode
curl -X POST "$GMJ/checkout" -H "X-API-KEY: $GMJ_KEY" -H "Content-Type: application/json" \ --max-time 60 \ -d '[{"packageCode":"JC016","count":1,"transaction_id":"order-20261111-0001"}]'
JSONCode
{ "status": "success", "code": 200, "message": "Checkout successful", "currency": "USD", "current_balance": "95.80", "transaction_id": "order-20261111-0001" }

5. Get the eSIM

TerminalCode
curl -X POST "$GMJ/myesim" -H "X-API-KEY: $GMJ_KEY" \ -H "Content-Type: application/json" -d '{"transaction_id":"order-20261111-0001"}'

Send your customer qrCodeUrl (a QR to scan) or publicUrl (an install page). ac is the activation code for manual entry.

Next

  • Set up webhooks to hear when your customer installs the eSIM and uses data.
  • Read Buying eSIMs for retries and top-ups.

Try read-only endpoints straight from the API reference: click Test request and paste your key. Endpoints that spend balance have the playground turned off.

Last modified on