DataPlans
Search…
Using the API
Start working with our eSIM API.

Getting Started

To get started using the API:
    2.
    View API docs and / or Postman example
    3.
    Agree to the User Agreement
    4.
    Fund your account and purchase an eSIM

Sandbox Environment

After login, you will be in the sandbox testing area, with test credit and eSIMs. With in the sandbox account you can:
    1.
    Make a deposit of funds
      1.
      Navigate to Billing > Make External Deposit
    2.
    Make a eSIM purchase
      1.
      Go to Products and choose one of the available choices
      2.
      Go to Purchases and review purchase history
    3.
    Generate your API Key
    4.
    Make API calls
Calling the sandbox API is done with the follwing endpoint:
1
https://sandbox.dataplans.io/api/v1
Copied!
Additionally, you can interact with the Swagger API docs in sandbox with your API Key. Click the Authorize button and enter your API key to work with the API within the Swagger doc.

Live Environment

Once satisfied with your process, you can switch to the live environment. You can use the same API or roll a new one. The API key is the same for both Sandbox and Live enviroments.
In the live environment use the following endpoint:
1
https://app.dataplans.io/api/v1
Copied!
You can interact with the Swagger API docs in live mode with your API Key.

Run In Postman

Postman is a great way to work with our API and you can import our collection into your project.

eSIM Payload

Purchasing an eSIM is possible once you have a positive account balance. When requesting the eSIM, your balance is deducted according to your current monthy tier.

API Delivery

When purchasing via API, you will receive a JSON eSIM payload. This provides both the manual entry data as well as the QR code for adding an eSIM.
1
{
2
"purchase": {
3
"purchaseId": "07045e84-a075-49f9-8eeb-f2f537d1f8eb",
4
"planSlug": "tourist-sim-dtac",
5
"retail": "299.00",
6
"paid": "284.65",
7
"currency": "THB",
8
"purchasedAt": "2020-02-06T08:54:06.047Z",
9
"esim": {
10
"manual1": "ais.prod.ondemandconnectivity.com",
11
"manual2": "hidden",
12
"optionalCode": "",
13
"phone": "0800773477",
14
"serial": "8782979238792973",
15
"expiryDate": "2020-02-06T08:18:20.022Z",
16
"qrCodeString": "LPA:1$ais.prod.ondemandconnectivity.com$SEW7JEBMFGPRVSPD",
17
"qrCodeDataUrl": "data:image/png;base64,iVBORw0KGgoAAAA..."
18
}
19
},
20
"availableBalance": "15000"
21
}
Copied!
Parameters
Description
manual1
String for manual entry of SM-DP+ Address
manual2
Sring for Activation Code
optionalCode
Confirmation Code. Used with some eSIM providers
phone
eSIM phone number
serial
eSIM Serial number
expiryDate
eSIM expiry date
qrCodeString
QR code payload string. Populate your custome QR code with this data.
qrCodeDataUrl
QR code PNG imag

Last modified 8mo ago