> ## 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.

# Purchase one eSIM

> Single-item compatibility entry point. Prefer esim_purchase; quantity is not a bulk request on this method. 



## OpenAPI

````yaml /openapi/partner.openapi.yaml post /api/partner/esim_purchase_one
openapi: 3.1.0
info:
  title: IMBA Partner API
  version: 1.1.0
  summary: B2B Partner API for USDT settlement, cards, eSIM, gift cards, and KYT
  description: |
    B2B Partner API. Production host `https://imbawallet.com` (no sandbox).

    - Human docs: `https://api-docs.imbawallet.com` (guides + FAQ)
    - Authenticate with `POST /auth/v1/partner/token` (assertion JWT), then call
      `POST /api/partner/<function>` with `Authorization: Bearer <access_token>`
      and a JSON body. Resource ids are body fields, not URL segments.
    - Amounts are decimal strings.
    - Response timestamps are UTC RFC 3339 with `Z`.
    - Request time fields accept RFC 3339 or unix seconds (not milliseconds).
    - Catalog calls (`/api/partner/gift_offers`, `/api/partner/esim_offers`,
      `/api/partner/card_products`) are live availability and the live USDT price.
      There is no `/quote` or `/availability` path.
    - Order lookup: `POST /api/partner/document_get`. Secrets via product calls
      after fulfillment (card JWE, gift `epin`, eSIM LPA) — not in webhooks
      except `card.otp`.
    - Not in v1: purchase refund/cancel, card unfreeze, card replacement,
      card merchant transaction history.
  contact:
    name: IMBA Partner Support
    email: support@imbawallet.com
  license:
    name: Proprietary
    url: https://imbawallet.com
servers:
  - url: https://imbawallet.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Assertion JWT → access token
  - name: Balance
    description: Partner settlement balance
  - name: Deposit
    description: Sticky USDT TRC-20 deposit address
  - name: Withdrawals
    description: USDT withdrawals from partner balance
  - name: Cards
    description: Card catalog, issue, list, secrets, topup, freeze
  - name: eSIM
    description: eSIM offers, purchase, topup
  - name: Gift cards
    description: Gift offers and purchases
  - name: Batch
    description: Mixed create cart (best-effort per item)
  - name: Documents
    description: Poll async documents by ext_id
  - name: Reconciliation
    description: Ledger lines for partner books
  - name: KYT
    description: Crypto-address screening, quotes and owned check history
paths:
  /api/partner/esim_purchase_one:
    post:
      tags:
        - eSIM
      summary: Purchase one eSIM
      description: >-
        Single-item compatibility entry point. Prefer esim_purchase; quantity is
        not a bulk request on this method. 
      operationId: purchaseOnePartnerEsim
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - ext_id
                - offer_id
              properties:
                ext_id:
                  $ref: '#/components/schemas/ExtId'
                offer_id:
                  type: string
                quantity:
                  type: integer
                  minimum: 1
                  maximum: 20
                  default: 1
                  description: Issue N purchases (ext_id, ext_id#2, …)
      responses:
        '202':
          description: Purchase accepted (single or quantity items[])
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsimPurchaseResponse'
        '409':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
components:
  schemas:
    ExtId:
      type: string
      minLength: 1
      maxLength: 128
      description: Partner-side idempotency key (unique per partner)
      example: card-issue-20260710-003
    EsimPurchaseResponse:
      type: object
      properties:
        ext_id:
          $ref: '#/components/schemas/ExtId'
        esim_id:
          type: string
        offer_id:
          type: string
        debit_amount:
          $ref: '#/components/schemas/DecimalString'
        debit_currency:
          type: string
          example: USDT
        status:
          type: string
        created_at:
          type: string
          format: date-time
    DecimalString:
      type: string
      pattern: ^-?\d+(\.\d+)?$
      example: '12.50'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: insufficient_balance
        message:
          type: string
          description: Optional human-readable explanation; handle the stable error code
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token from POST /auth/v1/partner/token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.