Payment gateway routing

Payment gateway 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. This automation uses the Gateway account requested event and the Pick gateway account action.

warning

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.

To set up gateway routing:

  1. Optionally, disable sticky gateways:
    attention

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

    • New payment instruments that were not used on a gateway — a sticky gateway account ID is not applied.
    • Payment instruments that have not completed a successful transaction on another gateway.
    1. In the left navigation bar, click settings icon Settings .
    2. In the Configuration section, click Gateway accounts .
    3. Select a gateway account.
    4. Click Edit gateway account .
    5. In the Advanced configuration section, turn on the Show advanced configuration slider.
    6. Under Sticky gateway account , clear the Enable sticky gateway checkbox. For more information, see Sticky gateway accounts .
  2. Set up routing:
    1. In the left navigation bar, click Automations icon Automations .
    2. In the Rules engine section, click Rules engine .
    3. Click Core events .
    4. Click Gateway account requested .
    5. Click Rule set , then click Create rule .
    6. In the Rule name field, enter a descriptive name for the rule.
    7. In the Actions section , click Add action , then select Pick gateway account .
    8. Select the Weighted-random or Round-robin routing algorithm.
    9. 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 .

Weights

This section describes the transaction routing weights that are available in Rebilly.

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 getting 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 getting 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%

Sticky gateway accounts

By default, Rebilly assigns a sticky gateway account ID to a payment instrument when it performs an approved transaction on a payment gateway. On first use, the 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 are processed by the same payment gateway.

When gateway 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.

Further reading