Skip to main content
This section assumes you have connected your payment gateways. Visit the payment gateway page to learn more.
Smart routing is a core functionality of Archefusion that automatically determines the best payment gateway to process a payment, reducing payment failure. It selects the most suitable gateway based on your predefined rules and the live health data of each payment gateway. If a gateway is unavailable or unresponsive during routing, Archefusion retries or moves to the next fallback gateway based on your timeout and retry settings.

How smart routing rules work

A customer initiates a ₦50,000 payment via the card payment method on your platform. Archefusion smart routing → Archefusion checks your first configured rule: Flutterwave is set as the first gateway to process card payments within ₦100 to ₦100,000. Archefusion failover page → If Archefusion’s live health data shows that Flutterwave is currently down, it skips it and moves to Paystack (your next fallback gateway). → If Archefusion sends the payment to Paystack and gets no response after 5 seconds (your configured timeout), instead of failing the transaction immediately, Archefusion retries. smart routing failover and retry settinngs → Archefusion waits for 2 seconds (your base delay) and retries for the first time on Paystack. Still no response after 5 seconds. → Since your attempts per gateway is set to 2, it waits 4 seconds (your base delay of 2 seconds doubles because your backoff strategy is exponential) and adds random jitter (e.g., 0.06 seconds) to spread retries so concurrent transactions during high-traffic periods don’t overwhelm Paystack at the same moment. → Attempts per gateway reached, Archefusion stops trying Paystack. It waits 5 seconds (the exponential backoff calculates 8 seconds at this point, but your max delay cap of 5 seconds applies) and moves to Monnify, your next fallback gateway. → Archefusion successfully initiates a payment session on Monnify and redirects the customer to the checkout page. However, if Monnify also fails, Archefusion stops entirely, all 3 retries (2 on Paystack and 1 on Monnify) are exhausted, and the transaction is marked as failed. Total time: ~22 seconds. The customer never re-enters their details. No double charge. → Archefusion sends webhook notifications on payment status to your server.

How to set your smart routing rules

  1. Log in to your merchant account.
  2. Navigate to “Payment Gateways” > “Smart Routing”.
  3. Click the “First Rule” button.
  4. Enter your rule name and an optional description field. The priority field, which is automatically set to 1 on your first rule, represents the order in which the rule should be executed. I.e., a rule with priority 1 runs before one with priority 2.
You can drag and reorder rules based on your preference.
Archefusion basic smart routing rule
Set your currency, payment methods, country, minimum amount, and maximum amount. This determines when the rule applies.For example, execute this rule when customers make card payments between ₦100 and ₦50,000.Archefusion smart routing condition
Select the payment gateways and the order in which Archefusion should route transactions. If the first gateway is unavailable or unhealthy, Archefusion automatically moves to the next one.
You can only add configured payment gateways to your failover strategy.
For example, if the provider order is Flutterwave → Paystack → Monnify, Archefusion will attempt Flutterwave first. If it is unavailable, it moves to Paystack, then Monnify.Archefusion smart routing failover page
Set how Archefusion should handle unresponsive gateways during payment routing.
  • Timeout (ms): The time Archefusion waits for a payment gateway to respond before considering it unresponsive and moving to the next gateway.
  • Max retries: The maximum number of times Archefusion should retry a transaction across all gateways before considering it as failed.
  • Attempts per gateway: The number of times Archefusion should retry a single gateway before moving to the next one.
  • Base delay (ms): The initial wait time before retrying an unresponsive gateway.
  • Backoff strategy: Determines how the wait time changes between retries. Accepted values:
    • Exponential: Doubles the base delay on each retry. If the base delay is 2 seconds, the wait time doubles on each subsequent retry: 4 seconds, then 8 seconds, then 16 seconds.
    • Fixed: The base delay remains constant on each retry. If the base delay is 2 seconds, the wait time remains 2 seconds before attempting the next retry.
  • Max delay (ms): The maximum wait time between retries. It is triggered when the backoff strategy’s wait time increases on subsequent retries.
For example, if the base delay is 2 seconds and the backoff strategy is exponential, the sequence would be 2 seconds, then 4 seconds, then 8 seconds. If the max delay is 5 seconds, it caps at 5 seconds.
  • Jitter (ms): Applies a random wait time (from 0 to the configured value) to spread retries so concurrent transactions during high-traffic periods don’t overwhelm the payment gateway at the same moment. Archefusion smart routing execution
Click the “Save Rule” button to save your changes.
Repeat this process for each new smart routing rule you want to create. For example, you can set up a separate rule for bank transfers or for transactions above or below a certain amount, depending on your preference.

Next step

Register your webhook endpoint with Archefusion to receive payment outcome notifications.