Skip to main content
Accounting rules define which General Ledger (GL) accounts Hyperline uses when posting journal entries. Each rule belongs to a category that matches a specific billing event, and can be scoped to a subset of products, customers, currencies, or payment methods using filters.

Rule categories

CategoryTriggerWhat it controls
Invoice postedAn invoice is finalised and emittedAccounts receivable, revenue (or deferred revenue), output tax, discounts
Invoice settledA payment transaction is settledCash or bank account, payment clearing, any payment processing fees
Credit note createdA credit note is issuedCustomer credit liability, contra-revenue entries
Revenue recognitionNo independent trigger — applied at invoice posting time alongside the Invoice posted ruleRecognition method, schedule granularity, discount recognition mode
Rules of all four categories can coexist in the same ledger. Revenue recognition settings are resolved at invoice posting time alongside the Invoice posted rule — they are not triggered by a separate event.

Account mappings

Each rule specifies which GL account to use for each role in the journal entry. The available account roles depend on the rule category: Invoice posted
  • Accounts receivable
  • Revenue account
  • Deferred revenue
  • Output tax / VAT
  • Discount account
  • Deferred discount account
  • Contra-revenue account
  • Customer credits account
  • Bad debt / allowance for doubtful accounts
Invoice settled
  • Cash / bank account
  • Payment clearing account
  • Provider fees expense account
  • Payment processing fees account
  • Accounts receivable (cleared on settlement)
Credit note created
  • Customer credits account
  • Contra-revenue account
  • Deferred discount account
  • Revenue account (reversed)
  • Output tax account (reversed)
  • Accounts receivable (for unpaid invoices)
Revenue recognition
  • Revenue account (when recognised)
  • Deferred revenue (until recognised)

View the rule tree

Accounting > Settings > Rules displays all rules grouped by category, showing which rules would apply and in what order for each event type. This is useful for auditing your rule configuration before going live.

Filters

Rules can be scoped using one or more filters. Available filters depend on the rule category. When a billing event occurs, Hyperline evaluates all matching rules and applies them in priority order. Invoice posted
FilterDescription
ProductsMatch specific products by ID
Product typesMatch by product type (flat_fee, dynamic, addon, seat, one_off, credit)
CouponsMatch invoices where a specific coupon was applied
CurrenciesMatch invoices in a given currency
CountriesMatch customers billed from a given country
Billing intervalMatch by billing period (e.g. monthly, quarterly, annual, one-off)
Invoice settled
FilterDescription
Payment providersMatch by payment provider (Stripe, GoCardless, etc.)
Payment methodsMatch by method type (card, SEPA direct debit, ACH, BACS, bank transfer, etc.)
CurrenciesMatch transactions in a given currency
Credit note created
FilterDescription
Product typesMatch by product type (flat_fee, dynamic, addon, seat, one_off, credit)
CurrenciesMatch credit notes in a given currency
CountriesMatch customers billed from a given country
Revenue recognition
FilterDescription
ProductsMatch specific products by ID
Product typesMatch by product type (flat_fee, dynamic, addon, seat, one_off, credit)
CouponsMatch invoices where a specific coupon was applied
CurrenciesMatch invoices in a given currency
CountriesMatch customers billed from a given country
Billing intervalMatch by billing period (e.g. monthly, quarterly, annual, one-off)
An empty filter matches everything — rules with no filters act as catch-all defaults.

Priority and fallback

When multiple rules match the same billing event, Hyperline applies them using a priority overlay:
  1. All matching rules are collected and sorted by priority (ascending)
  2. Rules are applied in order — each rule overrides only the account roles it explicitly defines
  3. The rule with the highest priority number wins for any given account role
This means you can define a low-priority default rule that covers all products, then add higher-priority rules to override specific account mappings for individual products or customer segments.

Example 💡

You have a default invoice issued rule (priority 10) that maps all revenue to account 4000 – Revenue. You then add a second rule (priority 50) scoped to a specific product that maps its revenue to 4100 – Usage Revenue. When an invoice is issued for that product, Hyperline uses 4100 for that product’s line items and 4000 for everything else.

Add a rule

Go to Accounting > Settings > Rules and click Add rule.
  1. Select the rule category
  2. Assign a priority (integer; higher wins)
  3. Configure the account mappings for each role
  4. Optionally add filters to scope the rule

Edit and delete rules

Click the edit or delete icon next to any rule in the rule list. Deleting a rule does not affect already-posted journal entries.