Começar Agora

Billing Overview

SaasKitFy provides a flexible billing system that supports multiple payment gateways and plan types. Switch gateways or plan models from the admin panel without touching code.

Supported Payment Gateways

Five payment gateways are available out of the box:

  • Stripe — Full-featured integration via Laravel Cashier
  • Paddle — Merchant of record, handles taxes automatically
  • MercadoPago — Latin America's leading payment processor
  • Lemon Squeezy — Simple merchant of record for digital products
  • PayPal — Widely recognized global payment platform

BillingGateway Interface

Every gateway implements the same BillingGateway interface, so swapping providers requires zero code changes:

interface BillingGateway
{
    public function checkoutUrl(Organization $org, Plan $plan, string $interval): string;
    public function portalUrl(Organization $org): string;
    public function cancel(Organization $org): void;
    public function resume(Organization $org): void;
    public function invoices(Organization $org): Collection;
    public function handleWebhook(Request $request): void;
}

Plan Types

Five plan types cover every common SaaS billing model:

  • Recurring — Fixed monthly or yearly subscription
  • One-time — Single payment, lifetime access
  • Per-seat — Price scales with team size
  • Metered — Pay-as-you-go based on usage
  • Credits — Prepaid credit packs consumed over time

Switching Gateways

The active gateway is controlled by the billing.driver admin setting. Change it from the admin panel at any time:

Admin Panel → Settings → Billing → Payment Gateway

The system resolves the correct driver class at runtime based on this setting. No deployment or config file changes required.

Free Plans

Free plans activate instantly without contacting any payment gateway. When a user selects a free plan, the subscription record is created locally and marked as active immediately. No checkout redirect, no gateway API call.

Key Controllers

  • BillingController — Handles checkout, subscription management, invoices, and billing portal routes for organization members
  • BillingWebhookController — Receives and processes webhook events from the active payment gateway (payment confirmations, cancellations, failures)