Intelligent payment routing

Intelligent payment routing is the process of dynamically routing transactions between payment gateways, based on real-time data and selected parameters. To configure payment routing you must have more than one gateway account connected to Rebilly.

Sticky gateway accounts

By default, Rebilly assigns a sticky gateway account ID to a payment instrument when an approved transaction is performed on a payment gateway. On first use, selection of this payment gateway is random. From this point on, the sticky gateway account ID is used to bind the payment instrument to that particular payment gateway, so that all future payments will be processed by the same payment gateway.

When intelligent payment routing is enabled:

  • If the payment instrument does not have a sticky gateway account ID: The rules engine evaluates the transaction and finds the best gateway account to process the transaction.

-Or-

  • If a payment instrument has a sticky gateway account ID assigned: The associated gateway is selected to process the transaction.

Enable gateway routing

If you have not yet added a payment gateway, see Add gateway account. To configure payment routing you must have more than one gateway account connected to Rebilly.

  1. Optional — Disable sticky gateways:

    Note

    Gateway routing is optimal on gateways that do not have the sticky gateways option enabled. If sticky gateways is enabled, when using gateway routing, this gateway will only be available to:

    • New payment instruments that have not been used on a gateway — a sticky gateway account ID has not yet been applied.
    • Payment instruments that have not completed a successful transaction on another gateway.
    1. In the left navigation bar, click settings icon, then click Gateway accounts.
    2. Select a gateway account.
    3. Click Edit gateway account.
    4. In the Advanced configuration section, enable the Show advanced configuration slider.
    5. Under Sticky gateway account, deselect the Enable sticky gateway checkbox.
  2. Set up routing:

    1. In the left navigation bar, click Automations icon.
    2. In the Rules engine page, click Core events.
    3. Click Gateway account requested.
    4. Click Rule set, then click Add rule.
    5. In the Rule name field, enter a descriptive name for the rule.
    6. In the Actions section, click Add action, then select Pick gateway account.
    7. Select a routing algorithm:

    8. Set weighted distribution:

      • To distribute weight based on gateway account, select Use gateway account weights.
      • To distribute weight based on acquirer, select Use acquirer weights.

Weighted-random

When this rule is enabled, a transaction is randomly assigned to a gateway account based on the specified weighted distribution. Gateways with higher weight values have a higher chance of being selected.

For example, 4 gateway accounts are set as follows:

Value Gateway Chance of processing a transaction
70 Gateway A 70%
15 Gateway B 15%
10 Gateway C 10%
5 Gateway D 5%

Round-robin

When this rule is enabled, a transaction is randomly assigned to a gateway account based on the specified weighted distribution. Gateways with higher weight values have a higher chance of being selected. Each time a gateway is used, it is then removed from the next round. When the last gateway is used, and no other gateways remain, the process begins again.

For example, 4 gateway accounts are set as follows, and the same payment instrument carries out transactions over a period of time:

Round one

Value Gateway Chance of processing a transaction
70 Gateway A 70%
15 Gateway B 15%
10 Gateway C 10%
5 Gateway D 5%

Round two

Value Gateway Chance of processing a transaction
15 Gateway B 49.98
10 Gateway C 33.33%
5 Gateway D 16.66%

Round three

Value Gateway Chance of processing a transaction
10 Gateway C 66.66%
5 Gateway D 33.33%

Round four

Value Gateway Chance of processing a transaction
5 Gateway D 100%

Round five

Value Gateway Chance of processing a transaction
70 Gateway A 70%
15 Gateway B 15%
10 Gateway C 10%
5 Gateway D 5%

Further reading