The Despia eSIM SDK enables your application to activate eSIM profiles on compatible devices. This allows seamless integration of eSIM functionality into your application, providing users with the ability to activate mobile data plans without physical SIM cards.
This SDK is still in beta and currently only supports iOS devices with eSIM support. We are planning to roll out an Android SDK very soon. Until then, you can provide the card details manually and include installation instructions inside your Android app.
Quick Start
1. Prepare Card Data
Format your eSIM card data with the required parameters: SMDP+ Address and Activation Code.
const cardData = "LPA:1$SMDP+_Address$Activation_Code"
2. Activate eSIM Profile
Use the Despia SDK to activate the eSIM profile by passing the card data. This is the only call required to activate the eSIM.
window.despia = `esim://?carddata=${cardData}`
3. Complete Implementation
There is no response handling required. The eSIM activation process is managed by the device after the Despia SDK call.
// Complete implementation example
const cardData = "LPA:1$SMDP+_Address$Activation_Code";
window.despia = `esim://?carddata=${cardData}`;
How It Works
eSIM Technology Overview
The eSIM SDK leverages embedded SIM technology that allows mobile devices to activate a cellular plan without a physical SIM card. The SDK facilitates communication between your application and the device's eSIM capabilities.
Activation Process
When you call the SDK with the properly formatted card data, it initiates the eSIM profile download and activation process. The device connects to the specified SMDP+ server using the provided activation code to download and install the eSIM profile.
Device Compatibility
The SDK automatically detects whether the device supports eSIM technology and manages the activation process natively.
Implementation Examples
Here's how you can integrate the eSIM SDK into your application:
// Basic implementation
const cardData = "LPA:1$SMDP+_Address$Activation_Code";
window.despia = `esim://?carddata=${cardData}`;
// EXAMPLES FOR NO-CODE/LOW-CODE TOOLS
// ---------- WEWEB ----------
// WEWEB example using wwWorkflow to handle eSIM activation
// 1. Create a Native WeWeb Global Workflow and run the SDk to start the process:
const cardData = "LPA:1$SMDP+_Address$Activation_Code";
window.despia = `esim://?carddata=${cardData}`;
// No response needed
// ---------- WIZED ----------
// WIZED example using Wized's JS API or a custom action
const cardData = "LPA:1$SMDP+_Address$Activation_Code";
window.despia = `esim://?carddata=${cardData}`;
// ---------- NORDCRAFT / TODDLE ----------
// For Nordcraft / Toddle - trigger an action calling the SDK
// Clone the package from here: https://toddle.dev/projects/despia_package/branches/main
// Or reate a custom action runing the SDK
const cardData = "LPA:1$SMDP+_Address$Activation_Code";
window.despia = `esim://?carddata=${cardData}`;
Data Structure
The eSIM card data follows a specific format:
// Format: LPA:1$SMDP+_Address$Activation_Code
// Example with sample values
"LPA:1$rsp.example.com$1234-5678-9012-3456"
Best Practices
Security
-
Never store activation codes in client-side storage
-
Use HTTPS for all communications
-
Generate card data on the server side
User Experience
-
Clearly communicate to users that eSIM activation has been initiated
-
Provide clear instructions on how to complete the activation process on their device
-
Include an alternative option for devices without eSIM support
Performance
-
Initialize eSIM activation only when necessary
-
Keep the implementation simple with just the one required call
-
Test thoroughly on different device types
Complete Implementation Example
Here's a comprehensive example of implementing the eSIM SDK:
// Complete implementation example
document.addEventListener('DOMContentLoaded', function() {
const activateButton = document.getElementById('activate-esim');
activateButton.addEventListener('click', function() {
// Prepare eSIM card data
const smdpAddress = 'rsp.example.com';
const activationCode = '1234-5678-9012-3456';
const cardData = `LPA:1${smdpAddress}${activationCode}`;
// Display message to user
document.getElementById('activation-message').textContent = 'Initiating eSIM activation...';
// Activate eSIM - this is the only call needed
window.despia = `esim://?carddata=${cardData}`;
// Update UI to indicate activation was initiated
document.getElementById('activation-message').textContent = 'eSIM activation initiated. Please follow any prompts on your device to complete the setup.';
});
});
Troubleshooting
Common Issues
eSIM Activation Doesn't Start
- Verify the card data format is correct (LPA:1$SMDP+_Address$Activation_Code)
Incompatible Device
-
Confirm the device supports eSIM technology
-
Verify the device's operating system is up to date
-
Ensure the device is not locked to a specific carrier
User Can't Complete Activation
-
Provide clear instructions for any on-device prompts
-
Ensure the SMDP+ address and activation code are valid
-
Guide users to check their device settings for eSIM options
For additional support or questions, please contact our support team at support@despia.com