eSIM activation code (LPA)
The QR on a carrier's eSIM activation email is an LPA (Local Profile Assistant) activation code per GSMA SGP.22. The phone scans it, contacts the SM-DP+ (Subscription Manager — Data Preparation Plus) server, downloads the encrypted eSIM profile, and installs it — all without the customer typing anything.
Canonical spec: GSMA SGP.22 — Remote SIM Provisioning Architecture for Consumer Devices v3.0 (current, 2024). The activation-code format is defined in §4.1.1.
Native support: iOS 17.4+ (2024) and Android 13+ (2022) scan these directly from the camera app to provision eSIM profiles.
Native support: iOS 17.4+ (2024) and Android 13+ (2022) scan these directly from the camera app to provision eSIM profiles.
What it is
The activation-code payload is a fixed-format string with 3 or 4 $-separated parts:
LPA:1$<SM-DP+ address>$<Matching ID>[$<Confirmation Code>]- LPA:1 — the LPA URI scheme identifier + activation-code version. Required literal.
- SM-DP+ address — the FQDN of the carrier's provisioning server (e.g.
rsp.example.com). Nohttps://prefix — only the hostname. - Matching ID — a unique ID (usually 16–32 alphanumerics) that ties the activation code to one specific eSIM profile on the SM-DP+ server.
- Confirmation Code (optional) — an additional secret the user must type to authorise download. Used by some carriers as a second-factor on the activation flow.
Canonical test vectors
These are shape-only examples — a real LPA activation code binds to a specific profile on a specific SM-DP+. Test vectors encode the format, not a scan-to-install flow.
| Case | Inputs | Expected encoded string |
|---|---|---|
| Minimal (no confirmation code) | smdp=rsp.example.com | LPA:1$rsp.example.com$K2-LM3N4P5Q-R6S7T |
| With confirmation code | smdp=rsp.example.com | LPA:1$rsp.example.com$K2-LM3N4P5Q-R6S7T$1234 |
| Carrier with subdomain | smdp=esim.carrier.com | LPA:1$esim.carrier.com$ABCDEFGH12345678 |
| Ported MSISDN workflow | smdp=rsp.smdpplus.example | LPA:1$rsp.smdpplus.example$PORT-MSISDN-0123456789$99 |
Common pitfalls
- https:// prefix in the SM-DP+ field. SGP.22 §4.1.1 wants the bare FQDN. Phones that see
https://rsp.example.comin that slot treat the activation code as malformed and refuse to download. - $ characters in the Matching ID. The Matching ID is alphanumeric. A
$inside it collides with the field separator. Carriers that auto-generate Matching IDs must exclude$from the alphabet. - Single-use expectation. Most SM-DP+ servers invalidate the Matching ID after the first successful profile download. Re-sharing the QR after the customer scanned it will fail — and the customer will think you gave them a broken QR.
- Profile re-download. If the customer factory-resets or switches phones, they can't re-scan the old QR. They have to contact the carrier, who issues a fresh Matching ID and a new QR. Build your customer-support flow around that.
- Dual-SIM provisioning. iOS 17.4+ can hold 8 eSIM profiles but only use two concurrently. When scanning, the OS asks the user which physical SIM slot to replace. Enterprise carriers often scan into a secondary slot by default.
- MDM-managed phones. Apple Business Manager and Android Enterprise can provision eSIMs programmatically without the QR step. If your fleet is MDM-managed, use the API rather than handing users QR codes.
Scanner compatibility
| Device / OS | Support | Notes |
|---|---|---|
| iOS 17.4+ | Native | Camera app recognises LPA payloads and offers to install the eSIM profile inline. |
| iOS 16.x–17.3 | Native via Settings > Cellular | Scan from Settings > Cellular > Add eSIM rather than Camera. Camera-scan support landed in 17.4. |
| Android 13+ | Native | Settings > Network & internet > SIMs > Add eSIM > Scan QR. |
| Android 9–12 | OEM-specific | Samsung Galaxy, Google Pixel, and some OnePlus devices have camera-scan support. Other OEMs require manual entry via Settings. |
| Third-party camera apps | Not natively | They decode the QR but don't trigger eSIM install. Users must copy the string into Settings manually. |
| Older / non-eSIM phones | N/A | No physical eSIM hardware; payload decodes but nothing happens. |
See also
- /esim-qr-code/ — the generator with the LPA format pre-filled.
- /standards/ — back to the standards index.
- GSMA SGP.22 — the authoritative spec.