Complete guide to using the ISP Billing System
The ISP Billing System is a comprehensive multi-tenant billing and subscriber management platform designed specifically for Internet Service Providers. It automates billing, payment processing, and router management.
composer install
npm install
cp .env.example .env
php artisan key:generate
For SQLite (default):
touch database/database.sqlite
Or configure MySQL/PostgreSQL in your .env file.
php artisan migrate
Configure the following in your .env file:
# Application
APP_NAME="ISP Billing"
APP_ENV=local
APP_DEBUG=true
# Database
DB_CONNECTION=sqlite
# Or MySQL/PostgreSQL
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=isp_billing
# DB_USERNAME=root
# DB_PASSWORD=
# MPesa (Optional - can be set per ISP)
MPESA_CONSUMER_KEY=your_key
MPESA_CONSUMER_SECRET=your_secret
MPESA_PASSKEY=your_passkey
MPESA_SHORTCODE=your_shortcode
MPESA_ENVIRONMENT=sandbox
# Selcom (Optional - can be set per ISP)
SELCOM_API_KEY=your_key
SELCOM_API_SECRET=your_secret
SELCOM_VENDOR_ID=your_vendor_id
SELCOM_ENVIRONMENT=sandbox
# SMS (Vonage/Nexmo - Optional)
VONAGE_KEY=your_key
VONAGE_SECRET=your_secret
Connect to your MikroTik router via Winbox or SSH and run:
/ip service enable api
/ip service set api port=8728
/user add name=api-user password=strong-password group=full
Restrict API access to specific IP addresses:
/ip service set api address=192.168.1.0/24
In the ISP dashboard, navigate to Routers and add your router with:
.env.envSet up webhook URLs in your payment gateway dashboards:
https://test.pradytec.com/api/payments/mpesa/callbackhttps://test.pradytec.com/api/payments/selcom/callbackThe system provides RESTful API endpoints for programmatic access. All API endpoints require authentication using Laravel Sanctum.
Include the authentication token in the Authorization header:
Authorization: Bearer {your-token}
GET /api/isp/customers - List all customers
POST /api/isp/customers - Create customer
GET /api/isp/customers/{id} - Get customer details
PUT /api/isp/customers/{id} - Update customer
DELETE /api/isp/customers/{id} - Delete customer
POST /api/isp/customers/{id}/suspend - Suspend customer
POST /api/isp/customers/{id}/activate - Activate customer
POST /api/payments/initiate - Initiate payment
POST /api/payments/mpesa/callback - MPesa webhook (public)
POST /api/payments/selcom/callback - Selcom webhook (public)
POST /api/payments/{payment}/confirm-manual - Confirm manual payment
GET /api/isp/billing/invoices - List invoices
GET /api/isp/billing/payments - List payments
POST /api/isp/billing/generate-invoices - Generate invoices
GET /api/isp/billing/stats - Get billing statistics
Check router connection, verify speed profile exists on router, check router logs.
Ensure scheduled jobs are running, check subscription end dates, verify invoice generation settings.
Verify payment gateway credentials, check webhook configuration, review payment logs.