Docs

Advanced Routing 

This is a Private Beta Release available only to users of Chargebee Payment Components . Contact Chargebee Support  to enable the Advanced Routing feature for your test and live sites.

Introduction 

Advanced Routing offers significantly enhanced flexibility over the existing Smart Routing capability, enabling more precise and tailored payment gateway routing. Smart routing is limited to setting up routing based on only payment methods and currency where, whereas Advanced Routing aims to bring in more ways for the business to determine their routing strategy, including customer region, plan amount, product catalogue, etc.

Benefits of Advanced Routing for your business 

Advanced Routing can enhance your payment processes in several ways:

  • Geography-Based Optimization: If you operate globally and offer subscription plans in a single currency (like USD) but want to improve success rates by localizing payment gateways, Advanced Routing can help. By routing payments based on the customer's billing or shipping address, you can achieve better transaction success without creating new plans in local currencies.
  • Customer Segment-Based Optimization: Tailor payment processing for different customer segments, such as freemium vs. enterprise customers. With Advanced Routing, you can direct transactions to specific gateways based on the plan or product catalog, offering differentiated services to each customer group.
  • Payment Method-Based Optimization: Optimize your payment workflows by routing different alternative payment methods (APMs) to specialized gateways. Advanced Routing allows you to set rules for specific payment methods and direct them to the most suitable gateway for better performance.

These are just a few examples of how Advanced Routing can benefit your business. The engine is flexible and can be customized to meet your unique payment routing needs, ensuring optimal results.

Key Features 

The following are the key features of Advanced Routing:

  • Configurable Routing ??? Create custom routing rules based on various parameters to align with your business needs.
  • Debugging Tools ??? Test routing rules and review transaction details to see which rules were applied during checkout.
  • Safe Defaults ??? Set default gateways for each payment method to ensure seamless processing, even when no specific rule matches.

Supported variables to set routing strategy 

  • Payment method
  • Customer location (Billing / Shipping address)
  • Checkout amount and currency
  • Product catalog / Plan in PC 1.0 and Item price in PC 2.0
Information

If you need more variables, submit a request for them here . We will consider them for our next iteration.

Limitations 

Configuring Advanced Routing 

Configuring Advanced Routing involves the following set of steps:

  1. Configuring Default Routing
  2. Creating routing rules
  3. Setup all rules from Smart routing & test the new setup
  4. Activating Advanced Routing

Let us dive deep into these:

Before moving on to the specific sections, follow these steps to arrive at the Advanced Routing page:

  1. Log into the Chargebee app .
  2. Go to Settings > Configure Chargebee > Payment Gateways.
  3. Click Manage Rules under Advanced Routing.

Configure Default Routing 

Using Default Routing, payments are routed to the most optimal gateway for each payment method. This step is very crucial as the configurations here will decide the safe default gateways to be used for different payment methods when none of the configured rules are matched. Default routing applies only when no rules are defined or if no rules match the payment scenario.

Follow these steps to configure Default Routing:

  1. On the Routing page, click the Default Routing button.

  2. Set a fallback gateway from the Primary Gateway drop-down for each payment method.

Information

The first time defaults are set, your smart routing rules will be automatically migrated. Make sure to verify and validate the prefilled gateways and make modifications if required

Creating Routing Rules 

Creating a routing rule is crucial for customizing the routing strategy based on your needs. Advanced Routing allows you to add multiple conditions under a rule to achieve the required result. For example, a rule can be like: ???If the invoice amount is greater than 100 and the currency is USD, use Stripe payment gateway.???

Follow these steps to create a new rule:

Note

All existing Smart Routing rules appear automatically under Advanced Routing rules. You can modify the existing rules to match your requirements. Please make sure to validate and verify the migrated rules from smart routing and make modifications if needed.

  1. Click Create Rule on the Routing page.

  2. On the Create Rule page, perform the following actions:
    a. Add a Rule Name.
    b. Add the required conditions such as Payment method, Plan, Billing Country, Shipping Country, Invoice Amount, and Currency.
    c. Select the Payment Gateway.

  3. Click Publish.

Setup all rules from Smart Routing & test the new setup 

It is important that you check your Advanced routing rules and test them to see how they would behave during an actual checkout scenario. We recommend that you do this the first time you set up and activate Advanced Routing and later whenever you change the routing rules.

Migrate existing rules

  • When you set the defaults in advanced routing for the first time, your smart routing rules will be migrated automatically.
  • Review the migrated rules from the list of rules on the Routing page and make any changes needed before you activate advanced routing.

Activating Advanced Routing 

Once you've configured the defaults and advanced routing rules, you can activate Advanced Routing to apply it in Chargebee Payment Components. If needed, you can seamlessly switch back to Smart Routing at any time.

View Rule Evaluation

Once the advanced routing engine is activated, you can check the transaction page for details on which rule was applied for a particular transaction.

Testing Routing Rules 

Before deploying a rule, it's essential to test it to ensure it meets your requirements and behaves as expected.

Follow these steps to run a test:

  1. Navigate to the Routing page and click Run Test.
  2. Enter values that match the specific rule you want to test.
  3. Click Run Test to see the results.

If the expected rule appears on the Result page, congratulations! Your rule is correctly configured.

Example 

Let's walk through an example:

Suppose you've created a rule with the ID rule_161t4tUbLxeqJ2E0, which states:

"If the invoice amount exceeds ???100, the Payment Method is iDEAL, and the currency is EUR, then use the Mollie payment gateway."

To test this rule:

  1. Enter values matching these conditions.
  2. Click Run Test.

If the correct routing rule appears in the results???great! Your rule is working as expected. If not, close the Test Routing Rule pop-up, review the rule configuration, and test again.

Rule Management 

You can manage routing rules with the following operations:

  • Edit, Enable, Disable, or Delete rules as needed. Click the ellipsis icon against a rule to perform these operations.

  • Set Priority Order: When rules overlap, the one with the highest priority is executed first. Adjust priorities accordingly. Click the hamburger icon next to the rule and drag it to the desired level. Publish the changes.

Note

If you have any further questions or need assistance with Advanced Routing, please email Chargebee Support .

Frequently Added Questions (FAQs) 

  1. How do I move my rules configured in Smart routing to the Advanced routing engine?
    This is done for you the first time you setup the defaults on advanced routing.
  2. How do I make sure my previous setup in smart routing is fully set up in the Advanced routing engine?
    You can review the rules in smart routing and advanced routing to ensure they are the same after the defaults are set on advanced routing.
  3. Can I move back to Smart routing if needed?
    Yes, you can activate smart routing again by following the steps in the Activating Advanced Routing section.
Was this article helpful?
Loading…