Skip to main content
Accounting rules define which General Ledger (GL) accounts Hyperline uses when posting journal entries. Each rule belongs to a type that matches a specific billing event. You can use filters to scope a rule to a subset of products, currencies, payment methods, or invoice custom properties.

Rule types

Accounting > Settings > Accounting rules shows one section per rule type:
Rules of all types can coexist in the same ledger. A Revenue recognition rule is resolved on its own when an invoice is posted, not as part of the Invoice posted rule.
A fifth type, accounting software sync, exists but is not configured here. See sync rules below.

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 type: Invoice posted
  • Accounts Receivable
  • Discounts
  • Sales Tax / VAT
Invoice settled
  • Bank / Cash
  • Clearing Account
  • Provider Fees
  • Processing Fees
  • Processing Revenue
Credit Note created
  • Customer Credits
  • Write-off debit account
  • Allowance for Doubtful Accounts
Revenue recognition Beyond accounts, the Revenue recognition rule also carries the recognition behavior itself:
  • The Recognition method: over time, point in time, or usage-based
  • The Schedule (for over time) or the Recognition date (for point in time)
  • The Discount method: immediate, deferred, or use net amount
See Revenue recognition for what each of these does. A callout at the top of the Revenue recognition category reminds you that subscriptions under a committed contract recognize revenue from the contract, not from each invoice. These rules still set the accounts and the recognition method for them. See contract-based revenue recognition.

Accounting software sync rules

Accounting software sync rules map Hyperline billing records to the accounts expected by your connected accounting provider. When Hyperline sends a record to an external accounting provider, Hyperline converts the resolved account to the provider account code or internal account ID required by that provider.
These rules are not configured on the Accounting rules page. Set them up under Settings > Integrations, on the connected provider.
Available accounts and filters depend on the provider. For providers that support line-level account mapping, Revenue account on an invoice sync rule controls regular invoice and credit note lines. Providers that create a write-off record for uncollectible invoices use the Write-off debit account. Invoice sync rules can offer Invoice type (standard invoice vs custom document) and custom property filters, depending on the provider. Neither invoice type nor invoice custom property filters are offered on payment sync rules. For providers that support line-level account mapping, a line without a product gets its account from a sync rule only when a rule with a custom property filter matches it. Otherwise, the line keeps your accounting provider’s default account. You can create accounts manually in Hyperline or fetch them from your accounting provider by syncing the ledger’s chart of accounts. See Chart of accounts.

View the rule tree

Each section of Accounting > Settings > Accounting rules displays that type’s rules as a tree, showing which rules would apply and in what order. This is useful for auditing your rule configuration before going live. Rules filtered on a custom property show as <property> = <value> branches.

Filters

You can scope rules using one or more filters. Available filters depend on the rule type. When a billing event occurs, Hyperline evaluates all matching rules and applies them in priority order. Invoice posted Invoice settled Credit Note created Revenue recognition An empty filter matches everything. Rules with no filters act as catch-all defaults.
You can also scope rules to specific customers, but only through the API. Customer scoping is not offered in the rule form.

Criteria reference

The rule form can use the following criteria, depending on the selected rule type:
The Invoice type filter offers two values, Invoice (standard invoices) and Document (custom documents). A rule scoped to Invoice also applies to credit notes and refunds. Hyperline treats them as standard-invoice flavours. Leave the filter empty to match every invoice type.

Custom property filters

The Custom properties filter scopes a rule to invoices carrying a given custom property value. Only custom properties available on the invoice entity are offered. The filter is also available on invoice accounting software sync rules.
The value input follows the property type:
  • Select, boolean, text, email, number, and date properties take one value, and the invoice must have that value. Text and email matching is case-sensitive, so test doesn’t match Test.
  • Multi-select properties take several values, and the rule matches when the invoice has at least one of them.
When a rule filters on several properties, the invoice must match every one of them. An invoice with no value for a filtered property never matches. Properties marked as API only are not offered in the rule form, but you can still filter on them through the API. Each custom property counts as one more filter when Hyperline derives the rule priority. On Invoice settled rules, the filter reads the settled invoice. You can’t combine it with a Clearing Account. Hyperline books payment provider payouts without the invoice, so they would never clear that account.

Example 💡

You have an invoice custom property Fee type of type select, with the values Subscription and Service. You add a revenue recognition rule filtered on Fee type = Service, mapping revenue to 4200 – Professional services. Invoices tagged Service post their revenue to 4200, and every other invoice keeps using your default revenue account.

Priority and fallback

In the app, priority is not something you set. Hyperline derives it from what the rule is scoped on. A rule that names a specific customer, product, coupon, payment provider, or bank account ranks above rules scoped only by broader criteria, such as product type, currency, or custom property. Among broader rules, more filters mean a higher priority. The form displays the resulting value read-only under Advanced. Through the API, you set the priority yourself. When multiple rules match the same billing event, Hyperline applies them as a priority overlay:
  1. Hyperline collects all matching rules and sorts them by priority (ascending)
  2. Hyperline applies the rules in order: each rule overrides only the account roles it explicitly defines
  3. For any given account role, the highest-priority rule that defines it wins
In practice this means a broad catch-all rule acts as your default, and narrower rules override it for the specific cases they name. You get that behavior by scoping the rules, not by numbering them.

Example 💡

You have a default revenue recognition rule with no filters, mapping all revenue to account 4000 – Revenue. You then add a second rule scoped to a specific product, mapping its revenue to 4100 – Usage Revenue. The second rule is narrower, so it gets the higher priority. When an invoice is issued for that product, Hyperline uses 4100 for that product’s line items and 4000 for everything else.

Overlapping rules

Specificity is scored against the line actually being posted, not against the rule in the abstract. A customer-scoped rule only outranks a product-scoped one when the line’s customer is one of those the rule names. If it isn’t, that rule doesn’t match at all.
When two rules end up equally specific for the same line, which one wins is not guaranteed. Distinguish overlapping rules by scoping them differently rather than relying on a tie-break.

Add a rule

Go to Accounting > Settings > Accounting rules and click Add rule.
  1. Select the Rule type.
  2. Under Applied on, optionally add filters to scope the rule.
  3. Under Configuration, map an account to each role. For an Invoice posted rule, these accounts sit under the heading Invoice issued. They are the same thing.
  4. Advanced shows the priority Hyperline derived from your filters. It is read-only.

Edit and delete rules

Click a rule to edit it, or open its actions menu (⋯) and click Edit or Delete. Deleting a rule does not affect already-posted journal entries.