LogoLogo
Explore with DeepWikiJoin Slack CommunityContact Us
  • About Hyperswitch
    • Exploration Guide
    • Overview
    • Payments Suite
    • Payments Modules
      • Cost Observability
      • Revenue Recovery
      • Vault
        • Server to Server Vault tokenization
        • Vault SDK Integration
        • Hyperswitch Vault: Pass Through Proxy Payments
      • Intelligent Routing
        • Auth Rate Based Routing
        • Self-Deployment Guide
      • Reconciliation
        • Getting Started with Recon
      • Alternate Payment Method Widgets
        • Hyperwidget Integration Guide
    • Roadmap - Q2 2025
      • Previous Roadmap - Q1 2025
      • Previous Roadmap - Q4 2024
      • Previous Roadmap - Q3 2024
      • Previous Roadmap - Q2 2024
      • Previous roadmap - Q1 2024
      • Previous roadmap - Q4 2023
  • Use-Cases
    • For SaaS Businesses
    • For B2B SaaS Businesses
    • For E-Commerce Businesses
    • For Marketplace/Platforms
  • Explore Hyperswitch
    • Payment Orchestration
      • Accept Payments
        • Connectors
          • Activate Connector on Hyperswitch
          • Try a Payment
          • Available Connectors
            • ACI
            • Adyen
            • Airwallex
            • Authorizedotnet
            • Bambora
            • Bank of America
            • Billwerk
            • Bluesnap
            • Braintree
            • Checkout
            • Coinbase
            • Cybersource
              • Apple Pay
              • Google Pay
            • dLocal
            • Fiserv
            • GlobalPayments
            • GoCardless
            • Klarna
            • Mollie
            • MultiSafepay
            • Nuvei
            • OpenNode
            • Paypal
            • PayU
            • Prophetpay
            • Rapyd
            • Shift4
            • Stripe
            • TrustPay
            • Volt
            • Worldline
            • Worldpay
            • Zen
            • Netcetera
              • Authenticating Payments via Netcetera Through HyperSwitch SDK
        • Setup Payment Methods
          • Cards
          • Wallets
            • Apple Pay
              • Web Domain
              • iOS Application
            • Google Pay
            • PayPal
          • Pay Later
          • Banks
            • Bank Debits
            • Bank Redirects
            • Bank Transfers
            • Open Banking
          • Crypto
          • Test Credentials
        • Payment Links
          • Configurations
          • Create Payment Links
          • Secure Payment Links
          • Setup Custom Domain
        • Save a Payment Method
        • Manual Capture
        • Incremental Authorization
        • Tokenization & Card Vault
          • Network Tokenisation
        • Supported Payment Workflows
        • Co-badged Cards
        • Webhooks
      • Process Payouts
        • Getting Started with Payouts
        • Using Saved Payment Methods
        • Smart Router for Payouts
        • Smart Retries in Payout
        • Payout Links
      • Smart Routing
        • Rule Based Routing
        • Volume Based Routing
        • Default Fallback Routing
      • Smart Retries
        • 3DS Step-up Retries
      • 3DS / Strong Customer Authentication
        • Setting up 3DS Decision Manager
        • Native 3DS Authentication
        • External Authentication for 3DS
      • Fraud & Risk Management
        • Activating FRM in Hyperswitch
        • Fraud Blocklist
      • Subscriptions
        • PG Agnostic Card Forwarding
        • Zero Amount Authorization
      • Split Payments
        • Stripe Split Payments
        • Adyen Split Payments
        • Xendit Split Payments
    • Checkout Experience
      • Customizable and Native Integrations
        • Web
          • Node And React
          • Customization
          • Error Codes
          • Node and HTML
          • Vanilla JS and REST API Integration
        • Android
          • Kotlin with Node Backend
          • Customization
          • Features
        • iOS
          • Swift with Node Backend
          • Customization
          • Features
        • React Native
          • React Native with Node Backend
          • Card Widget
          • Customization
        • Flutter
          • Flutter with Node Backend
          • Customization
        • Headless SDK
        • Server Setup
      • Click To Pay
        • Visa Click to Pay: V1 to V2 Migration
      • Payment Methods Management
    • Payment Operations
      • Managing Accounts and Profiles
        • ⚙️Control Centre Account setup
        • Hyperswitch Account Structure
      • Manage Your Team
      • Analytics & operations
        • Exporting payments data
      • Disputes / Chargebacks
      • Surcharge
        • Surcharge Setup guide
      • Multi-Tenancy
      • Data migration
        • Import data to Hyperswitch
        • Export data from Hyperswitch
    • Security and Compliance
      • PCI Compliance
      • Data Security
      • GDPR compliance
      • Identity and Access Management
    • E-commerce Platform Plugins by Hyperswitch
      • 🔌WooCommerce Plugin
        • Setup
        • Roadmap
        • Compatibility
        • FAQs
      • Saleor App
        • Setup
      • Automatic Tax calculation for Express Checkout wallets
  • Hyperswitch open source
    • Overview
      • Run Hyperswitch Locally Using Docker
        • Run Additional Services
      • Development Environment Setup
        • Backend
          • Configure and Run the Application
          • Try out APIs
        • SDK (Frontend)
        • Control Center
    • Deploy on AWS
      • Deploy on AWS using CloudFormation
      • Component-wise Deployment
        • Deploy app server
        • Deploy Control Center
        • Deploy web client
          • Production ready deployment
          • Integrate web client on your web app
          • Playground deployment for prototyping (optional)
        • Deploy Card Vault
          • Production ready deployment on AWS
          • Cloud setup guide
    • Deploy on Kubernetes
      • Deploy on GCP Using Helm Charts
      • Deploy on Azure Using Helm Charts
    • Account setup
      • Using Hyperswitch Control Center
      • Test a payment
      • Using postman
    • Troubleshooting
  • Testing Payments
  • Check list for Production
    • Going live
      • For SaaS Setup
      • For On-Prem Setup
        • Monitoring
        • PCI compliance
          • Get started
          • Completing the SAQ
        • Data Security
        • Updates
  • Learn more
    • API Reference
    • Connectors Supported
    • SDK Reference
      • React
      • JS
      • Custom Events
    • Hyperswitch architecture
      • Router
      • Storage
      • A Payments Switch with virtually zero overhead
    • Payment flows
    • Blog
  • Community Guidelines
Powered by GitBook

Compliance

  • Vulnerability Disclosure
  • PCI DSS 4.0
  • ISO 27001:2022

Community

  • Slack
  • Discord
  • GitHub Discussion
On this page
  • How does it work?
  • How to setup Auth Rate Based Routing for your Hyperswitch Merchant?
  • How to test the routing behaviour?

Was this helpful?

  1. About Hyperswitch
  2. Payments Modules
  3. Intelligent Routing

Auth Rate Based Routing

Last updated 1 day ago

Was this helpful?

How does it work?

Auth Rate Based Routing is a smart, adaptive approach to optimize transaction success across multiple gateways.

At its core, the system treats each Gateway as a dynamic option in a decision-making model known as a Non-stationary Multi-Armed Bandit (MAB) with Delayed Feedback. This allows the routing logic to account for both fluctuating success rates and variable response times.

The routing strategy follows a two-part approach:

  • Exploration: A small share of traffic is continuously routed to all Gateways to gather current performance data.

  • Exploitation: The majority of traffic is directed to the top-performing Gateway to maximize success rates.

To keep decisions current and responsive, the system uses a sliding window to track recent performance, enabling fast adaptation to changing conditions—without requiring any manual intervention or downtime.

By intelligently balancing experimentation with optimization, Auth Rate Based Routing helps ensure higher authorization success, improved customer experience, and better utilization of Gateway infrastructure.

Key Configurations

  • Bucket size : No. of payments included in a block limited by count or time period

  • Aggregate pipeline size :

    • Max: No. of buckets used to calculate scores (FIFO manner). It determines the reaction time

    • Min: No. of buckets after which the scores will be used. It is equivalent to the zero error/offset for error tolerance

How to setup Auth Rate Based Routing for your Hyperswitch Merchant?

  1. Enabling your profile with Auth Rate based routing

curl --location --request POST 'https://sandbox.hyperswitch.io/account/<merchant_id>/business_profile/<profile-id>/dynamic_routing/success_based/toggle?enable=dynamic_connector_selection' \
--header 'api-key: <api-key>'
  1. Roll it out to the required split of payment traffic (Merchants can stagger a certain percentage to experiment)

curl --location --request POST 'https://sandbox.hyperswitch.io/account/<merchant-id>/business_profile/<profile-id>/dynamic_routing/set_volume_split?split=100' \
--header 'api-key: <api-key>'
  1. To update the setting of the routing model use the below API:

curl --location --request PATCH 'https://sandbox.hyperswitch.io/account/<merchant-id>/business_profile/<profile-id>/dynamic_routing/success_based/config/<routing-id>' \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '{
        "min_aggregates_size": 5, // Min. no. of buckets used to caluclate score
        "max_aggregates_size": 8, // Max. no. of buckets used to calculate score
        "current_block_threshold": {
            "max_total_count": 5, // Number of payments in a Bucket 
            "exploration_percent": 20.0 
        }
}'
  1. Activating the updating configuration

curl --location --request POST 'https://sandbox.hyperswitch.io/routing/<routing-id>/activate' \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>'

How to test the routing behaviour?

You can use the routing playground tool to simulate different payment scenarios to test the routing behaviour

  1. Create a merchant on Hyperswitch Control Center

  2. Ensure to configure atleast two payment processors for the merhcant profile

  3. Enter the sandbox API key, merchant id and profile id in the modal that pops-up once you click the 'Start Simulation' button on the top-right corner

  4. Head to the 'routing' tab on the left nav bar and toggle the Success Based Routing button

  5. Select the desired routing configuration settings

  6. Head to the 'general' tab on the left nav bar and enter the no. of payments you want to trigger in batches

  7. Hit Start Simulation to see the results

  8. You can use the Test Payment Data tab on the left nav bar to modify the processor auth rates to see how it will impact the routing choices

Access the tool using this URL -

https://hyperswitch-ten.vercel.app/