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

# Purchase data using network ID

> Alias of `/purchase` for integrations that use numeric network IDs and `phone`.



## OpenAPI

````yaml /openapi.yaml post /data/purchase
openapi: 3.0.3
info:
  title: OnePanel API
  version: 1.0.0
  description: API for OnePanel data vending and transaction management.
servers:
  - url: https://api.onepanel.ng/api/v1
    description: Production
security: []
tags:
  - name: Catalog
  - name: Purchases
  - name: Transactions
  - name: Account
paths:
  /data/purchase:
    post:
      tags:
        - Purchases
      summary: Purchase data using network ID
      description: >-
        Alias of `/purchase` for integrations that use numeric network IDs and
        `phone`.
      operationId: purchaseDataAlias
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PurchaseRequest'
                - type: object
                  properties:
                    network_id:
                      type: integer
                      example: 1
                    phone:
                      type: string
                      example: '07068765000'
      responses:
        '200':
          description: Purchase completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurchaseResponse'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    PurchaseRequest:
      type: object
      required:
        - plan_id
        - recipient
      properties:
        carrier:
          type: string
          enum:
            - mtn
            - glo
            - airtel
            - 9mobile
          example: mtn
        plan_id:
          type: string
          description: Current catalog plan ID
          example: '1650'
        recipient:
          type: string
          description: Nigerian recipient phone number
          example: '07068765000'
        sim_id:
          type: string
          description: Optional connected SIM ID
    PurchaseResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        tx_id:
          type: string
          example: TX_MTN_8F32A1BC
        transaction_id:
          type: string
          example: TX_MTN_8F32A1BC
        status:
          type: string
          example: Success
        message:
          type: string
          example: Bundle purchase successful
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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