Payment Categorization Rules
Payment Categorization Rules
Payment Categorization Rules automatically assign a Payment Category to a Payment Transaction when settlement data is ingested.
They answer: What kind of payment is this? (customer payment, bank fee, chargeback, …)
This is not the same as Matching Rules, which answer: Which invoice or order should this payment clear?
Typical flow:
- Settlement Item → Payment Transaction (often
UNCATEGORISED) - Categorization Rules run (by priority) → set category
- If the category is assignable → Payment Assignment / Matching Rules can run
Each transaction gets one category. Rules are evaluated in priority order (lower number first). The first matching rule wins.
Prerequisites
- At least one Merchant Payment Account
- The target Payment Category exists and is enabled
- For later automatic assignment: category must be assignable, and Matching Rules / MPA assignment configuration set up
Create a categorization rule
Go to: Configuration > Payment > Payment Categorization Rules
- Click + (Add).
- Enter a unique Ident.
- Select the Merchant Payment Account.
- Select the Resulting Payment Category (must already exist).
- Set Priority (lower number = evaluated earlier).
- Enter a JSONata expression that returns
trueorfalsewhen applied to the payment. - Optionally add a Description.
- Save.
Fields
| Field (UI / API) | Meaning |
|---|---|
Ident (ident) | Unique rule ID |
Merchant Payment Account (merchantPaymentAccountIdent) | MPA this rule applies to |
Resulting Payment Category (resultingPaymentCategoryName) | Category set when the expression matches (must exist) |
Priority (priority) | Lower number processed first; first match applied. Must be greater than 0 |
JSONata expression (jsonataExpression) | Must return a boolean. If true, this rule applies. Max. 512 characters |
Description (description) | Optional human-readable note |
How rules are evaluated
- A Payment Transaction is created (e.g. from a Settlement Item).
- Rules for that Merchant Payment Account are loaded, ordered by priority (ascending).
- Each JSONata expression is evaluated against the payment data.
- On the first
trueresult → setresultingPaymentCategoryNameand stop. - If no rule matches → transaction stays UNCATEGORISED (or default) until categorized manually.
JSONata expressions
Rules use JSONata. The expression must return a boolean.
Test expressions on try.jsonata.org before saving them in instellix.
Examples
Payment description contains a word:
$contains(paymentDescription, 'Transfer')
Or, depending on field naming in your payload:
$contains(text, 'Transfer')
Property GVC equals 166 (typical for CAMT / bank settlements):
$exists(properties[propertyIdent='GVC' and propertyValue='166'])
Sender contains a bank name:
$contains(sender, 'Adyen')
Use more specific rules with lower priority numbers (earlier) than broad ones. Example: GVC
123and a specific debtor →BANK_FEEbefore a generic GVC123→CUSTOMER_PAYMENT.
API
Create
POST /v2/merchant-payment-accounts/{merchantPaymentAccountIdent}/payment-transaction-categorization-rules
Scope: tenant-management-write
{
"ident": "gvc-166-bank-fee",
"priority": 10,
"resultingPaymentCategoryName": "BANK_FEE",
"jsonataExpression": "$exists(properties[propertyIdent='GVC' and propertyValue='166'])",
"description": "CAMT GVC 166 → bank fee"
}→ Create a payment categorization rule
Other endpoints
- Query payment categorization rules —
GET /v2/payment-transaction-categorization-rules - Retrieve
- Update
- Delete
Manual categorization
If no rule matches, categorize manually in Payment > Transactions (Actions → Assign category). See Payment Assignment.
Related articles
Updated 19 minutes ago