How to order an eSIM profile with a product via Connect and install it on a device.
The first step to get a new eSIM is to place an order through Connect's order API. The order request will include the ID of the product that will be activated via the order, check the Product Catalogue guide in order to understand how to access the product catalogue.
Order fulfilment is not synchronous, so after placing an order, the order status needs to be periodically checked until completion using a polling mechanism. For this your code can use the order API or just use the metadata links available in the response from order creation. You can fin the full list of order status here.
As soon as the order is completed, there are currently 3 options for installing the eSIM profile:
There is a couple of different ways of generating a QRCode to install the eSIM profile
You can use the image generated in the
order status request included in the
_qrcode parameter. These URLs are public so they can be directly referenced from your code e.g. in a img tag in html. Below there is an example of the output of the URL.
Point your eSIM enabled smartphone to the image to try it out
NOTE: The above QRCode triggers the installation process but doesn't point to an actual eSIM profile
If you require an extra level of control, the API already provides the
_lpa parameter, this is the string that needs to be encoded in a QRCode, or that can be passed to a mobile OS LPA API in case of a direct integration. This is the string that is recognizable by the target device to start the installation proccess in mobile platforms.
Ultimately, the API provides the smdp url in
rsp.truphone.com) and the matching id
matching_id which are used to generate a lpa url and respective QRCode. The final string used to generate the QRCode should be as follows:
By providing the EID of the target device as described in the example request, Connect is able to trigger a request which will display a push notification in the target device to trigger the installation.
Note: If you have an iOS device and wish to use the push install feature (More details below), you need to specify
device.eidfield. If the
device.eidfield is ignored.
Either using our SDKs or via direct eUICC API integration you can use the API information to trigger a local install. Just like in the QRCode method, you need the smdp url and the matching id values to trigger the installation process. Get in touch with your Truphone account manager to learn more about our SDKs.