FOSSBilling Documentation

website·Indexed 35 days ago

https://docs.fossbilling.org/

Documentation for FOSSBilling, an open-source billing and hosting management platform. Includes guides on core setup, server manager configurations for WHM, cPanel, CWP, and HestiaCP, and developer resources for creating themes, payment gateways, and modules. Covers API endpoints, event hooks, and system requirements including PHP 8.3+ and MariaDB 11.4+.

Tokens
30.5K
Snippets
89
Records
252
Agent score
65%

What's inside FOSSBilling

  1. Overview of Downloadable products in FOSSBilling

    Downloadable products allow the sale of digital files (e.g., software packages, ebooks, templates, or internal documents). After a successful checkout, customers can access and download these files directly from their account area. Key capabilities include tracking download counts per order and setting download limits.
  2. Overview of FOSSBilling Anti-Spam protections

    The Anti-Spam module reduces automated abuse by applying different checks to public and client actions. For maximum effectiveness, these protections should be used in combination.

    ProtectionApplies To
    IP blockingClient signup, ticket opening, client profile updates, client login, admin login
    CAPTCHAClient signup and ticket opening
    Stop Forum SpamClient signup and ticket opening
    Disposable email detectionClient signup and ticket opening
    HoneypotClient signup
  3. Select the appropriate FOSSBilling product type

    Product types in FOSSBilling determine the operational behavior for provisioning, renewal, delivery, and lifecycle management. You should choose a product type based on the required operational behavior rather than the label displayed to clients. Available types include:

    • Hosting: For selling hosting plans and provisioning accounts via server managers.
    • Domains: For domain registration, renewal, transfer, and management services.
    • Downloadable Products: For delivering files or digital downloads after purchase.
    • Licenses: For issuing and managing software licenses.
    • API Keys: For selling access credentials for API-backed services.
  4. Understand the Custom payment gateway workflow

    The Custom payment gateway is designed for manual payment methods (e.g., bank transfers, checks, cash) where FOSSBilling cannot automatically confirm the payment. The workflow is as follows:

    1. Client selects the Custom gateway during checkout/payment.
    2. FOSSBilling displays configured payment instructions.
    3. Client completes payment outside the system.
    4. Administrator verifies the payment manually.
    5. Administrator marks the invoice as paid and enters a transaction ID, which triggers the processing of the transaction.
  5. Select a compatible web server for FOSSBilling

    FOSSBilling is compatible with Apache (requires mod_rewrite), LiteSpeed/OpenLiteSpeed, and NGINX. If using a different web server, URL rewriting must be configured manually using the existing supported configurations as a reference.
  6. Understand the FOSSBilling payment gateway lifecycle

    The payment process in FOSSBilling follows a three-step lifecycle:

    1. Payment Initiation: When a client clicks "Pay", FOSSBilling calls the adapter's getHtml() method to render the payment form.
    2. Payment Processing: The external payment gateway processes the transaction.
    3. Verification: The gateway calls ipn.php, which triggers the adapter's processTransaction() method to verify and record the payment.
  7. Manage shared-hosting accounts with FOSSBilling

    Use hosting products in FOSSBilling to automate the creation and management of shared-hosting accounts via supported control panels. Key capabilities include selling hosting plans with automatic account creation, suspending/unsuspending accounts, and tracking bandwidth and disk usage.
  8. Access FOSSBilling community support and documentation

    FOSSBilling provides several resources for diagnosing problems and checking system capabilities:

    • Features & Functionality: Review what is currently implemented, planned, or under consideration.
    • Troubleshooting: Guides for resolving common problems and configuration issues.
    • FAQ: Answers to common project, production, contribution, and support questions.
    • Discord Community: Real-time discussion and community help via the official Discord server.
  9. FOSSBilling Development and Extension Overview

    FOSSBilling provides a set of tools and references for developers to extend the platform, integrate with external systems, or contribute code. Key development resources include the API Reference for automation, a JavaScript wrapper for API integrations, Event Hooks for reacting to system events, and Twig Filters/Functions for template customization. Developers should also refer to the official File Structure documentation to identify key extension points.
  10. Understand FOSSBilling API endpoint structure and access levels

    FOSSBilling uses a REST API with three primary entry points based on the required access level. The general endpoint structure is /api/{role}/{module}/{action}.

    EndpointAccess LevelPurpose
    /api/admin/*Admin onlySystem management
    /api/client/*Authenticated clientsClient services
    /api/guest/*PublicNo authentication needed
  11. Understand FOSSBilling core directory structure

    FOSSBilling organizes its source code within the /src directory. Key directories include:

    • /src/data: Runtime data storage for cache (compiled templates, API responses), logs, and user uploads (/data/uploads). This directory must be writable by the web server.
    • /src/public: Web-accessible core assets, including shared browser assets (/public/assets), branding (logos, favicons), and payment gateway icons (/public/gateways).
    • /src/install: The installation wizard (deleted after install unless APP_ENV=dev is set).
    • /src/locale: Translations, managed as a Git submodule.