Invoice Ninja

Self-hostable invoicing, time-tracking, and multi-gateway payment platform for freelancers and small businesses, with built-in e-invoicing compliance for EU and global standards.

9.9Kstars
2.7Kforks
Custom / Unknown
PHP

Invoice Ninja is a source-available, Laravel-based platform that gives freelancers, consultants, and small businesses a complete billing system they own and control. From branded invoice creation and automated payment reminders to multi-currency quotes, recurring billing, and client portals, it covers the full revenue cycle in a single application.

The platform ships with 47 payment gateway integrations spanning Stripe, Braintree, PayPal, BTCPay Server, Authorize.net, GoCardless, Mollie, Square, and more—letting businesses accept credit cards, ACH transfers, SEPA debits, and cryptocurrency without vendor lock-in. A dedicated e-invoicing compliance layer implements PEPPOL (EU multi-country), ZUGFeRD and Factur-X (Germany and France), Verifactu (Spain), FatturaPA (Italy), and other statutory formats, making it viable for businesses with regulatory reporting requirements.

Invoice Ninja supports both a hosted SaaS tier (up, running in under five minutes) and self-hosted deployment via Docker, Cloudron, YunoHost, Softaculous, or Elestio. Native mobile apps for iOS and Android (built in Flutter) and desktop apps for macOS, Windows, and Linux sync in real time. A full REST API and Zapier integration cover automation needs, while a $40/year white-label option removes Invoice Ninja branding from client-facing pages.

What You Get

  • Professional Invoice & Quote Builder - Create branded invoices and quotes from customizable templates with full control over logos, colors, line-item layouts, and tax configurations.
  • 47 Payment Gateway Integrations - Accept credit cards, ACH, SEPA, BACS, and crypto through Stripe, Braintree, PayPal, Authorize.net, BTCPay Server, GoCardless, Mollie, Square, Checkout.com, and dozens more.
  • Client Portal - Give clients a secure self-service portal to view invoices, download PDFs, track payment history, and pay online without requiring an admin account.
  • E-Invoicing Compliance Layer - Generate and submit statutory e-invoices in PEPPOL (EU), ZUGFeRD/Factur-X (DE/FR), Verifactu (ES), FatturaPA (IT), and other country-specific XML/XSLT formats.
  • Time Tracking & Project Management - Log billable hours against tasks and projects, convert tracked time directly into invoice line items, and monitor project budgets.
  • Expense & Vendor Management - Capture business expenses, attach receipts, categorize by vendor, and convert expenses to billable invoice items or track them for accounting.
  • Mobile & Desktop Apps - Native Flutter-based apps for iOS, Android, macOS, Windows, and Linux with offline support and real-time sync.
  • REST API & Webhooks - Full OpenAPI-documented API with webhooks for invoice, payment, and client events, plus a Go SDK for custom integrations.
  • Automation via Zapier & Make.com - Connect to thousands of apps to automate workflows such as sending invoices when project milestones are reached or logging payments to a spreadsheet.
  • White-Label Option - A $40/year license removes Invoice Ninja branding from all client-facing pages for agencies and resellers needing a branded experience.

Common Use Cases

  • Freelancers automating client billing - A UX designer creates branded invoices with automated payment reminders, accepts Stripe payments from the client portal, and tracks time directly against each project.
  • Agencies managing multi-currency clients - A digital agency invoices clients across the EU in their local currencies, submits PEPPOL-compliant e-invoices for German and Dutch clients, and reconciles payments through GoCardless SEPA debits.
  • Consultants offering white-labeled portals - A financial consultant white-labels the client portal under their own domain, giving clients a branded experience to view statements and pay invoices without seeing third-party software.
  • Small businesses tracking projects and expenses - A construction firm logs labor hours per project, captures material receipts as expenses, and generates invoices that itemize both billable time and expense pass-throughs.
  • Tech startups integrating billing into their stack - A SaaS startup uses the REST API and webhooks to auto-generate invoices when subscriptions activate, pulling payment status events into their internal dashboard via webhook.
  • Accountants needing statutory e-invoicing - A bookkeeping firm uses the Verifactu adapter to generate and register invoices with Spain’s AEAT tax authority directly from the platform.

Under The Hood

Architecture Invoice Ninja is built on a well-layered Laravel architecture where each HTTP request flows through multi-tenant domain-aware middleware and an authentication layer before reaching typed Form Requests that handle authorization and validation. Controllers are deliberately thin, delegating to Repository classes for persistence and Service classes for domain logic. Services chain operations fluently—filling defaults, triggering workflow actions, adjusting inventory—before firing domain events that listeners handle asynchronously. Payment processing is decoupled through a Strategy pattern across 47 driver implementations, each extending a base driver contract. E-invoicing is architecturally isolated into country-specific adapter classes (PEPPOL per EU country, ZUGFeRD, Factur-X, Verifactu, FatturaPA, and others) that implement a shared interface, keeping regulatory compliance logic separate from the core invoicing domain. Multi-tenancy is handled via a custom MultiDB pattern that assigns separate databases per company, providing true data isolation rather than shared-schema tenant filtering.

Tech Stack The backend runs PHP 8.2+ on Laravel 12 with Laravel Octane (supporting Swoole and RoadRunner) for high-throughput request handling in long-running process mode. Eloquent ORM handles database access, with Laravel Scout backed by Elasticsearch providing full-text search across invoices and clients. The e-invoicing compliance layer relies heavily on XSLT transformations and XML processing to generate spec-compliant documents across European standards. Payment integrations span Stripe, Braintree, Authorize.net, PayPal, BTCPay Server, GoCardless, Square, Checkout.com, Mollie, and more. Frontend assets compile via Vite with the Laravel Vite plugin; client-facing payment forms use vanilla JavaScript; the admin UI is a separate Flutter application distributed as mobile and desktop clients. PDF generation uses Snappdf, a headless Chromium wrapper. Background jobs process through Laravel Queues, and S3-compatible storage integrates via the AWS SDK.

Code Quality The test suite is comprehensive, with an extensive collection of Feature test files alongside Unit and Integration suites, using PHPUnit with process isolation and stop-on-failure configuration. A GitHub Actions CI workflow runs the full phpunit suite on every push, and a Codacy integration provides automated code quality grading. Core domain classes use PHPDoc type annotations and PHP 8 typed properties, though strict types declarations are applied inconsistently. Custom Eloquent casts, repository patterns, and Fractal transformer layers improve maintainability across a large codebase. Error handling in payment drivers is explicit, with try/catch blocks and Sentry integration, though exception granularity varies across drivers. A phpstan.neon configuration exists for static analysis. Naming conventions are consistent throughout.

What Makes It Unique The standout technical differentiator is the depth of the statutory e-invoicing compliance layer: Invoice Ninja implements country-specific regulatory formats—PEPPOL across dozens of EU member states, Verifactu for Spain’s AEAT authority with real-time registration flows, ZUGFeRD and Factur-X for German and French B2B mandates, FatturaPA for Italy’s SDI system—each with dedicated validation and submission pipelines. Very few open-source billing tools approach this scope of statutory compliance. The MultiDB multi-tenancy model provides genuine per-company database isolation, avoiding the data-bleed risks of shared-schema approaches. The white-label licensing model—a $40/year fee to remove branding on a source-available codebase—represents an unusual commercial model that lets self-hosters run a fully-featured product and only pay if they need the white-label capability.

Self-Hosting

Invoice Ninja is released under the Elastic License 2.0 (ELv2). This license permits use, copying, modification, and distribution of the software, including for commercial purposes, but contains two key restrictions: you may not provide the software as a managed service to third parties (i.e., you cannot resell it as a hosted invoicing platform), and you may not circumvent license key mechanisms or usage controls. For the vast majority of self-hosters—businesses running Invoice Ninja internally for their own billing needs—these restrictions are irrelevant and the license is effectively permissive. A separate $40/year white-label license, purchased through Invoice Ninja’s website, removes the platform’s branding from client-facing pages such as the payment portal and invoice PDFs.

Running Invoice Ninja yourself is a moderate operational commitment. The application requires PHP 8.2+, a MySQL or MariaDB database, Redis for queue processing, and an S3-compatible object store for file attachments. Docker-based deployment with the official image simplifies initial setup, but you remain responsible for SSL/TLS termination, queue worker process supervision, database backups, and periodic version upgrades (releases ship roughly every week). The codebase is large—over 35 MB of PHP alone—and the migration path between major versions has historically required attention. Postmark or another transactional email provider is recommended for reliable invoice delivery. Optional Elasticsearch integration improves search performance at the cost of additional infrastructure.

Compared to Invoice Ninja’s own hosted SaaS tier, self-hosting means you handle uptime, scaling, and disaster recovery yourself. The hosted plan provides managed backups, automatic upgrades, SLA-backed email delivery, and priority support. If e-invoicing compliance is important (PEPPOL, Verifactu, ZUGFeRD), note that the adapters connect to external authority endpoints which require valid credentials and ongoing maintenance as regulatory requirements evolve—on the hosted tier, Invoice Ninja manages these updates; on self-hosted, you upgrade the application to pick up compliance changes with each release.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search