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.Documentation Index
Fetch the complete documentation index at: https://docs.hyperline.co/llms.txt
Use this file to discover all available pages before exploring further.
Rule categories
| Category | Trigger | What it controls |
|---|---|---|
| Invoice posted | An invoice is finalised and emitted | Accounts receivable, revenue (or deferred revenue), output tax, discounts |
| Invoice settled | A payment transaction is settled | Cash or bank account, payment clearing, any payment processing fees |
| Credit note created | A credit note is issued | Customer credit liability, contra-revenue entries |
| Revenue recognition | No independent trigger — applied at invoice posting time alongside the Invoice posted rule | Recognition 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
- Cash / bank account
- Payment clearing account
- Provider fees expense account
- Payment processing fees account
- Accounts receivable (cleared on settlement)
- Customer credits account
- Contra-revenue account
- Deferred discount account
- Revenue account (reversed)
- Output tax account (reversed)
- Accounts receivable (for unpaid invoices)
- 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| Filter | Description |
|---|---|
| Products | Match specific products by ID |
| Product types | Match by product type (flat_fee, dynamic, addon, seat, one_off, credit) |
| Coupons | Match invoices where a specific coupon was applied |
| Currencies | Match invoices in a given currency |
| Countries | Match customers billed from a given country |
| Billing interval | Match by billing period (e.g. monthly, quarterly, annual, one-off) |
| Filter | Description |
|---|---|
| Payment providers | Match by payment provider (Stripe, GoCardless, etc.) |
| Payment methods | Match by method type (card, SEPA direct debit, ACH, BACS, bank transfer, etc.) |
| Currencies | Match transactions in a given currency |
| Filter | Description |
|---|---|
| Product types | Match by product type (flat_fee, dynamic, addon, seat, one_off, credit) |
| Currencies | Match credit notes in a given currency |
| Countries | Match customers billed from a given country |
| Filter | Description |
|---|---|
| Products | Match specific products by ID |
| Product types | Match by product type (flat_fee, dynamic, addon, seat, one_off, credit) |
| Coupons | Match invoices where a specific coupon was applied |
| Currencies | Match invoices in a given currency |
| Countries | Match customers billed from a given country |
| Billing interval | Match by billing period (e.g. monthly, quarterly, annual, one-off) |
Priority and fallback
When multiple rules match the same billing event, Hyperline applies them using a priority overlay:- All matching rules are collected and sorted by priority (ascending)
- Rules are applied in order — each rule overrides only the account roles it explicitly defines
- The rule with the highest priority number wins for any given account role
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.Tiebreaker at equal priority
When two matching rules share the same priority, Hyperline picks the more specific one:- A rule scoped to customers wins over a rule scoped to products
- A rule scoped to products wins over a rule with no customer or product filter
- If both rules are equally specific, the rule created first wins
Example 💡
Two rules both have priority 10:
- Rule A scoped to customer
cust_123 - Rule B scoped to product
prod_456
Add a rule
Go to Accounting > Settings > Rules and click Add rule.
- Select the rule category
- Assign a priority (integer; higher wins)
- Configure the account mappings for each role
- Optionally add filters to scope the rule

