eSIM purchase
Flowchart
Lets your users search for and purchase mobile data eSIMs for their destination country. The flow starts with fetching active contracts and the list of countries with eSIM availability, then narrows down to specific data plans by destination country. Once a variant is selected, an order is created and a PDF voucher containing the QR code and eSIM ID is issued to the traveler.
Sequence diagram
eSIM purchase flow
This scenario describes the interaction flow between the client and the ETT API via the WebApp for searching eSIM data plans by destination country, purchasing an eSIM, and retrieving the voucher.
Overall process logic
The process consists of the following steps:
- Retrieve available contracts
- Retrieve the list of countries with eSIM availability
- Retrieve the list of eSIM products for the selected country
- Create an order
- Retrieve order details
- Generate a voucher
- Refund the order (optional)
The WebApp acts as an intermediary between the client and the ETT API.
1. Retrieve contracts
- Method:
getContracts - Description: Retrieves the list of available contracts for the agent, including balance and credit.
- Result: A list of valid agent contracts.
2. Retrieve eSIM countries
- Method:
getEsimCountries - Description: Retrieves the list of countries where eSIM data plans are available.
- Result: A list of countries with their ISO code, unlimited-data availability, and data allowance.
3. Retrieve eSIM products by country
- Method:
getEsimProductsByCountry(contractId, isoCode) - Parameters:
contractId— selected contract identifierisoCode— destination country ISO code
- Description: Returns the list of eSIM products available for the selected country.
- Result: A list of eSIM products with title, covered countries, and variants (
variantId, price,dataHash, call minutes, data).
4. Create order
- Method:
createOrder(contractId, variantId, email, dataHash, destinationCountry, homeCountry) - Parameters:
contractId— contract identifiervariantId— selected eSIM variant identifieremail— traveler's emaildataHash— selected variant's data hashdestinationCountry— destination countryhomeCountry— traveler's home country
- Description: Creates an order for the selected eSIM plan.
- Result: Coupon code,
orderId, andorderItemId.
5. Retrieve order details
- Method:
getOrder(contractId, orderId) - Parameters:
contractId— contract identifierorderId— order identifier
- Description: Retrieves full information about the order.
- Result: Order details including order items, coupon code,
iccid, and status.
6. Generate voucher
- Method:
generateOrderItemCoupon(orderId, orderItemId) - Parameters:
orderId— order identifierorderItemId— order item identifier
- Description: Generates a PDF voucher for the selected order item.
- Result: A downloadable PDF document containing the QR code and eSIM ID.
7. Refund order (optional)
- Method:
refundOrder(orderId, orderItemId) - Parameters:
orderId— order identifierorderItemId— order item identifier
- Description: Cancels and refunds the selected order item.
- Result: A success confirmation.
eSIM top-up
Flowchart
Lets your users add extra data to an eSIM they already purchased. The flow starts by looking up the existing eSIM order by its ICCID, then retrieves the list of top-up plans available from the same supplier as the original eSIM. Once a top-up plan is selected, a new order is created against the existing ICCID.
Sequence diagram
eSIM top-up flow
This scenario describes the interaction flow between the client and the ETT API via the WebApp for looking up an existing eSIM, retrieving available top-up plans, and purchasing a top-up.
Overall process logic
The process consists of the following steps:
- Retrieve the existing eSIM order (optional)
- Retrieve the list of available top-up plans
- Create a top-up order
The WebApp acts as an intermediary between the client and the ETT API.
1. Retrieve eSIM order (optional)
- Method:
getEsimOrder(contractId, iccid) - Parameters:
contractId— contract identifiericcid— ICCID of the existing eSIM
- Description: Retrieves details of the existing eSIM order, used only to show which eSIM is being topped up. Not required for the top-up itself, since
getEsimTopUpsalready validates the ICCID. - Result: eSIM order details including
orderId, order items, supplier, andiccid.
2. Retrieve top-up plans
- Method:
getEsimTopUps(contractId, iccid) - Parameters:
contractId— contract identifiericcid— ICCID of the existing eSIM
- Description: Returns the list of top-up plans available from the same supplier as the original eSIM.
- Result: A list of top-up plans (
variantId, price,dataHash, data).
3. Create top-up order
- Method:
createOrder(contractId, variantId, iccid, dataHash) - Parameters:
contractId— contract identifiervariantId— selected top-up variant identifiericcid— ICCID of the existing eSIMdataHash— selected variant's data hash
- Description: Creates a top-up order for the existing eSIM.
- Result: Order details including order items, coupon code,
iccid, and status.