---
url: /relypay-whmcs/features/routing.md
description: >-
  RelyPay decides which provider takes each payment using four layers in a fixed
  order — currency, amount, volume and fallback. This page explains each layer
  and how they are evaluated.
---

# Routing

Your customers choose a **payment method** — UPI, Cards, Net Banking and so on. RelyPay
then chooses the **provider** that actually takes the money. Routing is the set of rules
that make that choice, resolved fresh for every transaction. You configure it under
**Addons → RelyPay → Routing**.

![The RelyPay routing rules screen](/relypay-whmcs/img/relypay-routing-layers.png)
*Addons → RelyPay → Routing*

::: tip Routing vs Allocations
Routing decides **which provider** takes a payment. [Allocations](/relypay-whmcs/features/allocations)
decide **which checkout options a customer even sees**. They work together but are set up
on separate tabs.
:::

## The four layers, in order

RelyPay evaluates four layers in a fixed sequence and **only the first matching layer
decides the provider**. As soon as one layer names an enabled, fully-configured provider,
the search stops — the remaining layers are never consulted for that payment.

1. **Currency routing (non-INR).** Assign one or more providers to each currency code
   (USD, EUR, GBP, and so on). When you assign several providers to the same currency,
   RelyPay rotates between them randomly by **weight** — a higher weight means a larger
   share of that currency's traffic.
2. **Amount routing (INR).** Route INR payments by amount slab. Each slab has a **From ₹**
   and **To ₹**, names a provider, and carries a **priority (1–5)**. This is where you send
   small tickets to a cheaper provider and larger tickets somewhere else.
3. **Volume routing (percentage).** Spread INR traffic across providers by percentage
   share (1–100%) — for example **70% Razorpay / 30% Cashfree**. Use this to balance load
   or to phase a new provider in gradually.
4. **Fallback.** The default used when nothing above matches. It is a **priority chain
   (1–5)** and RelyPay uses the first enabled, fully-configured provider in the chain.
   Fallback is set **separately for INR and for non-INR**.

::: info A layer only "fires" when it can
A layer only decides the payment if the provider it names is **enabled and configured**.
If a slab points at a provider you have not set up, RelyPay skips that layer and keeps
looking down the list — so a half-finished rule never breaks checkout.
:::

## In plain English

* A **non-INR** payment is checked against your **currency rules** first. If a rule covers
  that currency and its provider is ready, that provider is used.
* An **INR** payment is checked against your **amount slabs**, then your **volume split**.
* If nothing above matches — or the matched provider is not ready — RelyPay uses the
  **fallback** chain for that currency scope (INR or non-INR).

## Worked examples

**A ₹499 UPI payment.** Currency routing is skipped (this is INR). RelyPay checks amount
slabs; a slab of **From ₹0 – To ₹1000 → Cashfree** matches, so Cashfree takes it. Volume
routing and fallback are never reached.

**A ₹5,000 card payment with a 70/30 split and no matching slab.** No amount slab covers
₹5,000, so RelyPay drops to volume routing and sends roughly 70% of such payments to
Razorpay and 30% to Cashfree.

**A $120 international card payment.** RelyPay checks currency routing first. A rule of
**USD → PayGlocal** matches, so PayGlocal handles it. If you had assigned both PayGlocal
and another provider to USD with weights, RelyPay would rotate between them by weight.

**A currency with no rule at all.** Say a customer pays in SGD but you have no SGD rule.
Currency, amount and volume all miss, so RelyPay uses the **non-INR fallback** chain and
picks the first ready provider in it.

## INR vs non-INR fallback

Fallback is chosen **separately** for the two currency scopes because the providers that
make sense differ:

* **INR fallback** — the safety net for domestic payments (UPI, Cards, Net Banking and the
  rest). Order your best domestic providers 1–5.
* **Non-INR fallback** — the safety net for international payments (international cards,
  PayPal). PayGlocal typically belongs high in this chain because it handles international
  cards and recurring mandates.

::: tip Always keep a fallback ready
Fallback is what keeps checkout working if a specific rule points at a provider that is
temporarily misconfigured. Put at least one enabled, fully-configured provider at the top
of each fallback chain and your customers can always pay.
:::

Default routing is seeded when you activate RelyPay, with PayGlocal set as the default
recurring provider. Review it under **Addons → RelyPay → Routing** and adjust the layers
to match how you actually want payments to flow.

## Related pages

* [Allocations](/relypay-whmcs/features/allocations) — control which sub-gateways each
  customer sees at checkout
* [Sub-gateways](/relypay-whmcs/features/sub-gateways) — the checkout options customers pick
* [Configuration](/relypay-whmcs/configuration) — connect the providers routing chooses
  between
* [Transactions](/relypay-whmcs/features/transactions) — see which provider each payment
  was routed to
