📘 VTU Business API Documentation

Introduction

Welcome to the VTU Business API. Our API allows developers to integrate airtime top-up, data purchase, and SMS services into their own applications. All requests must be authenticated with your API Key.

GET Balance

Retrieve your wallet balance.

GET /api/v1/balance
Headers:
  Authorization: Bearer YOUR_API_KEY

Response:
{
  "status": "success",
  "balance": "5000.00"
}

POST Airtime Purchase

Send airtime to a phone number.

POST /api/v1/airtime
Headers:
  Authorization: Bearer YOUR_API_KEY
  Content-Type: application/json

Body:
{
  "network": "MTN",
  "phone": "08012345678",
  "amount": 100
}

Response:
{
  "status": "success",
  "transaction_id": "TXN123456"
}

POST Send SMS

Send an SMS message to any number.

POST /api/v1/sms
Headers:
  Authorization: Bearer YOUR_API_KEY
  Content-Type: application/json

Body:
{
  "to": "08012345678",
  "message": "Hello from VTU Business!"
}

Response:
{
  "status": "success",
  "message_id": "MSG987654"
}

GET Transaction History

Fetch all your previous transactions.

GET /api/v1/transactions
Headers:
  Authorization: Bearer YOUR_API_KEY

Response:
{
  "status": "success",
  "transactions": [
    {"id": "TXN123", "type": "airtime", "amount": 100, "status": "success"},
    {"id": "TXN124", "type": "data", "amount": 500, "status": "pending"}
  ]
}