Introduction

Welcome to the Mobilexy - eSIM API documentation.


This API allows you to integrate eSIM purchasing and management capabilities directly into your application. You can retrieve coverage information, view plans, check your balance, and purchase eSIMs programmatically.

All responses are returned in JSON format. The API accepts both GET and POST requests depending on the endpoint.

Authentication

Authenticating your API requests.


Most endpoints require authentication using your API Key. You can find your API Key in your dashboard explicitly. Include the api_key parameter in your request body or query string for authenticated endpoints.

Machine-readable specification (OpenAPI 3.1): openapi.yaml · openapi.json

List Countries

Retrieve a list of all supported countries.


Endpoint: https://www.mobilexy.com/api/coverage/countries

Method: GET

Response Parameters
Name Type Description
countries array List of country objects
countries[].name string Country name
countries[].slug string Country identifier slug
countries[].image string Country flag image URL
countries[].converted_price string Starting price for plans
Response

{
    "remark": "countries",
    "status": "success",
    "message": ["Countries List"],
    "data": {
        "countries": [
            {
                "name": "Afghanistan",
                "slug": "afghanistan",
                "image": null,
                "converted_price": "8.12000000"
            },
            {
                "name": "Aland Islands",
                "slug": "aland-islands",
                "image": null,
                "converted_price": "6.14000000"
            }
        ]
    }
}

List Regions

Retrieve a list of all supported regions.


Endpoint: https://www.mobilexy.com/api/coverage/regions

Method: GET

Response Parameters
Name Type Description
regions array List of region objects
regions[].name string Region name
regions[].slug string Region identifier slug
regions[].plan_count integer Number of available plans
Response
{
    "remark": "regions",
    "status": "success",
    "message": ["Regions List"],
    "data": {
        "regions": [
            {
                "name": "Africa (AF-29)",
                "slug": "africa-af-29",
                "image": null,
                "plan_count": 3
            },
            {
                "name": "Asia (AS-12)",
                "slug": "asia-as-12",
                "image": null,
                "plan_count": 10
            }
        ]
    }
}

Country Plans

Get plans for a specific country.


Endpoint: https://www.mobilexy.com/api/country-plans/{slug}

Method: GET

Replace {slug} with the country slug (e.g., afghanistan).

Response Parameters
Name Type Description
plans array List of plan objects
plans[].id integer Plan ID
plans[].name string Plan name
plans[].period integer Validity period in days
plans[].data_volume integer Data amount in bytes (-1 for unlimited)
plans[].converted_price string Price of the plan
Response
{
    "remark": "country_plan",
    "status": "success",
    "message": ["Afghanistan eSIM Plans"],
    "data": {
        "plans": [
            {
                "id": 855,
                "slug": "AF_0.5_Daily",
                "name": "Afghanistan 500MB/Day",
                "period": 1,
                "package_type": "DATA",
                "data_volume": -1,
                "voice_quantity": "0.00",
                "sms_quantity": 0,
                "fup_policy_text": "500MB high-speed/day, 512 Kbps after limit, resets daily",
                "phone_number": 0,
                "operator_name": "Etisalat",
                "operator_slug": null,
                "network_speed": "3G",
                "area_coverage": "local",
                "status": 1,
                "converted_price": "8.12000000",
                "currency": null
                "packageCode": "CKH226"
            },
        ],
        "flag": "url_to_flag_image",
        "flagCode": "US"
    }
}

Region Plans

Get plans for a specific region.


Endpoint: https://www.mobilexy.com/api/region-plans/{slug}

Method: GET

Replace {slug} with the region slug (e.g., europe).

Response Parameters
Name Type Description
plans array List of plan objects
plans[].countries array List of countries included in the region
plans[].countries[].name string Country name
Response
{
    "remark": "region_plan",
    "status": "success",
    "message": ["Asia (AS-12) eSIM Plans"],
    "data": {
        "plans": [
            {
                "id": 855,
                "slug": "AS-12_0.5_Daily",
                "name": "Asia (12 areas) 500MB/Day",
                "period": 1,
                "package_type": "DATA",
                "data_volume": -1,
                "voice_quantity": "0.00",
                "sms_quantity": 0,
                "fup_policy_text": "500MB high-speed/day, 128 Kbps after limit, resets daily",
                "operator_name": "Metfone, China Unicom, csl, Telkomsel, KDDI/au, CTM, CelcomDigi, Maxis, SingTel, SKTelecom, LG U+, Chunghwa, DTAC, TrueMove H, MobiFone, Viettel Mobile, Vietnamobile",
                "operator_slug": null,
                "network_speed": "3G/4G",
                "area_coverage": "continental",
                "status": 1,
                "converted_price": "7.28000000",
                "currency": null,
                "packageCode": "CKH226"
                "countries": [
                    {
                        "name": "Hong Kong (China)",
                        "slug": "hong-kong-china",
                        "image": null
                    },
                    {
                        "name": "Macao (China)",
                        "slug": "macao-china",
                        "image": null
                    },
                ]
            }
        ],
        "flag": "url_to_image"
    }
}

Global Plans

Get global eSIM plans.


Endpoint: https://www.mobilexy.com/api/global-plans

Method: GET

Response Parameters
Name Type Description
plans array List of global plan objects
plans[].countries array List of supported countries
Response
{
    "remark": "global_plan",
    "status": "success",
    "message": ["Global eSIM Plans"],
    "data": {
       "plans": [
            {
                "id": 855,
                "slug": "AS-12_0.5_Daily",
                "name": "Asia (12 areas) 500MB/Day",
                "period": 1,
                "package_type": "DATA",
                "data_volume": -1,
                "voice_quantity": "0.00",
                "sms_quantity": 0,
                "fup_policy_text": "500MB high-speed/day, 128 Kbps after limit, resets daily",
                "operator_name": "Metfone, China Unicom, csl, Telkomsel, KDDI/au, CTM, CelcomDigi, Maxis, SingTel, SKTelecom, LG U+, Chunghwa, DTAC, TrueMove H, MobiFone, Viettel Mobile, Vietnamobile",
                "operator_slug": null,
                "network_speed": "3G/4G",
                "area_coverage": "continental",
                "status": 1,
                "converted_price": "7.28000000",
                "currency": null,
                "packageCode": "CKH226"
                "countries": [
                    {
                        "name": "Hong Kong (China)",
                        "slug": "hong-kong-china",
                        "image": null
                    },
                    {
                        "name": "Macao (China)",
                        "slug": "macao-china",
                        "image": null
                    },
                ]
            }
        ],
        "flag": "url_to_globe_image"
    }
}

Check Balance

Check your account balance.


Endpoint: https://www.mobilexy.com/api/balance

Method: POST

Parameters
Name Type Description
api_key string Required Your API Key
Response Parameters
Name Type Description
balance float Current account balance
Request Example (PHP)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.mobilexy.com/api/balance',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array(
    'api_key' => 'YOUR_API_KEY'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Response
{
    "remark": "balance",
    "status": "success",
    "message": ["Account balance"],
    "data": {
        "balance": 100.00
    }
}

Plan Details

Get details of a specific plan.


Endpoint: https://www.mobilexy.com/api/plan/{id}

Method: GET

Replace {id} with the plan ID.

Response Parameters
Name Type Description
plan object Plan details object
plan.name string Plan name
plan.voice_quantity integer Voice quantity in minutes
plan.sms_quantity integer SMS quantity. -1 for unlimited
Response
{
    "remark": "plan_details",
    "status": "success",
    "message": ["Plan Details"],
    "data": {
         "plan": {
            "id": 811,
            "slug": "AS-12_3_30",
            "name": "Asia (12 areas) 3GB 30Days",
            "period": 30,
            "package_type": "DATA",
            "data_volume": 3221225472,
            "voice_quantity": "0.00",
            "sms_quantity": 0,
            "fup_policy_text": "",
            "operator_name": "Metfone, China Unicom, csl, Telkomsel, KDDI/au, CTM, CelcomDigi, Maxis, SingTel, SKTelecom, LG U+, Chunghwa, DTAC, TrueMove H, MobiFone, Viettel Mobile, Vietnamobile",
            "operator_slug": null,
            "network_speed": "3G/4G",
            "area_coverage": "continental"
            "packageCode": "CKH226"
        }
    }
}

Purchase Plan

Purchase an eSIM plan.


Endpoint: https://www.mobilexy.com/api/plan/purchase

Method: POST

Request Parameters
Name Type Description
api_key string Required Your API Key
plan_id integer Required ID of the plan to purchase
client_request_id string Optional. Your unique ID for this purchase (1-64 chars, A-Z a-z 0-9 _ -). Repeating the same request with the same ID returns the original order instead of creating a new one.
Response Parameters
Name Type Description
order object Order details
order.order_number string Unique order number
esim object eSIM details
esim.qr_code string LPA string for eSIM activation
Request Example (PHP)
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.mobilexy.com/api/plan/purchase',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array(
    'api_key' => 'YOUR_API_KEY',
    'plan_id' => '10'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
{
    "remark": "order_completed",
    "status": "success",
    "message": ["Order completed successfully"],
    "data": {
        "order": {
            "order_number": "GW7DUVMKGO",
            "total_amount": "6.20000000",
            "status": 0
        },
        "esim": {
            "serial_number": 2147483647,
            "iccid": null,
            "phone_number": "0840358292",
            "qr_code": "LPA:1$ais.prod.ondemandconnectivity.com$SEW7JEBMFGPRVSPD",
            "qr_code_image": null,
            "expiry_date": "2025-08-05",
            "info": null
        }
    }
}

Order Status

Returns an eSIM order and its eSIM details. Sometimes the eSIM profile is not ready within the few seconds of the purchase request: the purchase then answers with empty eSIM fields and the profile is completed shortly after. Poll this endpoint every 15-30 seconds until remark is order_completed.


Endpoint: https://www.mobilexy.com/api/plan/order/{order_number}

Method: GET / POST

Request Parameters
Name Type Description
api_key string Required Your API Key
order_number string Required Order number from the purchase response (in the URL path)
Response Parameters
Name Type Description
remark string order_completed — eSIM is ready; order_pending — profile is still being issued, poll again; order_not_found — no such order on your account
order object Order details: order_number, total_amount, packageCode, status, created_at
esim object|null eSIM details (iccid, qr_code, ...) when ready, null while pending
Request Example (PHP)
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.mobilexy.com/api/plan/order/LRK9ZG5BHG67?api_key=YOUR_API_KEY',
  CURLOPT_RETURNTRANSFER => true,
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
{
    "remark": "order_completed",
    "status": "success",
    "message": ["Order completed successfully"],
    "data": {
        "order": {
            "order_number": "LRK9ZG5BHG67",
            "total_amount": "5.40",
            "packageCode": "PFCBLLZWC",
            "status": 1,
            "created_at": "2026-10-12T14:56:33+00:00"
        },
        "esim": {
            "serial_number": null,
            "iccid": "8943108170000000000",
            "phone_number": "",
            "qr_code": "LPA:1$smdp.example.com$ACTIVATIONCODE",
            "qr_code_image": null,
            "expiry_date": null,
            "info": null
        }
    }
}

Manage Profile - Top Up

Top up the data service of an existing installed eSIM with a new plan.


Endpoint: https://www.mobilexy.com/api/profile/topup

Method: POST

Request Parameters
Name Type Description
api_key string Required Your API Key
esimTranNo string Required Single eSIM transaction number
packageCode string Required Top up package code (provider package code)
Response Parameters
Name Type Description
transactionId string Transaction ID
iccid string ICCID of the topped-up eSIM
expiredTime long New package expiry (ISO timestamp)
totalVolume long New total data balance in bytes
totalDuration integer New validity period in days
orderUsage long Total package usage in bytes
Request Example (PHP)
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.mobilexy.com/api/profile/topup',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array(
    'api_key' => 'YOUR_API_KEY',
    'esimTranNo' => '26021613280014',
    'packageCode' => 'PFRQ8FIBC'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
{
    "remark": "topup_completed",
    "status": "success",
    "message": {
        "success": [
            "Top up completed successfully"
        ]
    },
    "data": {
        "success": true,
        "errorCode": null,
        "errorMsg": null,
        "obj": {
            "transactionId": "MBL-RGNRTU9DAK_1771248518",
            "iccid": "8910300000056693431",
            "expiredTime": "2026-03-30T07:37:12+0000",
            "totalVolume": 6442450944,
            "totalDuration": 42,
            "orderUsage": 0,
            "topUpEsimTranNo": "26021613280014"
        }
    }
}

Usage Check

Retrieve the latest data usage snapshot (in bytes) for up to 10 eSIMs by their esimTranNo. Usage data is refreshed every 2–3 hours by the carrier and is not real-time.


Endpoint: https://www.mobilexy.com/api/profile/usage-check

Method: POST

Request Parameters
Name Type Description
api_key string Required Your API Key
iccid string ICCID that resolves to an eSIM owned by the account
esimTranNo string Single eSIM transaction number. Use when checking one profile
esimTranNos array Up to 10 esimTranNo values to query together.
Response Parameters
Name Type Description
success string true: succeeded, false: failed
obj.usageList object One entry per requested eSIM with usage data
dataUsage long Current data usage in bytes
totalData long Plan allowance in bytes
lastUpdateTime string Timestamp of the latest usage update
Request Example (PHP)
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://mobilexy.com/api/profile/usage-check',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_POSTFIELDS => array(
    'api_key' => 'YOUR_API_KEY',
    'iccid' => '8948010010002120847'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response
{
    "success": true,
    "errorCode": "0",
    "errorMsg": null,
    "obj": {
        "usageList": [
            {
                "esimTranNo": "26021607100025",
                "dataUsage": 0,
                "totalData": 1073741824,
                "lastUpdateTime": "2026-02-16T07:10:58+0000"
            }
        ]
    }
}
}

Virtual Numbers API

Use these endpoints to search, purchase and manage virtual numbers through your API account.


Virtual number endpoints use the same API key authentication as the eSIM endpoints. Pass api_key in the query string or request body. Bearer token authentication is also supported where available.

Prices are returned in USD. Purchasing a virtual number through the API uses the partner wallet balance directly. The customer must have enough balance before calling the purchase endpoint.

Available numbers are cached for a short time because offer tokens expire. If an offer token expires, request the available numbers endpoint again and use the new offerToken.

Virtual Number Countries

Retrieve enabled countries for virtual numbers. Use with_price=1 to return only countries that currently have a cached starting price.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/countries

Method: GET

Request Parameters
NameRequiredTypeDescription
api_keyYesstringYour API key
with_priceNobooleanSet to 1 to return only countries with cached minimum price
Response Parameters
NameTypeDescription
countriesarrayList of enabled virtual number country objects
countries[].country_codestringISO country code
countries[].country_namestringCountry name
countries[].min_retail_pricedecimalMinimum current retail price in USD when available
countries[].cached_numbers_countintegerNumber of currently cached available offers
countries[].typesarrayAvailable number types, when provided
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/countries?api_key=YOUR_API_KEY&with_price=1"
Response
{
    "remark": "virtual_number_countries",
    "status": "success",
    "message": ["Virtual number countries"],
    "data": {
        "countries": [
            {
                "country_code": "AR",
                "country_name": "Argentina",
                "min_retail_price": "8.33000000",
                "cached_numbers_count": 10,
                "types": ["local"]
            }
        ]
    }
}

Available Virtual Numbers

Search available virtual numbers. The returned offerToken is required to purchase the number and expires after a short time.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/available

Method: GET

Request Parameters
NameRequiredTypeDescription
api_keyYesstringYour API key
countryNostringISO country code, for example AR
typeNostringNumber type, for example local, mobile, tollfree, national
featuresNostringComma separated features when supported, for example voice_in,sms_in
numberPrefixNostringOptional number prefix filter
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/available?api_key=YOUR_API_KEY&country=AR&type=local"
Response
{
    "remark": "virtual_numbers_available",
    "status": "success",
    "message": ["Available virtual numbers"],
    "data": {
        "success": true,
        "obj": {
            "items": [
                {
                    "offerToken": "OFFER_TOKEN_HERE",
                    "number": "542494401315",
                    "country": "AR",
                    "countryName": "Argentina",
                    "type": "local",
                    "features": ["voice_in", "voice_out"],
                    "setupPrice": "0.00",
                    "monthlyPrice": "8.33",
                    "currency": "USD",
                    "offerExpiresInSec": 600
                }
            ]
        }
    }
}

Purchase Virtual Number

Purchase a virtual number with a valid offerToken. The amount is deducted from the API user balance.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/order

Method: POST

Request Parameters
NameRequiredTypeDescription
api_keyYesstringYour API key
offerTokenYesstringOffer token returned by the available numbers endpoint
numberNostringNumber shown to the customer; used for local order display
countryNostringISO country code
typeNostringNumber type
setupPriceNodecimalProvider setup price from the available response
monthlyPriceNodecimalProvider monthly price from the available response
Request Example
curl -X POST "https://www.mobilexy.com/api/virtual-numbers/order" \
  -d "api_key=YOUR_API_KEY" \
  -d "offerToken=OFFER_TOKEN_HERE" \
  -d "number=542494401315" \
  -d "country=AR" \
  -d "type=local" \
  -d "setupPrice=0.00" \
  -d "monthlyPrice=8.33"
Response
{
    "remark": "virtual_number_ordered",
    "status": "success",
    "message": ["Virtual number ordered successfully"],
    "data": {
        "order": {
            "order_number": "ABCD12345678",
            "transaction_id": "VN-1-ABCD12345678",
            "number": "542494401315",
            "country": "AR",
            "status": "active",
            "retail_price": "8.33000000",
            "virtual_number": {
                "id": 15,
                "roamlinx_number_id": "rlx_number_id",
                "number": "542494401315",
                "status": "active"
            }
        }
    }
}

List Purchased Virtual Numbers

Retrieve purchased virtual numbers for the authenticated API user.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/list

Method: GET

Request Parameters
NameRequiredTypeDescription
api_keyYesstringYour API key
statusNostringFilter by status, for example active, pending_activation, pending_termination, blocked_no_funds
per_pageNointegerPagination size
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/list?api_key=YOUR_API_KEY&status=active"

Virtual Number Details

Get details for one purchased virtual number. The identifier can be the local ID or the provider number ID.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/{id}

Method: GET

Request Parameters
NameRequiredTypeDescription
idYesinteger/stringLocal virtual number ID or provider number ID in the URL
api_keyYesstringYour API key
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/15?api_key=YOUR_API_KEY"

Cancel Virtual Number

Cancel a virtual number. The number stays active until its expiration date when the provider returns pending termination.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/{id}/cancel

Method: POST

Request Parameters
NameRequiredTypeDescription
idYesinteger/stringLocal virtual number ID or provider number ID in the URL
api_keyYesstringYour API key
Request Example
curl -X POST "https://www.mobilexy.com/api/virtual-numbers/15/cancel" -d "api_key=YOUR_API_KEY"

Virtual Number SMS Messages

Retrieve inbound SMS messages received by a purchased virtual number.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/{id}/sms

Method: GET

Request Parameters
NameRequiredTypeDescription
idYesinteger/stringLocal virtual number ID or provider number ID in the URL
api_keyYesstringYour API key
per_pageNointegerPagination size
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/15/sms?api_key=YOUR_API_KEY"

Virtual Number Charges

Retrieve SMS charge records for a purchased virtual number when SMS charge billing is enabled.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/{id}/charges

Method: GET

Request Parameters
NameRequiredTypeDescription
idYesinteger/stringLocal virtual number ID or provider number ID in the URL
api_keyYesstringYour API key
per_pageNointegerPagination size
Request Example
curl "https://www.mobilexy.com/api/virtual-numbers/15/charges?api_key=YOUR_API_KEY"

Reactivate Blocked Virtual Number

Reactivate a locally blocked virtual number after the user balance is refilled. This does not restore a number that was already cancelled or terminated by the provider.


Endpoint: https://www.mobilexy.com/api/virtual-numbers/{id}/reactivate

Method: POST

Request Parameters
NameRequiredTypeDescription
idYesinteger/stringLocal virtual number ID or provider number ID in the URL
api_keyYesstringYour API key
Request Example
curl -X POST "https://www.mobilexy.com/api/virtual-numbers/15/reactivate" -d "api_key=YOUR_API_KEY"

Global PAYG eSIM API

One eSIM that works in 200+ countries. You put credit on it, data is billed per MiB from that credit, and the eSIM stops when the credit runs out. Nothing has to be switched on per country.


Money model. The eSIM price is charged once at order. Credit you put on an eSIM moves from your balance onto that eSIM and is spent only on its data — your balance is never touched by usage. Top up the same eSIM as often as you like. Unused credit can be returned to your balance with the refund endpoint.

Rates. The price per MiB depends on the network the device is attached to, so each country lists every network with its own rate. The device picks the network.

Freshness. The network reports usage to us about every 10 minutes, and we pick up every change within 2 minutes; every eSIM response carries balance_as_of. Each change is also pushed to you as an esim.usage webhook, so there is no need to poll — polling an eSIM more often than every 2 minutes returns the same figures. After a top-up, usage figures pause for about 15 minutes while the network settles; data keeps working.

Rounding. The eSIM balance is rounded down to the cent and can show up to 5 cents less than the exact credit — for example 9.99 right after putting 10 on it. The eSIM always has at least the balance shown.

Currency. All amounts are in XYC (1 XYC = 1 USD). Authentication is the same as everywhere here: api_key in the query or body, or a bearer token. The API key selects both the wallet and your rate.

Which balance pays. Every call is paid from the balance of the API key that makes it: an order and its initial credit from the ordering key, each top-up from the key that sends it — any key of your account can top up any of your eSIMs. A refund returns the unused credit to the key that calls refund. A top-up that does not go through is returned to the key that paid for it.

EndpointMethodPurpose
https://www.mobilexy.com/api/payg-global/pricingGET / POSTeSIM price and your markup
https://www.mobilexy.com/api/payg-global/ratesGET / POSTCountries and networks with your price per GiB / MiB. Optional country (ISO2)
https://www.mobilexy.com/api/payg-global/balanceGET / POSTYour spendable balance
https://www.mobilexy.com/api/payg-global/orderPOSTIssue an eSIM, optionally with initial credit
https://www.mobilexy.com/api/payg-global/topupPOSTAdd credit to an eSIM
https://www.mobilexy.com/api/payg-global/esimGET / POSTOne eSIM with balance, usage and install data
https://www.mobilexy.com/api/payg-global/esimsGET / POSTYour eSIMs, paginated (per_page up to 100)
https://www.mobilexy.com/api/payg-global/pausePOSTPause data on an eSIM
https://www.mobilexy.com/api/payg-global/resumePOSTResume data
https://www.mobilexy.com/api/payg-global/refundPOSTReturn the unused credit of an eSIM to your balance

Order eSIM

Endpoint: https://www.mobilexy.com/api/payg-global/order   Method: POST

NameRequiredTypeDescription
api_keyYesstringYour API key
amountNonumberInitial credit to put on the eSIM: 0, or 1–1000 XYC. Charged on top of the eSIM price.
client_request_idYesstringYour unique order ID (1–64 chars A-Z a-z 0-9 _ -). Use a new one for every eSIM. Repeating it returns the same eSIM instead of issuing a new one, so a retry after a dropped connection is safe. If an order with this ID failed, the same ID can be used again.
labelNostringYour note for this eSIM
callback_urlNostringPublic https URL for this eSIM's webhooks
{
    "remark": "gpayg_order_completed",
    "status": "success",
    "message": ["eSIM"],
    "data": {
        "esim": {
            "iccid": "8999…",
            "status": "active",
            "data_paused": false,
            "currency": "XYC",
            "balance": 10,
            "spent": 0,
            "funded": 10,
            "refunded": 0,
            "esim_price": 1.8,
            "label": "Order 1042",
            "installed": false,
            "activated_at": null,
            "balance_as_of": "2026-10-22T15:12:42+00:00",
            "created_at": "2026-10-22T15:12:42+00:00",
            "lpa": "LPA:1$…$…",
            "smdp_address": "…",
            "activation_code": "…",
            "ios_install_url": "https://…"
        }
    }
}

If the remark is gpayg_order_pending, the order is being confirmed: do not order again. Read it with the eSIM list in a few minutes — it either completes or is refunded in full automatically.

Top up, pause, resume, refund

EndpointParametersNotes
topupiccid, amount (1–1000), client_request_id (optional)Credit is spendable right away. Not possible while a refund is in progress. If the remark is gpayg_topup_pending, the top-up is being confirmed — do not repeat it; if it does not go through, the amount returns to your balance automatically.
pause / resumeiccidStops or restores data; credit stays on the eSIM.
refundiccidPauses data and returns the unused credit to your balance after about 15 minutes (remark gpayg_refund_pending with estimated_return). The eSIM stays installed; a later top-up switches data back on.

Webhooks

Pass callback_url when ordering, or ask us to set a default URL for your account. We POST JSON signed exactly like the pay-as-you-go webhooks: X-Mobilexy-Signature = HMAC-SHA256(raw body, your webhook secret). Global PAYG can have its own webhook secret, separate from the pay-as-you-go one — ask us to issue it.

Events: esim.created, esim.activated, esim.usage, esim.balance_low, esim.depleted, esim.topped_up, esim.paused, esim.resumed, esim.refund_pending, esim.refunded, esim.refund_failed, esim.topup_refunded, esim.failed, esim.terminated. The body is the eSIM object plus event, product = global_payg, sequence (grows per eSIM — ignore anything not newer than what you have) and occurred_at. Answer 2xx; failed deliveries are retried up to 6 times.

Errors

RemarkMeaning
not_availableGlobal PAYG is not enabled for your account — contact us
insufficient_balanceNot enough balance behind this API key
temporarily_unavailableTry again shortly — you have not been charged
invalid_amount / validation_errorCheck the parameters
esim_not_foundNo such eSIM on your account
not_activeThe eSIM is not active
refund_pendingA balance return is in progress for this eSIM
no_balanceNothing to return, or top up before resuming
topup_failed / order_failedDid not go through — you have not been charged
too_many_requestsMore than 120 requests a minute from one API key — slow down
Get an eSIM

We may use cookies or any other tracking technologies when you visit our website, including any other media form, mobile website, or mobile application related or connected to help customize the Site and improve your experience. learn more

Allow Reject