Reevit

Smart Routing

Optimize success rates and minimize fees with priority-based routing rules

Smart Routing & Rules

The Reevit Routing Engine acts as a localized decision-maker for every transaction. It ensures that payments are sent to the provider most likely to succeed at the lowest possible cost, automatically failing over if the primary connection is unavailable.

https://dashboard.reevit.io
Live

Smart Routing Rules

Priority Evaluation
1
Ghana High-Priority
Active
gh / mpesa,card
Paystack
2
Global Card Routing
Active
any / card
Stripe
3
Failover: Hubtel
Active
any / any
Hubtel

💎 The Routing Advantage

🏢 For Business Revenue

  • Revenue Rescue (Failover): If your primary provider (e.g., Hubtel) goes down, Reevit detects the failure and instantly re-routes the payment to your fallback (e.g., Paystack). This happens in milliseconds, ensuring you never miss a sale.
  • Precision Fee Optimization: Route high-value transactions to providers with lower percentage fees, and small transactions to those with flat-rate pricing.
  • Regional Dominance: Use your "Home-Court" providers for local markets (like Hubtel in Ghana) while routing global card traffic to international providers like Stripe.

💻 For Engineering Precision

  • Logic Abstraction: Your application code doesn't need to know which provider is being used. It just sends the payment to Reevit, and the engine handles the logic.
  • Priority-Based Evaluation: Rules are evaluated in order of priority. You can create a "Broad" rule for a country and a "Specific" rule for a high-value customer that overrides it.
  • Dry-Run Testing: Test your routing logic in Sandbox Mode to see how the engine behaves before going live.

⚙️ How the Engine Works

When a payment is created, the engine follows these evaluation steps:

  1. Capability Filter: Only connections supporting the requested Method and Country are considered.
  2. Rule Match: The engine checks for any active Routing Rules that matches the request.
  3. Priority execution: If multiple rules match, the one with the Highest Priority is executed.
  4. Health Check: If a rule points to an "Unhealthy" connection, the engine will automatically Failover if enabled.

🛠️ Managing Rules

Creating a Rule via SDK

You can manage your routing logic programmatically or via the dashboard.

import { Reevit } from '@reevit/node';

const rule = await reevit.routing.createRule({
  name: 'Ghana MoMo → Hubtel Primary',
  countries: ['GH'],
  methods: ['momo'],
  connection_id: 'hubtel_live_primary',
  priority: 10,
  fallback_to_default: true // Attempt other Ghanaian connections if Hubtel fails
});

Rule Parameters

ParameterTypeDescription
PriorityIntegerRules with higher numbers are evaluated first (e.g., 10 > 5).
FallbackBooleanIf true, Reevit will try other active connections if the rule's target connection fails.
ConditionsFilterCombinations of country, method, and labels.

✅ Best Practices

  1. Start Broad, Then Refine: Create a "catch-all" rule for your target countries first, then add specific rules for certain payment methods.
  2. Enabled Fallback: Unless you have strict compliance reasons to use ONLY one provider, keep fallback_to_default set to true to maximize success rates.
  3. Monitor Health: Regularly check your Connection Health scores to see if the engine is frequently failing over. This may indicate a needed change in your primary rules.