# The eSIM booking object

> An eSIM booking is one eSIM order or one topup of your agency: who it is for, what was bought, what it cost and which supplier fulfilled it.

Source: https://fx-port.com/docs/api/objects/esim-booking

`GET /esims/bookings` lists the orders and `GET /esims/bookings/{iccid}/topup-history` the topups.

`total_price` is what you charge the traveler and `agency_commission` is your commission as an amount: the amount debited from your balance is `total_price` minus `agency_commission`. A failed attempt is kept with the status `failed` and an ICCID that starts with `PENDING-`.

## Attributes

- `id` (string (uuid)): Internal id of the booking row (UUID). It is the `id` the account history returns.
- `booking_id` (string): The FX-Port booking reference, `FX-` followed by a number. Use it to look the booking up.
- `order_id` (string): The supplier's order code of the eSIM or of the topup.
- `status` (string): State of the booking: `confirmed`, or `failed` when the supplier refused the order (those rows have an ICCID that starts with `PENDING-`). One of `confirmed`, `failed`.
- `currency` (string): Currency of the amounts: the settlement currency of your agency.
- `total_price` (number): The price to charge the traveler.
- `agency_commission` (number): Your commission as an amount, in your agency currency. The amount debited from your balance is `total_price` minus this.
- `type` (string): `esim` for an order, `topup` for a topup. One of `esim`, `topup`.
- `package_name` (string): Name of the package, with the destination for an eSIM: `1 GB - 7 days • France`.
- `iccid` (string): The ICCID of the eSIM. A topup row carries the ICCID that was topped up.
- `customer_email` (string): The traveler's email address.
- `customer_first_name` (string): The traveler's first name.
- `customer_last_name` (string): The traveler's last name.
- `customer_phone` (string): The traveler's phone number.
- `provider_name` (string): Name of the supplier that fulfilled the booking.
- `supplier_id` (string): Id of the supplier that fulfilled the booking. Here `airalo`: the supplier list calls the same supplier `airalo_1`.
- `created_at` (string): When the booking was created: ISO 8601, UTC.
- `updated_at` (string): When the booking last changed: ISO 8601, UTC.
- `environment` (string): The environment of the booking. One of `sandbox`, `live`.

## Example

```json
{
  "id": "639417b4-b103-4ece-bd5d-850315322278",
  "booking_id": "FX-1793546602916",
  "order_id": "20261101-106852",
  "status": "confirmed",
  "currency": "DZD",
  "total_price": 468.84,
  "agency_commission": 50.24,
  "type": "esim",
  "package_name": "1 GB - 7 days • France",
  "iccid": "8900000540463077957",
  "customer_email": "traveler@example.com",
  "customer_first_name": "John",
  "customer_last_name": "Smith",
  "customer_phone": "+15555550123",
  "provider_name": "Airalo",
  "supplier_id": "airalo",
  "created_at": "2026-11-01T15:23:22.961228+00:00",
  "updated_at": "2026-11-01T15:23:22.961228+00:00",
  "environment": "sandbox"
}
```
