When creating a new eSIM using the API you have the ability to do so by either generating your own QR code or using the eSIM Go API to download a QR code.
The purpose for Option 1 is if you require the ability to generate your own bespoke company branded QR codes, if you do not need this feature and would like to generate a plain and unbranded QR code then please skip to Option 2
The below assumes that you have already Located And Entered Your API Key
Option 1 - Generate your own QR Code
Step 1)
Order the required bundle using this API https://docs.esim-go.com/api/#post-/orders
Example below:
- Click "EXAMPLE"
- Change "type" from "validate" to "transaction"
- Enter "quantity" of bundle required - in this example "1"
- In "item" enter the name of the bundle, this example is "esim_1GB_7D_AD_U" . Names of bundles are case sensitive and can be found in the API catalogue - https://docs.esim-go.com/api/#get-/catalogue
- Click "Try"
If you have a successful transaction then you will see in the "RESPONSE" section:
"statusMessage": "Order completed"
Step 2)
The bundle is now in your inventory and needs to be applied to a new eSIM using the following
API - https://docs.esim-go.com/api/#post-/esims/apply
Click "EXAMPLE"
- To apply bundle to a new iccid in "iccid" delete "string" (leave speech marks)
- in "name" replace "string" with the bundle name (Bundle names are case sensitive)
- in "startTime" delete "string" (leave speech marks)
Example below:
If you have a successful transaction then you will see in the "RESPONSE" section:
"status": "Successfully Applied Bundle" along with the ICCID of the SIM the bundle has been applied to, the ICCID in this example is 8943108161000073175
Step 3)
Use API https://docs.esim-go.com/api/#get-/esims/-iccid-
- Enter the ICCID generated from the previous step
- Click "Try"
Step 4)
You will have access to the smdpAddress and matchingId values, which are used to generate the QR Code. Example of the API response below.
5) Using your QR Code generator of choice, present the information in the following format LPA:1$smdpAddress$matchingID so in the above example you would use: LPA:1$rsp.truphone.com$JQ-1L23TN-G0G4WI
Option 2 – Use eSIM Go API to download an unbranded QR Code
Step 1)
Order the required bundle using this API https://docs.esim-go.com/api/#post-/orders
Example below:
- Click "EXAMPLE"
- Change "type" from "validate" to "transaction"
- Change "assign" from "false" to "true"
- Enter "quantity" of bundle required - in this example "1"
- In "item" enter the name of the bundle, this example is "esim_1GB_7D_AD_U" . Names of bundles can be found in the API catalogue - https://docs.esim-go.com/api/#get-/catalogue
- Click "Try"
7. If you have a successful transaction then you will see in the "RESPONSE" section:
"statusMessage": "Order completed" along with the number of eSims assigned
Step 2)
To download the QR Code as a .PNG or .ZIP if you have multiple eSIMs:
Use API https://docs.esim-go.com/api/#get-/esims/assignments
- Enter the order reference from the response in step 1, the example here is:
d45f78e3-2179-4a12-8131-2cda5397a3f0
- Click "Try"
- Click "Download"
You will now have a zip file available to open, inside you will see the QR code in PNG format and also a CSV with the relevant ICCID(s)