# First Package

When a user of your website or app is eligible to receive a mobile data package (e.g., the user made a purchase of an inventory item, and you received the money), you can issue the first data package.

{% hint style="info" %}
The activation will use your credit balance on Gigastore. You can check for the history of activations here: <https://dent.giga.store/#/your-store/history>.
{% endhint %}

To activate, you need the following:

* **inventoryItemId** - see [offering-packages](https://docs.giga.store/api/offering-packages "mention")
* **metatag**, e.g. an internal transaction id (will be stored and can be retrieved via API)
* **customerEmail** - the email address of your customer (optional)
* **userIp** - current IP of the user&#x20;
* **userCountry** - country of residence (use ISO2 code)
* **expectedPrice** - the retail price of the package (optional)
* **activationMode** - type of package activations (optional) see [activation-modes](https://docs.giga.store/api/activation-modes "mention")

{% hint style="info" %}
To protect your payment flow, you can add the `expectedPrice` field. In this case, our API will check the price against the retail price of the inventory item. Only if the price matches will the API allow activation.
{% endhint %}

{% hint style="warning" %}
In order to ensure compliance with regional regulations, make sure to include user's IP and Country of Residence during the registration. &#x20;
{% endhint %}

```
POST /gigastore/activations/register

Request:
{
    "inventoryItemId": "00e3e46e-faa5-465a-9321-1234567890",
    "metatag": "Comment for reseller...",
    "customerEmail": "customer_email@test.com",
    "userIp": "123.45.67.89",
    "userCountry": "GR",
    "expectedPrice":{
            "sortIndex": 0,
            "priceValue": 9.99,
            "currencyCode": "USD"
    },
  "activationMode": "NOW"
}

Response:
{
  "status": "success",
  "activatedItem": {
    "balance": {
      "activatedAt": "2024-04-30T09:55:36.430Z",
      "expiresAt": "2024-04-30T09:55:36.430Z",
      "activationMode": "NOW",
      "name": "string",
      "size": {
        "sizeValue": 0,
        "sizeUnit": "TB"
      },
      "availableBalance": {
        "sizeValue": 0,
        "sizeUnit": "TB"
      },
      "validitySize": 365,
      "validityUnit": "years"
    },
    "uid": "string",
    "metatag": "Paid in cash",
    "salesChannel": "Application Programming Interface",
    "salesChannelTypeCode": "API",
    "activationType": "DATA_PLAN",
    "purchasePrice": {
      "sortIndex": 1,
      "priceValue": 4.99,
      "currencyCode": "USD"
    },
    "retailPrice": {
      "sortIndex": 1,
      "priceValue": 4.99,
      "currencyCode": "USD"
    }
  },
  "customer": {
    "email": "customer_email@test.com",
    "uid": "123234345-234-cbd2-9321-1234567890",
    "profileUrl": "string"
  },
  "esimProfile": {
    "iccid": "string",
    "uid": "string",
    "imsi": "string",
    "activationCode": "string",
    "appleUniversalLink": "string",
    "installationUrl": "string",
    "lastSeen": "2024-04-30T09:55:36.430Z",
    "activatedAt": "2024-04-30T09:55:36.430Z",
    "state": "RELEASED"
  }
}
```

During the activation, different entries are created in the background and returned from the API:

* a **customer** linked to your account
* an **activated item**, linked to your customer
* an **eSIM profile**, linked to your customer

To use the package, the customer needs to install the eSIM profile. Please check the [esim-profiles](https://docs.giga.store/api/esim-profiles "mention") section for details.

### Multiple Packages and eSIMs

Customers can have multiple activated items and multiple eSIM profiles. Please refer to the [customers](https://docs.giga.store/api/customers "mention") section of the documentation.
