Zodiac Tech CRM Docs

Billing overview

How commercial billing fits together — agreements, invoices, payments, providers and failure handling — and where every screen lives.

super-admin Easy ⏱ 5 min Updated 2026-10-05

Billing overview

Commercial billing on this platform is built around one idea: an agreement is a contract with a price, and separately a list of features the client is entitled to. The two never bleed into each other. A ₹0 discount, a changed price, or an extra line item never silently unlocks a feature — only the agreement's entitlements do.

This page is the map. Follow the links for the detail.

Who this is for

Super Admins who run client contracts and collections.

  • Difficulty: Easy
  • Time: 5 min
  • Prerequisites: Super Admin access.

Where everything lives

All commercial billing screens are in the Super Admin Billing group:

Sidebar entry URL What it does
Overview /super-admin/billing Platform revenue dashboard: MRR, ARR, ARPU, churn, status breakdown, revenue by plan, recent billing events
Commercial Billing /super-admin/billing/commercial Counting cards + the "Needs Attention" queue for agreements
Agreements /super-admin/billing/agreements Create and manage commercial agreements → Commercial agreements
Invoices /super-admin/billing/commercial-invoices Append-only invoice list → Invoices & payments
Payments /super-admin/billing/commercial-payments All payment transactions
Change Requests /super-admin/billing/commercial-change-requests Client-requested changes to live agreements
Providers & Settings /super-admin/billing/commercial-providers Razorpay / Cashfree configuration → Payment providers
Billing Settings /super-admin/billing-settings-page Legacy platform settings: enabled gateways, trial/lifecycle days, affiliate %, manual bank details

Two billing layers exist The Overview page (/super-admin/billing) reports the platform's own SaaS subscriptions at the plan level (tenants on trial/paid plans). The commercial billing pages manage per-client agreements with custom pricing. Clients see their side of commercial billing in the client billing portal.

The counting cards (/super-admin/billing/commercial)

Card Counts
Active businesses Distinct businesses with a live agreement
Active agreements Agreements in a live state
MRR Current monthly recurring revenue
Pending client approvals Agreements awaiting the client's approval
Pending autopay Agreements awaiting payment authorization
Payment failures Recent failed payments
Past due Agreements past their due date
Grace period Agreements inside the grace window
Restricted Agreements under restriction
Suspended Agreements disabled for non-payment
Upcoming renewals Renewals due soon

Click a card to drill through to the matching filtered Agreements list, so the list shows exactly what the card counted.

The three concepts, kept separate

  1. Price — the agreement wizard's line items, discount and tax. This is money only.
  2. Entitlements — the features and limits ticked on the Services step. These (and only these) decide what the client can use.
  3. Lifecycle state — Draft → Awaiting your approval → AutoPay setup pending → Active → Payment failed → Grace period → Past due → Restricted → Suspended (and Cancelled / Expired). This decides what the client can reach, not what they paid.

Price alone never unlocks a feature If a client expects a feature because they paid for it, the fix is an entitlements change on the agreement (a change request), never just an amount edit. The platform enforces this: missing-feature checks read entitlement rows and reply "This feature is not included in your current service agreement."

How money actually flows

  1. You create an agreement and send it to the client.
  2. The client approves it in their portal, then authorizes AutoPay at the provider.
  3. The platform verifies that authorization with the provider (a redirect alone never activates anything).
  4. Renewals generate an invoice daily (06:30) and the provider debits the client.
  5. Provider webhooks confirm each event; failures start the grace → restriction chain.

The single invariant worth remembering: the provider debits exactly the renewal invoice total, which is exactly the agreement's recurring gross amount.

Expected result

You know which screen to open for any billing task, and you never confuse price, features and status.

Common mistakes

  • Looking for invoices under /super-admin/billing. The commercial invoice list is /super-admin/billing/commercial-invoices.
  • Editing a price to grant a feature. Features are entitlements, not amounts.
  • Treating the Overview dashboard as real-time collections. It is a metrics view; reconciliations run every 30 minutes.
  • Forgetting the client portal side. Most confusion comes from not seeing what the client sees — open Client billing portal.

Troubleshooting

Symptom What to check
A card shows more than you expect Click it — the drill-through list is the definition of the count
Client says "I paid" but agreement is not active Check provider confirmation in Payments; see Payment failures & restrictions
Provider events not arriving Webhook URLs and secrets — Payment providers
Renewal did not generate Check the agreement's next billing date and the 06:30 job — How billing & renewals work

Technical details

  • Pages: App\Filament\SuperAdmin\Pages\Commercial\{BillingOverview, CommercialInvoices, CommercialPayments, CommercialChangeRequests, CommercialProviders}; legacy metrics page App\Filament\SuperAdmin\Pages\Billing (/super-admin/billing).
  • Tables: commercial_* (12 tables) + billing_invoices — the invoice table is not named invoices.
  • Services: App\Services\CommercialBilling\* — BillingService, BillingCalculator, EntitlementService, InvoiceService, BillingChangeService, BillingNotifier, CommercialProviderManager.
  • Lifecycle jobs: CreateRenewalInvoice 06:30, CheckUpcomingRenewals 07:00, CheckPaymentFailures hourly, ApplyGracePeriod 07:15, ApplyRestriction 07:30, ReconcileProviderStatus + SyncAppliedChangeRequests every 30 min.
  • Entitlements gate: EntitlementService::has(); RESTRICTED allows only crm, lead_management, followups, reports; SUSPENDED denies everything.

Was this page helpful?