Technical Documentation

BillFi Setup & FreeRADIUS Integration Docs

Everything your network engineers need to deploy BillFi, connect MikroTik/Cisco/Juniper NAS routers, configure CoA attributes, and activate payment webhooks.

MikroTik RouterOS RADIUS & CoA Setup

Connect any MikroTik RouterOS v6 or v7 NAS to BillFi in under 2 minutes.

Configure your MikroTik router to authenticate PPPoE/Hotspot users against BillFi FreeRADIUS and accept real-time CoA disconnects and dynamic speed changes on UDP port 3799.

MikroTik RouterOS CLI
/radius add service=ppp,hotspot address=YOUR_BILLFI_IP secret="YOUR_STRONG_SECRET" timeout=3000ms
/radius incoming set accept=yes port=3799
/ppp aaa set use-radius=yes accounting=yes interim-update=5m
/ip hotspot profile set [find default=yes] use-radius=yes

Cisco & Juniper BNG Integration

Carrier-grade AAA & Framed-Pool integration for multi-NAS ISP cores.

BillFi supports standard RFC-2865 / RFC-2866 / RFC-5176 RADIUS attributes along with custom Cisco-AVPair and Juniper ERX vendor-specific attributes (VSAs).

Cisco IOS-XE AAA Snippet
aaa new-model
radius server BILLFI_CORE
 address ipv4 YOUR_BILLFI_IP auth-port 1812 acct-port 1813
 key YOUR_STRONG_SECRET
aaa authentication ppp default group radius
aaa authorization network default group radius
aaa accounting network default start-stop group radius

Custom RADIUS Attributes & FUP Quotas

Define Mikrotik-Rate-Limit, Framed-IP-Address, and automatic FUP throttles.

Attach Check/Reply attributes at the package group or individual subscriber level to control burst speeds, time-of-day upgrades, static IPv4/IPv6 leases, and FUP fallback rates.

Sample BillFi Reply Attributes
Mikrotik-Rate-Limit   := "50M/50M 75M/75M 40M/40M 15/15 8 25M/25M"
Framed-Pool           := "billfi-pool-dhaka-01"
Framed-IP-Address     := "103.112.41.18"
Session-Timeout       := 86400
Mikrotik-Total-Limit  := 536870912000

Payment Gateways & WhatsApp Webhooks

Enable instant auto-reconnection on bKash, Nagad, SSLCommerz, EasyPaisa, JazzCash & Stripe.

Enter your merchant API credentials under Settings → Payment Gateways (or per Dealer under Dealer → Integrations). On verified callback, BillFi marks the invoice paid, extends expiry, and fires a RADIUS CoA packet automatically.

Webhook Endpoint Pattern
POST https://billing.yourisp.com/api/v1/webhooks/payments/{gateway}
Headers:
  X-BillFi-Signature: sha256=<hmac_payload>
  Content-Type: application/json