# Least Cost Routing

### Get started with Least Cost Routing

Least Cost Routing (LCR) enables merchants to minimize transaction costs by dynamically selecting the most cost-efficient debit network for each transaction. The Juspay Hyperswitch routing engine evaluates parameters like network fees, interchange rates, ticket size, issuer type, and more to automatically route transactions through the cheapest network in real time.

### Pre-requisites for enabling Least Cost Routing

To get started with LCR in Hyperswitch, ensure the following setup is complete:

***Step 1:*** Configure connectors supporting transactions through local networks

***Step 2:*** Enable Debit Card Support

***Step 3:*** Enable one or more local debit networks in both connector and Hyperswitch dashboards

### Steps to configure Least Cost Routing in Smart Router:

***Step 1:*** Configure Prerequisites Ensure that connectors supporting transactions through local networks are set up with local networks enabled

***Step 2:*** Navigate to `Workflow` -> `Routing` -> `Least Cost Routing`

<figure><img src="/files/ufBSgkXFwCcgevtYi09P" alt=""><figcaption></figcaption></figure>

***Step 3:*** A popup will guide you to confirm the three prerequisites - 1.) Connector setup, 2.) Debit card enablement, and 3.) Local networks configuration. Click on `Enable` to activate LCR

<figure><img src="/files/fSSbcZ0f9Glvz62siOCx" alt=""><figcaption></figcaption></figure>

***Step 4:*** Once enabled, you can view Least Cost Routing as your active routing algorithm along with all previously configured algorithms on the [Hyperswitch Dashboard](https://app.hyperswitch.io/routing)

### Supported Configuration for Least Cost Routing

**Geographies**: US

**Networks**

* Star
* Pulse
* NYCE
* Accel

**Payment Methods**: Cards

### Real-time cost computation

We perform real-time computation to see if a Global network (Visa/Mastercard) vs Local network is preferable or which local network to choose

* We calculate transaction cost estimate using the MCC code supplied by merchant

<figure><img src="/files/4TTkgPerGrirjWe6EkZD" alt=""><figcaption></figcaption></figure>

* We look into amount (value) of transaction and Card Issuer bank to compute a cost of transaction and determine the right network to process.
* The system has default values baked-in to compute cost of transaction and make decisions. The LCR system is being designed to accept cost inputs from merchants. Specifically, if they have any PSP–Network level contracts that should be considered during network selection.
* We perform debit routing by specifying the network to be used in the API request to the PSP.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperswitch.io/integration-guide/workflows/intelligent-routing/least-cost-routing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
