BambaWiFi API

REST API for vouchers, routers, and payments.

Authentication

POST /api/v1/auth/login

Log in with email and password. Returns a session cookie.

POST /api/v1/auth/register

Register a new user or agent.

POST /api/v1/auth/logout

End the current session.

Vouchers

GET /api/v1/vouchers/available

List all available vouchers for the current agent.

POST /api/v1/vouchers/generate

Generate new vouchers from a plan.

POST /api/v1/router-integration/connect-voucher

Redeem a voucher and grant internet access.

Routers

POST /api/v1/router-integration/heartbeat

Router status ping sent by MikroTik devices every 2 minutes.

GET /api/v1/router-integration/available

List all routers currently accepting new connections.

Payments

POST /api/v1/payments/mpesa-stk

Initiate an M-Pesa STK Push payment.

POST /api/v1/payments/mpesa-callback

Webhook for M-Pesa payment confirmations.

GET /api/v1/payments/status/<id>

Check the status of a payment by ID.

System

GET /health

Basic health check — returns status of the platform.

GET /api/v1/system/status

Detailed system status and service availability.

← Back to Home