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

# Top up eSIM

> Add another data plan to an eSIM you already own. Only plans where topup_supported is true can be used. Wallet is debited; a failed top-up auto-refunds.

Adds another data plan to an eSIM the customer already owns — no new QR code needed.

* `esim_id` is the **`id`** of an existing eSIM from [My eSIMs](https://docs.bilalsadasub.com/reference/esim-my.md).
* `plan_id` is any plan from [List eSIM Plans](https://docs.bilalsadasub.com/reference/esim-plans.md) whose **`topup_supported`** is `true`.
* The wallet is debited at the plan's `price_ngn`; a failed top-up is **auto-refunded**.


## OpenAPI

````yaml POST /api/esim/topup
openapi: 3.1.0
info:
  title: Bilalsadasub API
  version: 1.0.0
  description: >-
    Bilalsadasub developer API — buy data, airtime, cable, electricity, bulk
    SMS, exam pins, airtime-to-cash and flights, funded from your wallet.
servers:
  - url: https://bilalsadasub.com
    description: Production (live — charges your wallet)
security:
  - TokenAuth: []
tags:
  - name: Purchases
  - name: Verification
  - name: Betting
  - name: eSIM
  - name: Flights
  - name: Wallet
  - name: Catalogs
  - name: Account
paths:
  /api/esim/topup:
    post:
      tags:
        - eSIM
      summary: Top up eSIM
      description: >-
        Add another data plan to an eSIM you already own. Only plans where
        topup_supported is true can be used. Wallet is debited; a failed top-up
        auto-refunds.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                esim_id:
                  type: integer
                  description: ID of your existing eSIM (from My eSIMs)
                plan_id:
                  type: integer
                  description: Top-up plan ID from List eSIM Plans
                request-id:
                  type: string
                  description: Optional unique idempotency key
              required:
                - esim_id
                - plan_id
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      transid:
                        type: string
                        description: Transaction reference
                      iccid:
                        type: string
                        description: ICCID the top-up was applied to
                      newbal:
                        type: number
                        description: Wallet balance after the debit
              example:
                status: success
                message: 'Top-up successful: USA 5GB / 30 Days'
                data:
                  transid: ES_9z8y7x
                  iccid: '8910300000000123456'
                  newbal: 103025.5
components:
  securitySchemes:
    TokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your API key as `Token <your_api_key>`.


        Use your **live key** for real transactions, or your **sandbox key**
        (`sk_test_…`) to test — sandbox calls return a realistic simulated
        result and never touch your wallet. Add `"sandbox_status": "fail"` to
        any sandbox request to simulate a failure.

````

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