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

# Детали eSIM заказа

> Возвращает детали заказа. Используйте для polling статуса после оплаты.

Статусы:
- `pending` — ожидает оплаты инвойса
- `provisioning` — оплата получена, eSIM создаётся
- `active` — eSIM активирован, QR-код и ICCID доступны в `esim`
- `failed` — ошибка активации

Когда `status` = `active`, поле `liveData` содержит актуальные данные об использовании трафика.



## OpenAPI

````yaml GET /api/v1/esim/{orderId}
openapi: 3.1.0
info:
  title: Tranzor API
  description: >-
    API для приёма криптовалютных платежей и ресселинга eSIM. Создавайте
    инвойсы, продавайте eSIM, отслеживайте статусы.
  version: 1.0.0
  contact:
    name: Tranzor Support
    url: https://tranzor.io
servers:
  - url: https://sand.tranzor.io
    description: Sandbox
security:
  - BearerAuth: []
  - HmacAuth: []
externalDocs:
  description: Полная документация
  url: https://docs.tranzor.io/
paths:
  /api/v1/esim/{orderId}:
    get:
      tags:
        - eSIM
      summary: Детали eSIM заказа
      description: >-
        Возвращает детали заказа. Используйте для polling статуса после оплаты.


        Статусы:

        - `pending` — ожидает оплаты инвойса

        - `provisioning` — оплата получена, eSIM создаётся

        - `active` — eSIM активирован, QR-код и ICCID доступны в `esim`

        - `failed` — ошибка активации


        Когда `status` = `active`, поле `liveData` содержит актуальные данные об
        использовании трафика.
      operationId: getEsimOrder
      parameters:
        - name: orderId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Детали заказа
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                      status:
                        type: string
                        enum:
                          - pending
                          - provisioning
                          - active
                          - failed
                        description: pending=ожидает оплаты, active=eSIM готов
                      plan:
                        type: object
                        description: 'Детали тарифа: country, dataGb, days, priceUsd'
                      esim:
                        type: object
                        nullable: true
                        description: Данные eSIM (доступны только когда status=active)
                        properties:
                          iccid:
                            type: string
                          qrcode:
                            type: string
                            description: LPA activation string
                          qrImage:
                            type: string
                            nullable: true
                            description: Base64 QR-код PNG
                          iosTapLink:
                            type: string
                            nullable: true
                            description: iOS прямая установка
                      liveData:
                        type: object
                        nullable: true
                        properties:
                          dataLeftMb:
                            type: number
                          dataPackageMb:
                            type: number
                          dataUsedMb:
                            type: number
                          expiresAt:
                            type: string
                            nullable: true
                          statusQr:
                            type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Не авторизован
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                example: Invalid API key
    NotFound:
      description: Не найдено
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              error:
                type: string
                example: Invoice not found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API ключ в формате `trz_...`
    HmacAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |-
        HMAC аутентификация. Требуются заголовки:
        - `X-API-Key` — ваш API ключ
        - `X-Timestamp` — текущий unix timestamp (секунды, ±5 мин)
        - `X-Signature` — HMAC-SHA256 подпись

        Строка для подписи: `{timestamp}{METHOD}{path}{body}`
        Ключ подписи: `Secret Key` (выдаётся при создании API ключа)

````