Skip to main content

Billing Accounts

Billing accounts (BillingAccount) represent the financial relationship between an organization and its customer. Each account has subscriptions, invoices, payments, and payment methods.

Fields

FieldDescription
OrganizationOwning organization (required)
PersonAssociated customer (type=customer)
External IDIdentifier for integrations (unique per organization)
CurrencyBilling currency (default: BRL)
Billing emailEmail to receive invoices
Payment terms (days)Payment deadline in days (default: 10)
Auto-chargeWhether invoices are charged automatically
Balance (cents)Credit/debit balance of the account
Statusactive, suspended, or closed

Fiscal Configuration

FieldDescription
Tax exemptWhether the customer is tax exempt
Exemption certificateTax exemption document
Customer tax typeTax classification
Withhold ISSISS withholding flag
Withhold IRRFIRRF withholding flag
Withhold CSRFCSRF withholding flag
Withhold INSSINSS withholding flag
Municipal registrationMunicipal registration number

Status and Lifecycle

active → suspended ↔ active

closed
StatusDescription
activeOperational account
suspendedSuspended due to delinquency or manually. Subscriptions paused
closedPermanently closed

Suspension

  • Sets suspendedAt and suspensionReason
  • All active subscriptions are paused
  • Notification sent to the customer
  • Can be reactivated manually

Closure

  • All subscriptions must be inactive/canceled
  • Permanent (soft delete via deletedAt)

Uniqueness

  • One billing account per customer per organization
  • External ID unique per organization
  • Customer document unique per organization

Statistics

The dashboard displays counters by status:

  • Total accounts
  • Active accounts
  • Suspended accounts
  • Accounts with active subscription