> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.imbawallet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eSIM

> Offers, purchase, top up, and activation data.

# eSIM

Scope: `esim:*` (or the specific eSIM scopes issued to you).

Catalog availability is controlled per tenant. If the catalog is disabled, list returns `offers: []` and purchase returns `503` / `catalog_disabled`.

## List offers

```http theme={null}
GET https://api.imbawallet.com/partner/esim-offers?country=TR&limit=50
Authorization: Bearer <access_token>
```

| Query     | Notes                       |
| --------- | --------------------------- |
| `country` | Optional ISO country filter |
| `limit`   | Page size (max 50)          |
| `cursor`  | Pagination                  |

```json theme={null}
{
  "offers": [
    {
      "offer_id": "esim-tr-5gb-30d",
      "country": "TR",
      "title": "Turkey 5GB / 30 days",
      "data_mb": 5120,
      "validity_days": 30,
      "price_usdt": "8.50",
      "currency": "USDT"
    }
  ],
  "next_cursor": null,
  "request_id": "019d0120-7b59-7eab-b837-a7af38ea3db2"
}
```

`price_usdt` is the amount debited from your settlement balance.

## Purchase

```http theme={null}
POST https://api.imbawallet.com/partner/esims
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "ext_id": "esim-20260710-001",
  "offer_id": "esim-tr-5gb-30d"
}
```

### Response `202`

```json theme={null}
{
  "ext_id": "esim-20260710-001",
  "esim_id": "019d0140-aaaa-7bbb-8ccc-111122223333",
  "offer_id": "esim-tr-5gb-30d",
  "debit_amount": "8.50",
  "debit_currency": "USDT",
  "status": "pending",
  "created_at": "2026-07-10T10:00:00.000Z",
  "request_id": "019d0120-7b59-7eab-b837-a7af38ea3db2"
}
```

Webhook `esim_purchase.status_changed` includes status and ids — **never LPA**.\
Fetch activation via GET below.

Errors: `catalog_disabled`, `unknown_offer` / `offer_unavailable`, `insufficient_balance`, `ext_id_conflict`.

## Top up

```http theme={null}
POST https://api.imbawallet.com/partner/esims/{esim_id}/topups
Content-Type: application/json

{
  "ext_id": "esim-topup-20260710-002",
  "offer_id": "esim-tr-3gb-15d"
}
```

Debit from settlement balance. Terminal webhook: `esim_topup.status_changed` (no LPA).

## Get eSIM (activation + usage)

```http theme={null}
GET https://api.imbawallet.com/partner/esims/{esim_id}
Authorization: Bearer <access_token>
```

```json theme={null}
{
  "esim_id": "019d0140-aaaa-7bbb-8ccc-111122223333",
  "ext_id": "esim-20260710-001",
  "status": "active",
  "offer_id": "esim-tr-5gb-30d",
  "country": "TR",
  "iccid": "8999…",
  "activation": {
    "lpa": "LPA:1$…",
    "qr_available": true
  },
  "usage": {
    "data_total_mb": 5120,
    "data_used_mb": 1280,
    "data_remaining_mb": 3840,
    "valid_from": "2026-07-10T10:01:00.000Z",
    "valid_to": "2026-08-09T10:01:00.000Z",
    "as_of": "2026-07-12T08:00:00.000Z"
  },
  "created_at": "2026-07-10T10:00:00.000Z",
  "updated_at": "2026-07-12T08:00:00.000Z",
  "request_id": "019d0120-7b59-7eab-b837-a7af38ea3db2"
}
```

Deliver `activation` to your end customer yourself. Do not put LPA in logs or webhooks.
