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

# Airtime to Cash

> Convert MTN/Airtel airtime to wallet cash via a 3-step Share-and-Sell flow (Tier 2+ KYC required).

- **Step 1** `{step:1, network, phone}` — start; an OTP is sent and a verification `data` token is returned.
- **Step 2** `{step:2, network, phone, otp, data}` — verify the OTP.
- **Step 3** `{step:3, network, phone, data, share_pin, amount}` — complete; your wallet is credited.



## OpenAPI

````yaml POST /api/cash
openapi: 3.1.0
info:
  title: mySubwallet API
  version: 1.0.0
  description: >-
    Buy data, airtime, cable, electricity, exam pins, bulk SMS, betting, eSIM,
    flights, recharge/data cards and more, funded from your wallet. Test
    everything safely with your sandbox (sk_test_) key — no wallet charge.
servers:
  - url: https://api.mysubwallet.ng
    description: Production (live — charges your wallet)
  - url: https://sandbox.mysubwallet.ng
    description: Sandbox (test — simulated, no wallet charge)
security:
  - TokenAuth: []
tags:
  - name: Purchases
  - name: Verification
  - name: Betting
  - name: eSIM
  - name: Flights
  - name: Wallet
  - name: Catalogs
  - name: Account
paths:
  /api/cash:
    post:
      tags:
        - Wallet
      summary: Airtime to Cash
      description: >-
        Convert MTN/Airtel airtime to wallet cash via a 3-step Share-and-Sell
        flow (Tier 2+ KYC required).


        - **Step 1** `{step:1, network, phone}` — start; an OTP is sent and a
        verification `data` token is returned.

        - **Step 2** `{step:2, network, phone, otp, data}` — verify the OTP.

        - **Step 3** `{step:3, network, phone, data, share_pin, amount}` —
        complete; your wallet is credited.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - step
                - network
                - phone
              properties:
                step:
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
                  example: 1
                network:
                  type: integer
                  description: Network plan ID (MTN or Airtel only).
                  example: 1
                phone:
                  type: string
                  example: '2347013397088'
                otp:
                  type: string
                  description: Step 2 — OTP received from the network.
                  example: '123456'
                data:
                  type: string
                  description: >-
                    Steps 2 & 3 — verification token returned by the previous
                    step.
                share_pin:
                  type: string
                  description: Step 3 — your 4-digit network Share-and-Sell PIN.
                  example: '1234'
                amount:
                  type: number
                  description: Step 3 — airtime amount to convert.
                  example: 1000
      responses:
        '200':
          description: Result
          content:
            application/json:
              example:
                status: success
                message: Airtime converted. Your wallet has been credited.
                newbal: 111000
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.

````