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

# Buy Data Card

> Generate data card pin(s). Your wallet is charged `unit price (your tier) × quantity`; a failed vend auto-refunds. The printed pins are attached to the transaction and retrievable from your dashboard / transaction history.



## OpenAPI

````yaml POST /api/data_card
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/data_card:
    post:
      tags:
        - Recharge & Data Cards
      summary: Buy Data Card
      description: >-
        Generate data card pin(s). Your wallet is charged `unit price (your
        tier) × quantity`; a failed vend auto-refunds. The printed pins are
        attached to the transaction and retrievable from your dashboard /
        transaction history.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                network:
                  type: integer
                  description: Network plan_id (from List Networks)
                plan_type:
                  type: string
                  description: The card plan_id for the chosen denomination
                card_name:
                  type: string
                  description: Card/denomination label
                quantity:
                  type: integer
                  description: Number of pins to generate (1–100)
                  minimum: 1
                  maximum: 100
                pin:
                  type: string
                  description: 4-digit transaction PIN (WEBSITE only, if enabled)
                request-id:
                  type: string
                  description: Unique idempotency key
              required:
                - network
                - plan_type
                - card_name
                - quantity
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  network:
                    type: string
                  request-id:
                    type: string
                  transid:
                    type: string
                    description: Transaction reference
                  amount:
                    type: number
                    description: Total charged
                  quantity:
                    type: integer
                  status:
                    type: string
                  message:
                    type: string
                  card_name:
                    type: string
                  oldbal:
                    type: number
                  newbal:
                    type: number
                  system:
                    type: string
                  serial:
                    type: string
                    description: Comma-separated serial numbers, one per pin
                  pin:
                    type: string
                    description: Comma-separated card pins
                  load_pin:
                    type: string
                    description: How to load the pin (USSD/instructions)
                  check_balance:
                    type: string
                    description: How to check balance (USSD)
              example:
                network: MTN
                request-id: DC_1a2b3c
                transid: DC_1a2b3c
                amount: 1000
                quantity: 2
                status: success
                message: MTN data card purchase successful.
                card_name: MTN N500
                oldbal: 92250
                newbal: 91250
                system: API
                serial: 6011223344,6011223355
                pin: 123456789012345,234567890123456
                load_pin: '*555*PIN#'
                check_balance: '*556#'
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.