# The eSIM package object

> An eSIM package is a data plan you can sell: its data allowance, validity, destination, network operator and the prices for your agency.

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

The catalog returns it with the supplier's country and operator facts flattened into `country_*` and `operator_*` keys.

Four amounts describe the price. `price` is the base price before your commission, `total_price` and `retail_price` are what you charge the traveler, and `balance_debit_amount` is what is debited from your balance when you order. Read the eSIM pricing guide before you compute anything from them.

## Attributes

- `id` (string, deprecated): Legacy name: use `package_id`. Package id. Send it as `package_id` when you create an order. Always read it from the catalog: ids change when suppliers change their offer. The older name of `package_id`: same value, use `package_id`.
- `package_id` (string): Package id. Send it as `package_id` when you create an order. Always read it from the catalog: ids change when suppliers change their offer. The snake_case twin of `id`, with the same value: use this name.
- `type` (string): Always `sim`: the package is sold as a new eSIM.
- `price` (number, deprecated): Legacy name: use `base_price`. Base price in your agency currency, before your commission. It is not what is debited from your balance: use `balance_debit_amount`. The older name of `base_price`: same value, use `base_price`.
- `base_price` (number): Base price in your agency currency, before your commission. It is not what is debited from your balance: use `balance_debit_amount`. The snake_case twin of `price`, with the same value: use this name.
- `amount` (integer): Data allowance in megabytes. `0` means unlimited: check `is_unlimited`.
- `day` (integer): Validity in days. It starts at the first use of the eSIM or at installation, see `operator_activation_policy`.
- `is_unlimited` (boolean): `true` for unlimited-data packages.
- `title` (string): Label of the package: data allowance and validity, in the language of the request.
- `is_fair_usage_policy` (boolean): Whether a fair usage policy applies. A boolean on limited packages and `0` or `1` on unlimited ones: treat `0` as false and `1` as true.
- `fair_usage_policy` (string, nullable): The fair usage terms, for example the speed after a daily threshold. Null when no policy applies.
- `data` (string): Data allowance as text, for example `1 GB` or `Unlimited`.
- `voice` (integer, nullable): Voice minutes included. Null for data-only packages.
- `text` (integer, nullable): SMS included. Null for data-only packages.
- `country_name` (string): Destination country or region name, in the language of the request.
- `country_code` (string): Destination country code (ISO 3166-1 alpha-2). An empty string for regional and worldwide bundles, whose `country_slug` is the region, for example `europe`.
- `country_slug` (string): Destination slug. Send it as the `country` filter of the catalog.
- `country_image_url` (string, nullable): Flag or destination image, for display.
- `operator_name` (string): Name of the mobile network operator or brand the package runs on.
- `operator_id` (integer): Identifier of the operator.
- `operator_style` (string, nullable): Display hint: `light` or `dark` text on the operator's colors.
- `operator_gradient_start` (string, nullable): First color of the operator's gradient, as a hex value.
- `operator_gradient_end` (string, nullable): Second color of the operator's gradient, as a hex value.
- `operator_type` (string): Scope of the package: `local` for one country, `global` for regional and worldwide bundles. There is no `regional` value. One of `local`, `global`.
- `operator_is_prepaid` (boolean): Whether the underlying plan is prepaid.
- `operator_esim_type` (string): Type of the plan, for example `Prepaid`.
- `operator_warning` (string, nullable): A caution to show the traveler before the sale. Null when there is none.
- `operator_apn_type` (string): `automatic` or `manual`: whether the APN is configured by the eSIM profile or entered by the traveler.
- `operator_is_roaming` (boolean): Whether the package works through roaming rather than a local profile.
- `operator_info` (array of string): Short facts about the network, the technology and whether the eSIM can be recharged.
- `operator_image_url` (string, nullable): Logo of the operator.
- `operator_plan_type` (string): Kind of plan, for example `data` for a data-only plan.
- `operator_activation_policy` (string): When validity starts, for example `first-usage`: at the first connection, not at purchase.
- `operator_is_kyc_verify` (boolean): Whether the destination requires identity verification for this operator. Rare.
- `operator_rechargeability` (boolean): Whether the eSIM can be topped up, see the topup guide.
- `operator_other_info` (string, nullable): Longer notes on coverage and exclusions, for example territories that are not covered.
- `operator_coverages` (array of object): Countries covered, with their networks.
  - `name` (string): Country or area name as the supplier lists it.
  - `code` (string): Country code (ISO 3166-1 alpha-2) or area code.
  - `networks` (array of object): Networks the eSIM can use in this country, with their technologies.
    - `name` (string): Name of the mobile network.
    - `types` (array of string): Technologies the network offers in this country.
- `operator_apn` (object, nullable): APN settings per operating system.
  - `ios` (object): Access point name (APN) settings for one operating system.
    - `apn_type` (string): `automatic` when the device configures the access point name by itself, `manual` when the traveler has to enter it.
    - `apn_value` (string, nullable): The access point name to enter on a manual setup; null or `N/A` when none is needed.
  - `android` (object): Access point name (APN) settings for one operating system.
    - `apn_type` (string): `automatic` when the device configures the access point name by itself, `manual` when the traveler has to enter it.
    - `apn_value` (string, nullable): The access point name to enter on a manual setup; null or `N/A` when none is needed.
- `is_regional` (boolean): Always `false`. Regional bundles are `global` packages: check `operator_type`.
- `is_global` (boolean): `true` when `operator_type` is `global`.
- `retail_price` (number): The price to charge the traveler, in your agency currency. Equal to `total_price`.
- `total_price` (number): The price to charge the traveler, in your agency currency. It includes your commission.
- `balance_debit_amount` (number, deprecated): Legacy name: use `b2b_price`. The amount debited from your agency balance when you order this package. `total_price` minus this amount is your commission. The older name of `b2b_price`: same value, use `b2b_price`.
- `b2b_price` (number): The amount debited from your agency balance when you order this package. `total_price` minus this amount is your commission. The snake_case twin of `balance_debit_amount`, with the same value: use this name.
- `agency_commission` (string): Your commission rate as text, for example `12 %`; `0 %` for contracted corporate agencies. Bookings carry the commission as an amount.
- `commission_rate` (number): Your commission rate as a number: `12` for a standard agency, `0` for a contracted corporate agency. Same rate as `agency_commission`.
- `currency` (string): Currency of every amount on the package: the settlement currency of your agency.
- `supplier_currency` (string): Currency the supplier prices the package in.
- `exchange_rate` (number): Rate used to convert `supplier_currency` to your agency currency.

## Example

```json
{
  "id": "france-in-7days-1gb",
  "package_id": "france-in-7days-1gb",
  "type": "sim",
  "price": 402.5,
  "base_price": 402.5,
  "amount": 1024,
  "day": 7,
  "is_unlimited": false,
  "title": "1 GB - 7 days",
  "is_fair_usage_policy": false,
  "fair_usage_policy": null,
  "data": "1 GB",
  "voice": null,
  "text": null,
  "country_name": "France",
  "country_code": "FR",
  "country_slug": "france",
  "country_image_url": "https://cdn-revamp.airalo.com/images/9753dedb-d495-47cf-b6e4-82e555564743.png",
  "operator_name": "KPN France Data only",
  "operator_id": 1704,
  "operator_style": "dark",
  "operator_gradient_start": "#F1D4FB",
  "operator_gradient_end": "#EEC0FF",
  "operator_type": "local",
  "operator_is_prepaid": false,
  "operator_esim_type": "Prepaid",
  "operator_warning": null,
  "operator_apn_type": "automatic",
  "operator_is_roaming": true,
  "operator_info": [
    "Data-only eSIM.",
    "Rechargeable online with no expiry."
  ],
  "operator_image_url": "https://cdn-revamp.airalo.com/images/01b47d41-fbb4-4032-8f5a-d1ca6a0f3688.png",
  "operator_plan_type": "data",
  "operator_activation_policy": "first-usage",
  "operator_is_kyc_verify": false,
  "operator_rechargeability": true,
  "operator_other_info": "Covers metropolitan (mainland) France and Corsica. Does not include overseas territories (Guadeloupe, Martinique, Reunion, ...",
  "operator_coverages": [
    {
      "name": "FR",
      "code": "FR",
      "networks": [
        {
          "name": "Orange",
          "types": [
            "5G"
          ]
        }
      ]
    }
  ],
  "operator_apn": {
    "ios": {
      "apn_type": "automatic",
      "apn_value": null
    },
    "android": {
      "apn_type": "automatic",
      "apn_value": null
    }
  },
  "is_regional": false,
  "is_global": false,
  "retail_price": 468.84,
  "total_price": 468.84,
  "balance_debit_amount": 418.6,
  "b2b_price": 418.6,
  "agency_commission": "12 %",
  "commission_rate": 12,
  "currency": "DZD",
  "supplier_currency": "USD",
  "exchange_rate": 250
}
```
