Razorpay Optimizer vs Juspay HyperCheckout: Routing Rules, Failover and Rollback
Adding a second payment gateway sounds like insurance. In practice, it adds a new question every time a payment goes wrong: which system decided where the payment went, which system knows its real status, and who is allowed to switch traffic back when something breaks? Teams that skip those questions often find out during a sale, when a route slows down, payments sit in pending and two people change the same rule from different dashboards.
This guide compares two ways Indian payment teams add routing: Razorpay Optimizer, which adds rule-based routing across providers on top of a Razorpay integration, and Juspay HyperCheckout, a managed checkout that also routes across processors. It is written as an operator’s runbook: a setup comparison, a feature matrix, a hypothetical incident with rollback steps and a pilot scorecard. For webhook design across gateways, see our Razorpay vs Cashfree webhooks guide.
Facts come from public documentation checked on 30 November 2026. Eligibility and pricing are account-specific.
Quick answer: If you already run on Razorpay and want documented, rule-level control over which provider gets which payments, start with Razorpay Optimizer. It is enabled on request, needs no new technical integration for existing Razorpay merchants, lets you route by method, card attributes, bank and amount, and lets you order rules by priority. Evaluate Juspay HyperCheckout when your priority is a managed, cross-platform checkout across Android, iOS, web and hybrid apps, with health-score-based routing across several processors. With either product, the routing layer does not replace your own status checks, duplicate-payment protections and rollback plan.
Key takeaways
- Decide first which component chooses the route, which one owns the payment state and which one writes the final result to your order system. Mixing these up causes most multi-gateway incidents.
- Razorpay Optimizer documents rule conditions (payment method, channel, card IIN, card type, card brand, issuer, bank and amount) and a drag-and-drop rule priority order.
- Juspay’s dynamic routing scores each gateway and payment-method pair in 30-minute windows and moves traffic when a score falls below the threshold you configure.
- Choosing a route before an attempt is different from retrying after an ambiguous result. Never start a second attempt while the first is still pending.
- Pilot with matched cohorts and a written rollback trigger, and judge the result on authorization, time to a final status, duplicate attempts and reconciliation effort.
What changes when you move from one gateway to several?
With a single gateway, a partner-bank slowdown means every affected payment fails or waits, and the only lever is switching off a method. Routing adds alternatives, but each setup moves responsibility somewhere else.
| Setup | Who chooses the route | Who owns payment state | Who writes the final result | Main risk |
|---|---|---|---|---|
| One primary gateway | The gateway, internally | The gateway | Your server, from the gateway’s webhook and status API | No alternative path during partner downtime |
| Two gateways with rules (for example, Razorpay with Optimizer) | Rules you configure in the routing dashboard | The provider that processed the attempt, visible in one Razorpay view | Your server, after verifying the processing provider’s status | Rules that no one owns, or a rule change made mid-incident without a record |
| Orchestration layer that also manages checkout (for example, Juspay HyperCheckout) | The orchestrator, using static rules plus health scores | The orchestrator’s order record, which carries the gateway used | Your server, after calling the orchestrator’s server-to-server order status | Treating the orchestrator’s view and the underlying gateway’s view as two separate truths |
The final-result column should always be your server, acting on a verified server-side status, never a browser redirect.
How do Razorpay Optimizer and Juspay HyperCheckout compare?
| Capability | Razorpay Optimizer | Juspay HyperCheckout |
|---|---|---|
| What it is | Routing across multiple gateways and acquirers through one Razorpay integration | Managed native checkout SDK that orchestrates payment experience and routing |
| Activation | On request through Razorpay Support; no new technical integration for existing Razorpay customers | Juspay integration by platform; confirm onboarding and commercial terms |
| Rule conditions | Payment method, channel, card IIN, card type, card brand, card issuer, bank, transaction amount | Static rules plus health-based rules; pseudo-code routing configuration in the dashboard |
| Rule priority | Set Rule Priority popup after publishing a rule; drag rules into order | Priority ordering not described in detail on the overview page [confirm] |
| Traffic split | Percentage split across providers in the routing dashboard | Confirm with Juspay how percentage splits interact with health scores |
| Automatic routing | Smart Router option for dynamic route selection | Dynamic routing: gateway and method scored 0 to 1 per 30-minute window; downtime detection in about a minute; needs more than one processor |
| Checkout surface | Your existing Razorpay checkout | Managed UI for Android, iOS 12+, web, iFrame, Flutter, React Native, Cordova and Capacitor, with over-the-air configuration |
| Status source | Razorpay payment APIs and webhooks; single view of payments, refunds and settlements | Server-to-server Order Status API with gateway_id and transaction details; webhooks |
| Default route for unmatched traffic | Confirm configuration with Razorpay | Confirm configuration with Juspay |
Treat every “confirm” cell as a question to settle in writing, including the default route, any automatic retry behaviour and routing fees separate from processing rates.
Route selection versus retry after an ambiguous result
- Route selection happens before an attempt starts. Nothing has been charged yet, so changing the rule is low risk.
- Retry after an ambiguous result happens after an attempt has started and has not reached a final state. The customer may already have been debited. Whatever the routing layer does on failure, a pending attempt must be resolved before your system asks for money again.
Juspay’s Transaction Status reference marks PENDING_VBV and AUTHORIZING as non-terminal and says to keep polling until the order is charged or failed. Apply the same discipline on Razorpay.
Which routing rules should you start with?
Start with rules you can explain to finance and support: an amount-band rule that sends high-ticket cards to the provider with your preferred commercial terms, an issuer or bank rule based on your own historical data, and a small fixed percentage split of one method (for example, 10% of UPI) to compare like with like. Keep a written default for traffic that matches no rule, and make it the provider you trust most today.
Incident walkthrough: a route slows during the pilot
The scenario below is hypothetical. The controls are test requirements for your own team, not promises from either vendor.
| Time | What happens | Merchant-side control |
|---|---|---|
| T+0 | Pending UPI payments on provider B rise; median time to a final status doubles | Alert fires on pending-to-terminal time, not only on failure rate |
| T+5 min | Recovery owner confirms the pattern in the status API and the routing dashboard | One named owner; no one else edits rules during the incident |
| T+10 min | Owner shifts the UPI percentage split to 0% for provider B | Change recorded with time, old rule and new rule |
| T+10 min onward | Existing pending attempts on provider B continue | Poll each pending attempt; do not cancel, re-charge or move the order to failed |
| T+40 min | Provider B recovers; some pending payments succeed late | Fulfil only after a verified success; if a customer paid twice, refund the duplicate from the provider that captured it |
| Next business day | Owner decides whether to restore the split | Restore in steps; reconcile all affected orders first |
Five controls make this incident survivable:
- Merchant-side status checks: a server-to-server status call before fulfilment. On Juspay, use the Order Status API and evaluate each entry in txn_list where a split payment returns more than one transaction. On Razorpay, use the payment and order APIs alongside verified webhooks.
- Duplicate-collection protection: one order ID maps to one paid outcome. If a second payment succeeds for the same order, your system flags it for refund instead of fulfilling twice.
- Controlled traffic split: changes move in fixed steps (for example, 10% to 0%, then 0% to 5%) and each step is logged.
- Manual rollback: a written trigger, such as pending-to-terminal time above an agreed limit for 10 minutes, that lets the owner revert to the single-provider default without approval meetings.
- One owner: a single person or on-call role who changes rules and communicates with support. See our support and escalation comparison.
Juspay’s published polling schedule is a useful template: every 15 seconds for the first 90 seconds, then at 2, 5, 10 and 20 minutes, at 1 hour, and at 2, 6, 12 and 24 hours. Juspay also advises checking status once more before timing out an order, and refunding late successes. Adapt the schedule to your own provider’s guidance.
How should you measure the pilot?
Use matched cohorts: the same methods, customer mix and period, with only the route different. Moving premium cards to a new route and comparing them with everyone else shows an uplift routing did not cause.
| Metric | Definition | Why it matters |
|---|---|---|
| Authorization rate | Successful payments divided by attempts, with the denominator defined before the pilot | The headline number, but only meaningful on matched traffic |
| Pending-to-terminal time | Median and 95th percentile time from attempt to a final status | Catches slow routes before they show up as failures |
| Duplicate attempts | Orders with more than one successful payment | Measures whether retries and customer re-tries are under control |
| Reconciliation exceptions | Payments, refunds or settlements that need manual matching | Finance cost that never appears in a success-rate chart |
| Rule changes | Count and reason for each change during the pilot | Shows whether the rules are stable enough to scale |
For diagnosing failures by reason code once data comes in, see our Razorpay vs PayU payment analytics guide.
Rollout, incident and rollback scorecard
| Question | Razorpay Optimizer | Juspay HyperCheckout |
|---|---|---|
| Can we start without rebuilding checkout? | Yes for existing Razorpay merchants, per Razorpay’s docs | Requires adopting the HyperCheckout SDK or web integration |
| How fast does traffic move away from a bad route? | Manual rule change or Smart Router; confirm automatic behaviour | Health-score routing, downtime detection in about a minute per Juspay |
| Where do we confirm final status? | Razorpay APIs and webhooks | Juspay Order Status API and webhooks |
| How do we roll back? | Reorder or disable rules; return to default provider | Change routing configuration or thresholds; confirm how to force a single gateway |
| Where do refunds and settlements appear? | Single Optimizer view across payments, refunds and settlements | Order record with refund fields; reconcile with each underlying gateway |
Why we recommend Razorpay Optimizer first for existing Razorpay teams
- Lower integration risk: Razorpay states that existing customers need no new technical integration, so the pilot changes routing, not your checkout code.
- Documented rule-level controls: the conditions and drag-and-drop rule priority are written down, which makes it easier to review rules, record changes and roll back.
- One operational view: payments, refunds and settlements across providers appear in one place, which reduces reconciliation work during and after an incident.
This recommendation is conditional. Verify each intended route and method on your account first. These are operational reasons, not evidence of higher success rates.
When Juspay HyperCheckout may fit better
Juspay suits teams that want a managed checkout as much as routing: consumer apps on several platforms, teams that want to change payment-method order or styling over the air without app releases, or businesses running several processors that want health-score routing across them. Confirm how priority, splits and forced rollback work for your configuration.
FAQs
1. Is Razorpay Optimizer enabled automatically?
No. Razorpay describes Optimizer as an on-demand feature that you request through Support. Activation, supported providers and commercial terms are confirmed per account.
2. What conditions can Razorpay Optimizer rules use?
Razorpay’s documentation lists payment method, channel, card IIN, card type, card brand, card issuer, bank and transaction amount. You can also split traffic by percentage and set the order in which rules apply.
3. How does Juspay decide to move traffic to another gateway?
Juspay scores each gateway and payment-method combination between 0 and 1 in 30-minute windows. When a score falls below the threshold you configure, its decider looks for another gateway with a better score.
4. Should we retry a pending payment on a different gateway?
No. A pending payment may already have debited the customer. Poll the authoritative status until it is final. Only start a new attempt after the first has failed, and protect the order against a second success.
5. What should trigger a rollback during a routing pilot?
Agree the trigger before the pilot, for example pending-to-terminal time or failure rate on the new route above a set limit for a set period. Give one owner authority to revert to the default provider immediately, and log every change.
6. Does a routing layer guarantee higher success rates?
No. Routing helps only where another supported path exists. Issuer declines, customer authentication and account restrictions need other fixes.