In this article
Learn how to order a bundle with the API so you can create an eSIM and give your customer a QR code or install link. You'll also learn how to test an order without using your balance and how to check an eSIM later.
Before you start
- Send your API key in the X-API-Key header with every call. See Find, copy and refresh your API key.
- There are two ways to get a QR code: generate your own, or download it from the API.
- Orders are placed with POST /orders on the v2.5 API (base URL https://api.esim-go.com/v2.5). For full request and response details, see the v2.5 dev docs (https://docs.esim-go.com/api/).
Test your order first
Keep "type": "validate" in the request body to test the Orders endpoint. This tests whether the call would have been valid. If it works, you see the bundle details and total cost in the response. If it fails, you get an error explaining why. See API error troubleshooting. There is no dedicated sandbox or test environment, so validate is the way to test. A validate response has no statusMessage or orderReference. See Is there a sandbox or test environment?
A validate order does not reduce your organisation's credit balance.
Step 1: Order the bundle
Both options start with the same order.
- Send POST /orders. For the request format, see the POST /orders reference (https://docs.esim-go.com/api/v2_5/operations/orders/post).
- Set type to transaction. The allowed values are validate and transaction.
- Set assign to true to assign the bundle to the eSIM. Set it to false to add the bundle to your inventory and assign it later. To assign an inventory bundle later, see Apply a bundle from inventory to a new eSIM.
- Enter the quantity of bundles you need.
- In item, enter the moniker (bundle code) of the bundle, for example esim_1GB_7D_NL_V2. Monikers are case sensitive and can be found in the API catalogue. See Querying the catalogue.
- For a new eSIM with assign set to true, leave iccids out. If you supply ICCIDs instead, the number of ICCIDs must match the quantity, and you can only give ICCIDs when assign is true.
- If assign is false, remove the iccids part.
- Send the request.
A successful order returns statusMessage "Order completed" and an orderReference. The transaction response also includes the runningBalance. The total is deducted from your organisation's balance.
If a bundle is not compatible with the eSIM profile, set allowReassign so a new eSIM can be provided.
To order several bundles at once, see Ordering multiple bundles.
Option 1: Generate your own QR code
Use this option if you need bespoke, company-branded QR codes.
- Complete Step 1 above.
- In the response, find the iccid, smdpAddress and matchingId for the new eSIM, inside order > esims.
- Present them in this format: LPA:1$smdpAddress$matchingId.
For example: LPA:1$rsp-3104.idemia.io$4I93G-KIS04-H5UUV-VR30Z
Option 2: Download the QR code from the API
Use this option to download a QR code from the API. The QR code uses your default branding profile unless you set profileID. Branding profiles are set up in Configure > Branding in the Portal.
- Complete Step 1 above.
- To use the default branding profile, remove the profileID parameter.
- To use a different branding profile, set its ID in profileID. profileID is optional and needs assign set to true.
- Send the request and copy the order reference from the response.
- Send GET /esims/assignments and enter the orderReference from the order response in the required reference parameter.
- Set the Accept header to application/zip to get a ZIP of PNG QR code images. The default format is text/csv; application/json is also available.
- The response is a binary value, so write it to a file.
- Open the ZIP. It contains the QR codes in PNG format and a CSV with the relevant ICCIDs.
The endpoint returns a 410 (Gone) response if the eSIM has been deactivated. If so, order a new eSIM for your customer.
Install links
You can also give your customer a deep link instead of a QR code. appleInstallUrl installs directly on iOS 17.4 and above with no QR scan, and androidInstallUrl does the same on compatible Android devices. Both are returned by GET /esims/{iccid}. See Installing eSIMs and fixing install issues.
Tip: Send your customer the install link alongside the QR code. On a supported phone they can install with one tap and no QR code to scan, which means fewer install problems and fewer support contacts.
Check an eSIM later
Use GET /esims/{iccid} to retrieve the details of a specific eSIM using its ICCID.