background

Routing engine

Tags:routingrouting rulesrouting engineprofileprofielmandatemandaatapicontract profileagreementsovereenkomstenpayment methodbetaalmethodebicibanbankpayment providerconditionvoorwaarde

The routing engine automatically selects which profile is applied when a mandate is created via the API. Rather than requiring your integration to specify a profile explicitly, Twikey evaluates a set of rules you configure and assigns the matching profile to the incoming mandate.

Why use routing

Routing is useful if you operate multiple profiles — for example, a CORE profile for Belgian customers, a B2B profile for Dutch companies, and a credit card profile for specific payment providers. Instead of building profile-selection logic into your integration, you define the rules once in Twikey and let the engine handle it.

This gives you:

  • Less manual work — Mandates receive the correct profile without anyone sorting them by hand.
  • Fewer errors — The same rules apply to every incoming mandate, so profile selection stays consistent.
  • One place to change — When your setup changes, you adjust the rule in Twikey instead of releasing new integration code.

Where to find your routing rules

  1. Navigate to Agreements > Routing in the left-hand navigation menu.

How it works

When a mandate creation request arrives via the API without an explicit profile, the routing engine evaluates your configured rules in order. The first matching rule determines the profile applied. If no rule matches, the fallback profile (if configured) is used.

Rule criteria

Each condition combines a field, an operator, and a value. Set If matched to any to apply the rule when a single condition matches, or to all to require every condition. Click + to add another condition.

The available operators are:

  • equals — The field matches the value exactly.
  • contains — The value appears somewhere in the field.
  • does not equal — The field holds anything other than the value.

Fields are grouped by where the data comes from:

GroupAvailable fields
AgreementAddress, Amount, BIC, City, Country, IBAN, Method, Profile Id, Profile Prefix, ZIP
CustomerAddress, City, Company, Companyname, Country, Enterprise No, Language, Number, ZIP

To route on the customer's bank, use BIC. To route on the payment method or provider, use Method — for example direct debit, credit card, or a wallet such as PayPal, Apple Pay or Google Pay.

Because the matched profile determines the payment method, you can also use routing to split traffic between direct debit and credit card, or to send specific customer segments through a profile that carries extra checks.

Configuration

Each rule specifies:

  • One or more matching criteria
  • The target profile to apply when the rule matches

Rules are evaluated top-to-bottom — order matters.

Scope

The routing engine applies to API-based mandate creation only. Mandates created manually through the Twikey interface always require you to select a profile explicitly.

Interaction with agreement types

The routing engine can select a profile of any type — CORE, B2B, RCC, Contract, or PAD. The agreement type created is determined by the matched profile, so design your rules so that the correct type follows naturally from the available customer data.

Last Update: 2026-08-03