> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-hyperswitch/payments-modules/intelligent-routing.md).

# Intelligent Routing

The Hyperswitch Intelligent Routing module augments your payment processing by dynamically switching between processors in real-time for every transaction to optimally maximise first attempt auth rates and minimise processing cost.

### Types of Intelligent Routing

Hyperswitch supports four intelligent routing strategies:

* **Auth Rate Based Routing:** Uses real-time success rates and ML-driven optimisation to route transactions to the best-performing gateway.
  * The Auth Rates for the payments are tracked at a granular level of payment parameters like payment method, payment method type, amount, currency, authentication type, card network etc.
  * **The model** uses a Multi-Armed Bandit (MAB) problem with Delayed Feedback, where each Gateway is an "arm" with fluctuating success rates and varying latency for success and failure. The approach used to solve this problem is driven by **explore-exploit** strategy.
    * **Exploration:** We continuously evaluate all gateways by sending a small percentage of traffic to ensure up-to-date performance data.
    * **Exploitation:** We continuously route most traffic to the best-performing Gateway to maximise the overall success rate.
  * The sensitivity of the system can be tweaked by the merchants by configuring settings such as Bucket Sizes, Parameters to be considered and Hedging Percentage
  * The hedging percentage decides the exploration factor of the model
* **Least Cost Routing:** Picks the least cost network for every transaction basis the availability of back-of-the-card network and processor compatibility
* **Elimination Routing:** Tracks acute incidents such as downtimes and technical errors to de-prioritise gateways. This will be used as a final check after other routing logics are applied.
* **Contracts-Based Routing:** Distributes payments across processors to meet contractual volume commitments. \[BETA FEATURE]

### Architecture Diagram

<figure><img src="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-9e6555b3b0967f252ce3444b91761ba5fd947d3a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>Self Deploy the Routing Engine</td><td><a href="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-702b6a04d209ba6b388263c1bcb4ddbf4e9f939e%2Fimage.png?alt=media">image.png</a></td><td><a href="/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-hyperswitch/payments-modules/intelligent-routing/self-deployment-guide.md">Self-Deployment Guide</a></td></tr><tr><td>Using Auth Rate based Routing for Hyperswitch</td><td><a href="https://1943537505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf7BGdsPkCw9nalhAIlE%2Fuploads%2Fgit-blob-b8a702ea6e803761ad7b40b4dfd2a06674de081e%2FtryHyperswitch.jpg?alt=media">tryHyperswitch.jpg</a></td><td><a href="/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-hyperswitch/payments-modules/intelligent-routing/auth-rate-based-routing.md">Auth Rate Based Routing</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperswitch.io/~/revisions/0suhZ1q0uwhOXBI31wWf/explore-hyperswitch/payments-modules/intelligent-routing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
