Skip to content

Billing Operations

Billing operations run the commercial relationship with each customer: their subscription, the invoices they owe, chasing overdue payments (dunning), and — when it comes to it — suspending a subscription. Payments are processed through Paystack.

Who can do this: billing and super_admin (billing.read, billing.write, billing.approve). onboarding can read billing and manage a tenant’s subscription. Paystack payment configuration is super_admin only.

The billing screens live under billing/.

  • Subscriptions (billing/subscriptions) lists every customer subscription; open one for detail.
  • Create (billing/subscription-new) or edit a subscription.
  • Change status to suspend or cancel (POST /subscriptions/:id/status) — audited.
  • Renewals (billing/renewals) shows the upcoming renewal window.
  • A tenant’s subscription can also be managed from the tenant detail (clients/tenant/:id/subscription), including previewing and adding items with prorated invoicing.
  • Invoices (billing/invoices) lists invoices; open one for line-item detail.
  • Create an invoice (billing/invoice-new) — tax is applied per line.
  • Send an invoice (POST /invoices/:id/send) to move it from draft to issued and notify the customer.
  • Export invoices to CSV/PDF from the list.
  • Payments (billing/payments) lists captured payments.
  • Record a manual payment (POST /payments) when one comes in outside the gateway.
  • Gateway payments arrive automatically via the signed Paystack webhook — settled events capture and apply to the invoice.

When a charge fails or an invoice goes overdue:

  1. The case appears in the Dunning queue (billing/dunning).
  2. Remind (POST /dunning/:id/remind) advances the dunning ladder and notifies the customer.
  3. If unresolved, Suspend (POST /dunning/:id/suspend) suspends the subscription. Suspension propagates so the customer’s deployment reflects the lapsed state; settling the balance reactivates it.
  4. Auto-charge runs on a schedule (POST /billing/auto-charge/run) to attempt renewals and progress dunning automatically.
  • Credit notes (billing/credit-notes) — create one, then approve it (POST /credit-notes/:id/approve, gated by billing.approve).

super_admin manages the Paystack keys, mode and webhook/callback URLs under Payment config (billing/payment-config). Keys are shown masked and never leaked; a test-connection probe checks the integration without taking a charge.