REST API · v1

Bus Booking API
for Cameroon

Integrate real-time schedules, seat booking, and mobile money payments into your system in minutes.

Get started View endpoints
50+
REST endpoints
JWT
Token auth
MoMo
MTN & Orange
JSON
All responses
XAF
Default currency

What you can build

A full-stack booking platform powering routes across Cameroon.

Search & Schedules

Query upcoming departures, filter by company or date, retrieve real-time seat availability.

Booking Management

Create, confirm, and cancel bookings. Handle seat assignment, expiry, and lifecycle states.

Mobile Money Payments

Initiate MTN MoMo and Orange Money charges. Track status and reconcile timed-out transactions.

User & Company Auth

Register passengers, onboard operators, manage roles, and handle approval workflows.

Receipts & Tickets

Download PDF boarding passes, verify QR-coded tickets, and regenerate receipts.

Reports & Analytics

Pull revenue summaries, booking counts, and export CSV data for any date range.

Quick start

Three requests to go from zero to a confirmed booking.

1

Register or log in

Obtain a JWT token. Send it as Authorization: Bearer <token> on every authenticated request.

2

Search for a trip

Call the public search endpoint (no auth). Returns upcoming departures with fare, seats, and company info.

3

Book & pay

POST the schedule ID to /bookings, then POST to /bookings/{id}/pay with a valid MTN or Orange number.

POST /api/v1/auth/register
curl -X POST "https://wakkaapi.benorinetechnologies.com/api/v1/auth/register" \
  -H "Content-Type: application/json" \
  -d '{"first_name":"Alice","last_name":"Mbarga","email":"alice@example.cm",
     "phone_number":"677123456","password":"Secure1!",
     "password_confirmation":"Secure1!",
     "terms_accepted":true,"privacy_accepted":true}'
GET /api/v1/search/schedules
curl "https://wakkaapi.benorinetechnologies.com/api/v1/search/schedules?origin=Douala&destination=Yaound%C3%A9&departure_date=2026-07-01"
POST /api/v1/bookings/{id}/pay
curl -X POST "https://wakkaapi.benorinetechnologies.com/api/v1/bookings/42/pay" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ "phone": "677123456" }'
The phone for payments must be an MTN (65X, 67X, 68X) or Orange (69X) Cameroon number.

Authentication

WakkaBus uses JWT. Tokens expire after 60 minutes; refresh within 48 hours.

MethodEndpointDescriptionAuth
POST/api/v1/auth/registerRegister passengerNo
POST/api/v1/auth/loginObtain JWTNo
POST/api/v1/refreshRefresh expiring tokenYes
POST/api/v1/logoutInvalidate tokenYes
GET/api/v1/userCurrent userYes

Core endpoints

All responses: { success, data, message, timestamp }

MethodEndpointDescription
Search (public)
GET/api/v1/search/schedulesSearch departures by origin, destination, date
GET/api/v1/search/upcomingAll upcoming departures within N days
GET/api/v1/browse/routesAll active routes
GET/api/v1/schedules/{id}/availabilitySeat map and available count
Bookings
POST/api/v1/bookingsCreate booking
GET/api/v1/bookingsList passenger bookings
POST/api/v1/bookings/{id}/payInitiate mobile money payment
POST/api/v1/bookings/{id}/cancelCancel booking
GET/api/v1/bookings/{id}/receipt.pdfDownload boarding pass PDF
Tickets & Platform
POST/api/v1/tickets/verifyVerify ticket by QR or booking reference
GET/api/v1/dashboard/adminRevenue and booking KPIs
GET/api/v1/reports/bookingsCSV export of bookings
GET/api/v1/healthSystem health check
GET/api/v1/configPublic platform config

Production setup

For system administrators deploying WakkaBus in production.

1 — Prerequisites

PHP 8.3+, MySQL 8.0+, Composer 2.x, HTTPS domain, SMTP server (port 465, SSL).

2 — Environment

Copy .env.example.env. Set APP_KEY, JWT_SECRET, DB credentials, MAIL_SCHEME=smtps.

3 — Database

Run php artisan migrate --force. Optionally seed with php artisan db:seed.

4 — Queue worker

Set QUEUE_CONNECTION=database. Add cron: * * * * * php artisan queue:work --stop-when-empty --max-time=55

5 — Cache

After every deploy: php artisan config:cache && php artisan route:cache

6 — Health check

Hit GET /api/v1/health — HTTP 200 all systems pass, 503 on failure.

Minimal .env (production)
APP_ENV=production
APP_DEBUG=false
APP_URL=https://your-api-domain.cm
FRONTEND_URL=https://your-frontend-domain.cm
DB_CONNECTION=mysql
QUEUE_CONNECTION=database
MAIL_SCHEME=smtps
MAIL_PORT=465
JWT_TTL=60
JWT_BLACKLIST_ENABLED=true

Response format

Every response uses a consistent envelope.

Success · 200
{ "success": true, "message": "Booking created.",
  "data": { /* resource */ }, "timestamp": "2026-07-01T08:00:00Z" }
Error · 422
{ "success": false, "responseCode": 422,
  "message": "Validation failed.",
  "errors": { "phone": ["Must be MTN or Orange."] } }