Skip to content
iRoamly Shop

API Docs

Reference for the iRoamly Shop API: authentication, plans, purchase and delivery, renewal and usage.

Overview

Basic Explanation

To ensure the security of server transmission information, the following security mechanisms are adopted:

  1. 1.All interfaces use HTTPS secure links.
  2. 2.Assigned AuthKey used for API authentication (maximum length: 32 characters).
  3. 3.Assigned AuthSecret used to generate the request hash (maximum length: 50 characters).
  4. 4.Requests use SHA-256 hashes for authentication.
Overview

Interface Standards

Base Path:https://api.iroamly.shop/
Request Protocol:HTTPS
Request Method:GET / POST
Data Transfer Format:application/json

Request Header Parameters:

AuthKey: Customer authentication key, type String

Certification: String containing the SHA-256 hash of AuthKey+AuthSecret concatenated in that order.

/common/getPlanItem does not require the AuthKey or Certification header.

Rotate API credentials

Sign in and open the API Key page to rotate your credentials.

  • Rotate only AuthSecret. Your AuthKey stays the same. Update your integration during the default 24-hour grace period, or choose to revoke the old secret immediately.
  • Rotate both AuthKey and AuthSecret. The old pair stops working immediately. Authenticated requests using it will fail until you update your integration.

After either rotation, concatenate the AuthKey you will send with the new AuthSecret, in that order and with no separator. Hash the UTF-8 string with SHA-256 and encode the digest as lowercase hexadecimal. Send that same key in the AuthKey header and the resulting digest in the Certification header.

API Endpoints

Get Regional Plan List

Request URL:https://api.iroamly.shop/common/getPlanItem
Request Method:GET

No AuthKey or Certification header is required.

Request Parameters:

ParameterDescriptionType
regionAccepts ISO2 codes, country names (case-insensitive), or standardized formats (e.g., united-states).String

Response Format:

Success: HTTP 200. Plans are returned in data.list.

Always returns HTTP 200. When no data is available, data.list is an empty array and msg is Success.

Response Field Descriptions:

FieldDescriptionType
planPlan name (includes region, type, data allowance, and duration).String
productCodeUnique plan ID for purchasing or queries.String
dataData allowance (e.g., 10GB, Unlimited, 500MB).String
typePlan type (e.g., Total, Daily, Unlimited).String
plan_typePlan category (e.g., default).String
package_typePackage type (e.g., Data Only).String
durationValidity period in days (e.g., 10).String
speedNetwork speed (e.g., 4G / 5G).String
operatorSupported operators (e.g., T-Mobile/AT&T).String
regionOfficial region name (e.g., United States).String
region_indexStandardized region identifier (lowercase with hyphens, e.g., united-states).String
creditPlan price in platform Credits (not USD).Float
remarkAdditional notes (e.g., speed throttling rules).String
created_atPlan creation timestamp (ISO 8601 format).String
Request Example
"https://api.iroamly.shop/common/getPlanItem?region=US"
Example Return
{
  "code": 0,
  "data": {
    list:[
     {
       "plan": "United States-eSIM-10GB-10 Days-Total",
       "productCode": "iRoamly-unite-584535",
       "data": "10GB",
       "type": "Total",
       "package_type": "Data Only",
       "duration": "10",
       "speed": "4G / 5G",
       "operator": "T-Mobile/AT&T",
       "region": "United States",
       "region_index": "united-states",
       "credit": 6.43,
       "remark": "After accumulating 10GB, the speed will be reduced to 128 Kbps",
       "created_at": "2025-05-16T04:02:31Z"
     }
    ]
  }
}
API Endpoints

Purchase a QR Code Directly

Request URL:https://api.iroamly.shop/openapi/purchaseqrcode
Request Method:POST

Request Parameters:

ParameterDescriptionType
emailThe mailbox for receiving QR codes. If it is empty, no email will be sent.String
productListProduct collectionObject[]

productList Fields:

FieldDescriptionType
planPlan Name. Provide either plan or productCode.String
productCodePlan ID (productCode from Get Regional Plan List). Provide either productCode or plan.String
quantityQuantityInt
Test Plan:iRoamly-Test-10GB

Next step: Use Query QR Code (https://api.iroamly.shop/openapi/qrcodeQuery) to get the QR code

Example Parameters
{
  "email": "2m827n32d@gmail.com",
  "productList": [
    {
      "plan": "United States-eSIM-10GB-10 Days-Total",
      "quantity": 2
    },
    {
      "plan": "Albania-10GB-15 Days-Total",
      "quantity": 1
    }
  ]
}
Example Return
{
  "code": 1,
  "data": {
    "orderId": "Open-Global-DXDWFBKG578913",
    "redeem_list": [
      {
        "productCode": "",
        "plan": "United States-eSIM-10GB-10 Days-Total",
        "redeemCode": "tjMxpYfvk5dFMQg",
        "status": 0,
        "expire_at": "2026-03-01"
      },
      {
        "productCode": "",
        "plan": "United States-eSIM-10GB-10 Days-Total",
        "redeemCode": "gKPzYhseX1wRmSi",
        "status": 0,
        "expire_at": "2026-03-01"
      },
      {
        "productCode": "",
        "plan": "Albania-10GB-15 Days-Total",
        "redeemCode": "sLSHNkAv2ojbNBG",
        "status": 0,
        "expire_at": "2026-03-01"
      }
    ]
  },
  "msg": "success"
}
API Endpoints

Purchase Redemption Codes

Request URL:https://api.iroamly.shop/openapi/purchaseCode
Request Method:POST

Request Parameters:

ParameterDescriptionType
emailEmailString
productListProduct collectionObject[]

productList Fields:

FieldDescriptionType
planPlan Name. Provide either plan or productCode.String
productCodePlan ID (productCode from Get Regional Plan List). Provide either productCode or plan.String
quantityQuantityInt
Test Plan:iRoamly-Test-10GB
Example Parameters
{
  "email": "2m827n32d@gmail.com",
  "productList": [
    {
      "plan": "United States-eSIM-10GB-10 Days-Total",
      "quantity": 2
    },
    {
      "plan": "Albania-10GB-15 Days-Total",
      "quantity": 1
    }
  ]
}
Example Return
{
  "code": 1,
  "msg": "success",
  "orderId": "xxx-xxxx-sd9hn8df333" // Order number, can be used to query redeem code
}
API Endpoints

Query Redemption Codes

Request URL:https://api.iroamly.shop/openapi/codeQuery
Request Method:POST

Request Parameters:

ParameterDescriptionType
orderIdOrder numberString
Example Parameters
{
  "orderId": "xxx-xxx-dh239jdu28",
}
Example Return
{
  "code": 1,
  "msg": "success",
  "data": [
    {
      "productCode": "m8hed7h2fed",
      "redeemCode": "3cd2m3f23f3f3",
      "expire_at": "2024-06-30", // Expiry date
      "plan": "United States-eSIM-10GB-10 Days-Total",
      "status": 0
    },
    {
      "productCode": "v2jf28dj2w",
      "redeemCode": "d923j29ef2323",
      "expire_at": "2024-06-30",
      "plan": "Albania-10GB-15 Days-Total",
      "status": 2
    }
  ]
}
API Endpoints

Convert to QR Code

(Note: QR codes are sent to the specified email address after conversion. Larger batches may take longer to process.)

Request URL:https://api.iroamly.shop/openapi/redeemQRcode
Request Method:POST

Request Parameters:

ParameterDescriptionType
emailEmailString
codeListCollection of redemption codesObject[]

productList Fields:

FieldDescriptionType
redeemCodeRedemption codeString
Example Parameters
{
  "email": "2m827n32d@gmail.com",
  "codeList": [
    {
      "redeemCode": "m8hed7h2fed",
    },
    {
      "redeemCode": "cn88beg9edj",
    }
  ]
}
Example Return
{
  "code": 1,
  "msg": "success",
}
API Endpoints

Query QR Code

Request URL:https://api.iroamly.shop/openapi/qrcodeQuery
Request Method:POST

Request Parameters:

ParameterDescriptionType
redeemCodeRedemption codeString

Response Field Descriptions:

FieldDescriptionType
redeemCodeRedemption codeString
qrcodeQR code image URLString
statusRedemption code status (see Redemption Code Status Definitions)Int
qrcode_contentQR code content (LPA activation string, e.g., LPA:1$…)String
iscouldrenewalWhether the eSIM can be renewed: 1 - can be renewed 0 - cannot be renewedInt
Example Parameters
{
  "redeemCode": "m8hed7h2fed",
}
Example Return
{
  "code": 1,
  "msg": "success",
  "redeemCode": "m8hed7h2fed",
  "qrcode": "https://dsfjigewafe/qrcode.jpg"
}
API Endpoints

Get Renewal Plan Status

Request URL:https://api.iroamly.shop/openapi/getRenewPlanStatus
Request Method:POST

Request Parameters:

ParameterDescriptionType
redeemCodeRedemption codeString

Response Field Descriptions:

The top-level code of the response says whether the redemption code can be renewed: 0 - renewal possible, -1 - renewal not possible. The renewal options are listed in data.renewList:

FieldDescriptionType
renewtypeRenewal type: 0 - Activate when the current plan expires 1 - Activate immediately (clears remaining data) 2 - Activate at a specified timeInt
starttimeStart of the optional activation window: the earliest activation time you can choose (renewal type 2).String
endtimeEnd of the optional activation window: the latest activation time you can choose (renewal type 2).String
Example Parameters
{
  "redeemCode": "3cd2m3f23f3f3",
}
Example Return
{
  "code": 0,
  "data": {
    "renewList": [
      {
        "renewtype": 1,
        "starttime": "0001-01-01T00:00:00Z",
        "endtime": "0001-01-01T00:00:00Z"
      },
      {
        "renewtype": 2,
        "starttime": "2025-08-04 06:13:08",
        "endtime": "2025-09-20 14:23:51"
      }
    ],
    "lasttime": "0001-01-01T00:00:00Z"
  },
  "msg": "Success"
}
API Endpoints

Renewal Code

(Note: When renewing, the selected plan's renewal group must match the original plan's renewal group.)

Request URL:https://api.iroamly.shop/openapi/renewcode
Request Method:POST

Request Parameters:

ParameterDescriptionType
redeemCodeCode that requires renewalString
planRenewal PlanString
renewtypeRenewal type: 0 - Activate when the current plan expires 1 - Activate immediately (clears remaining data) 2 - Activate at a specified timeInt
renewtimeEffective Date and Time (required). Format: YYYY-MM-DDTHH:mm:ssZString
Example Parameters
{
  redeemCode: "DEF456UVW",
  plan: "basic_yearly",
  renewtype: 0,
  renewtime: "2024-12-31T23:59:59Z"
}
Example Return
{
  code: 1,
  data: {
    orderId: "Open-Global-DXDWFBKG578913",
    plan: "United States-eSIM-10GB-10 Days-Total",
    redeemCode: "tjMxpYfvk5dFMQg",
    status: 0,
    expire_at: "2026-03-01"
  },
  msg: "success"
}
API Endpoints

Get Plan Statistics

Request URL:https://api.iroamly.shop/openapi/getnetworkflow
Request Method:GET

Request Parameters:

ParameterDescriptionType
redeemCodeRedemption code to query.String

Response Field Descriptions:

ParameterDescriptionType
status0 - Inactive 1 - Active 2 - Expired 9 - InvalidInt
flow_useData used within the billing cycle (in MB)String
flow_totalTotal data in the billing cycle (in MB, or unlimited)String
start_dataPlan start timeString
end_dataPlan end timeString
installDeviceInstalled deviceString
installCountNumber of installationsString
installTimeInstallation timeString
Valid Example
{
  code: 1,
  status: 0,
  flow_use: "300",
  flow_total: "1024",
  start_data: "2025-10-25T15:04:05Z07:00",
  end_data: "2025-11-25T15:04:05Z07:00",
  installDevice: "iPhone 15",
  installCount: "1",
  installTime: "2025-10-25T15:04:05Z06:00"
}
Invalid Example
{
  code: -1,
  msg: "error message"
}
Definitions

Response Status Code Definitions

CodeDescription
1Success
2Request parameter authentication failed
3Parameters were not provided as required
4Product code does not exist
5Insufficient balance
6Redemption code does not exist
7Redemption code has been redeemed or does not exist
-1Request failed

Success is code 1, except /common/getPlanItem and /openapi/getRenewPlanStatus, which return code 0 on success.

Definitions

Redemption Code Status Definitions

StatusDescription
0Not redeemed
1Redeeming
2Redeemed
3Redemption failed
Code Reference

Purchase Redemption Codes (Python)

python
import requests
import json
import hashlib

# URL for the request
url = "https://api.iroamly.shop/openapi/purchaseCode"

# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE" 


# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()

# Header parameters for the request
headers = {
    "Content-Type": "application/json",
    "AuthKey": auth_key,
    "Certification": certification
}

# Example data for the request body
data = {
    "email": "2m827n32d@gmail.com",
    "productList": [
        {
            "productCode": "m8hed7h2fed2398dsnh",
            "quantity": 2
        },
        {
            "productCode": "cn88beg9edjdfj2sj0a",
            "quantity": 1
        }
    ]
}

# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))

# Printing the response content
print(response.text)

# Example of response
{
    "code":1,
    "msg":"success",
    "orderId":"xxx-xxxx-sd9hn8df333"
}
Code Reference

Query Redemption Codes (Python)

python
import requests
import json
import hashlib

# URL for the request
url = "https://api.iroamly.shop/openapi/codeQuery"

# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE" 


# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()

# Header parameters for the request
headers = {
    "Content-Type": "application/json",
    "AuthKey": auth_key,
    "Certification": certification
}

# Example data for the request body
data = {
    "orderId":"xxx-xxx-dh239jdu28"
}

# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))

# Printing the response content
print(response.text)

# Example of response
{
 "code":1,
 "data":
    [
     {"productCode":"m8hed7h2fed2398dsnh","redeemCode":"nDb4TDCn6vMhbQv","status":0,"expire_at":"2024-07-04"},
     {"productCode":"m8hed7h2fed2398dsnh","redeemCode":"oA7AWAmo76BwoGj","status":0,"expire_at":"2024-07-04"},
     {"productCode":"cn88beg9edjdfj2sj0a","redeemCode":"XRdDeSxBVNbvCpU","status":0,"expire_at":"2024-07-04"}
    ],
 "msg":"success"
}
Code Reference

Convert to QR Code (Python)

python
import requests
import json
import hashlib

# URL for the request
url = "https://api.iroamly.shop/openapi/redeemQRcode"

# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE" 


# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()

# Header parameters for the request
headers = {
    "Content-Type": "application/json",
    "AuthKey": auth_key,
    "Certification": certification
}

# Example data for the request body
data = {
    "email": "2m827n32d@gmail.com",
    "codeList": [
        {
            "redeemCode": "nDb4TDCn6vMhbQv",
        },
        {
            "redeemCode": "XRdDeSxBVNbvCpU",
        }
    ]
}

# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))

# Printing the response content
print(response.text)

# Example of response
{"code":1,"msg":"success"}
Code Reference

Query QR Code (Python)

python
import requests
import json
import hashlib

# URL for the request
url = "https://api.iroamly.shop/openapi/qrcodeQuery"

# Provided AuthKey and AuthSecret, remember to replace them with real values
auth_key = "YOUR_AUTH_KEY_HERE"
auth_secret = "YOUR_AUTH_SECRET_HERE" 


# Calculating Certification
combined = auth_key + auth_secret
certification = hashlib.sha256(combined.encode()).hexdigest()

# Header parameters for the request
headers = {
    "Content-Type": "application/json",
    "AuthKey": auth_key,
    "Certification": certification
}

# Example data for the request body
data = {
    "redeemCode":"XRdDeSxBVNbvCpU"
}

# Sending POST request
response = requests.post(url, headers=headers, data=json.dumps(data))

# Printing the response content
print(response.text)

# Example of response
{
 "code":1,
 "qrcode":"https:/code.tokyoesim.com/20231220/1703048857317.65625d0a779f4598d55d77bda43ecd80.png",
 "msg":"success",
 "redeemCode":"XRdDeSxBVNbvCpU"
}