Most eSIM purchase flows assume a simple trip: one destination, one plan, done. Real itineraries are messier. A traveller flies Tel Aviv to Bangkok via Dubai, spends a week in Thailand, crosses into Cambodia by land, then flies home through Istanbul. If your travel, booking or fintech app sells data for that trip, a single country picker isn't enough. You need a small itinerary model, a way to map it to packages, and a clear answer to "when does my data start counting down?"
This article walks through how to structure that, based on the problems that show up once you sell eSIM inside a booking flow rather than as a standalone product.
1. Represent the trip as legs, not a destination
Start with a model that matches how the traveller actually moves. A practical shape:
- Trip: id, traveller, overall start and end (UTC), home country.
- Leg: country code (ISO 3166-1 alpha-2), arrival and departure timestamps stored in UTC, the local time zone of that country, and a type: stay, transit or overland.
- Source: where the leg came from (flight booking, hotel booking, user input). This matters later when the itinerary changes.
If you already have a booking, derive legs from it: every flight segment gives you arrival and departure points, and the gap between segments tells you whether a stop is a 50-minute connection or an 11-hour layover. Hotel bookings fill in the stays. Let the user add or remove countries, because overland crossings and side trips rarely show up in a booking.
2. Decide how to treat transit stops
Transit is where most itinerary-unaware flows break. A traveller with a long layover may want data in a country they never "visit". Some providers already treat this as a feature: Air New Zealand Mobile, launched in November, lets its travel plans include transit locations alongside the destination.
A simple rule set works well:
- Connections under a configurable threshold (for example 3 hours): flag the country as optional. Don't add it to the required coverage, but show it.
- Longer layovers: mark the country as recommended and prefer packages that include it.
- Overnight layovers or stopovers: treat them as a stay.
Make the threshold a setting, not a constant. Product teams will want to tune it once they see support tickets.
3. Map legs to packages: single, regional or multi-country
Once you have a set of required and recommended countries, you have three broad options from most eSIM catalogues:
- Single-country packages, one per country. Often cheaper per GB and easy to explain, but the traveller ends up with several plans and possibly several profiles.
- Regional packages covering a list of countries. One purchase, but coverage lists differ per package, and a "region" rarely matches the exact route.
- Multi-country or global packages. Simplest, usually the most expensive per GB.
Treat this as a small set-cover problem with a price and convenience score, not a hard optimisation. For most trips the candidate set is tiny. A reasonable approach:
- Fetch packages whose coverage intersects the required countries.
- Build candidate combinations: one regional package that covers everything required, one regional plus single-country top-ups for the gaps, and all single-country packages.
- Score each on total price, number of packages and whether recommended transit countries are covered. Penalise each extra package, because every extra package is another thing that can fail to activate.
- Show the top one or two options and explain the difference in one line ("covers your Dubai layover" vs "cheaper, no data during the layover").
Always check coverage against the package's own country list from the catalogue API rather than a region label. Region names are marketing; coverage lists are what the network will honour.
4. Be explicit about when validity starts
"7 days" means nothing until you know when day one begins. Depending on the provider and package, validity may start on installation, on first connection to a supported network, or at purchase. Read this from the package data, store it with the order, and design around it:
- If validity starts on first connection, it's safe to sell and install the eSIM well before departure. Tell the user to keep the line off until arrival.
- If it starts on installation, schedule the install prompt close to departure and warn users who try to install early.
- If it starts at purchase, the purchase itself should move closer to the trip, or the package should cover the whole trip plus a buffer.
Then compare the validity window with the legs. If a 7-day package will start on arrival in the first country but the trip lasts 9 days in covered countries, say so before checkout, not when data stops on day eight.
5. Handle time zones and the date line
Store all leg timestamps in UTC and keep each leg's IANA time zone alongside. Render times in the zone of the place the user will be, not the device's current zone. Two edge cases are worth tests:
- Crossing the date line: a flight can land "before" it departs in local time. Duration calculations must use UTC.
- "Days" in package validity: confirm whether a day means 24 hours from activation or a calendar day in some zone. Display the expiry as a local time in the country where the user will be.
6. Schedule the "switch to your eSIM" moment
The highest-value notification in the whole flow is the one that arrives just after landing: "You've arrived in Thailand. Turn on your travel eSIM and data roaming for it." Schedule it from the leg's arrival time, with a margin for delays, and update it if the flight changes. For transit legs, send a lighter version only if the package covers that country.
Before departure, send one checklist: profile installed, line labelled, still switched off. That message saves more support tickets than any FAQ page.
7. Plan for mid-trip changes and top-ups
Itineraries change. Flights are rebooked, a side trip appears, a stay is extended. Re-run the coverage check whenever a leg changes and handle three outcomes:
- A new country isn't covered: offer a top-up or an extra single-country package.
- The trip got longer than the validity window: offer an extension or a top-up before expiry, not after.
- Usage is running ahead of the remaining days: use usage data from the provider to suggest a top-up while the user still has connectivity to buy it.
Top-ups are also where repeat revenue comes from, so make them one tap from the trip screen.
8. What to store
For support and reconciliation, persist at least:
- trip id and leg ids, with the itinerary version used at checkout;
- order id and, per package, the package id, covered countries and validity rule;
- the ICCID of the profile each package was applied to (multiple packages may share one profile);
- install and first-connection timestamps when the provider reports them;
- top-ups and which leg or change triggered them.
When a traveller writes "no data in Cambodia", support should be able to see in one screen which package was meant to cover Cambodia, whether it was active, and whether validity had already run out.
Wrapping up
Selling eSIM next to a booking is a chance to get the plan right for the actual route: legs instead of a single destination, explicit transit rules, coverage checked against real country lists, validity explained before checkout, and notifications tied to arrival times. None of it is complicated on its own, but skipping any one of them turns into "my eSIM doesn't work" tickets mid-trip.
About One-eSIM
I work on One-eSIM, a B2B platform that lets travel, mobility, fintech and telecom brands launch their own branded eSIM through a white-label webshop or an API embed, with a management portal, analytics and support tooling behind it. If you're adding eSIM to a booking or travel app, you can see how it fits on our travel, mobility and fintech page or at 1-esim.com.
Top comments (1)
Great framing of trips as legs rather than a single destination - the validity-start semantics (first connection vs purchase vs arrival) are exactly the kind of detail that confuses users mid-trip. One practical question: if a traveller overstays a covered country and needs a top-up mid-journey, do you re-run the full set-cover check against the remaining legs, or just patch the single affected package? The reminder to persist the itinerary version used at checkout is a solid point for reconciliation.