← All articlesCloud Infrastructure

Open-Source Payment Orchestration with HyperSwitch: Complete Guide

Deploy HyperSwitch for multi-PSP payment orchestration. Route payments through Stripe, Razorpay, Adyen — with smart routing, retry logic, and a unified API.

Y
Yash Pritwani
13 min read

What Is Payment Orchestration?

Payment orchestration sits between your application and payment processors (Stripe, Razorpay, PayPal, Adyen). Instead of integrating each processor separately, you integrate once with the orchestrator and it handles:

WebMobileIoTGatewayRate LimitAuthLoad BalanceTransformCacheService AService BService CDB / Cache

API gateway pattern: a single entry point handles auth, rate limiting, and routing to backend services.

  • Smart Routing: Route to the cheapest/fastest processor for each transaction
  • Failover: If Stripe fails, automatically retry with Razorpay
  • Unified API: One API for all payment processors
  • Analytics: Cross-processor reporting and reconciliation

Why HyperSwitch

HyperSwitch by Juspay is an open-source payment orchestrator built in Rust:

Get more insights on Cloud Infrastructure

Join 2,000+ engineers who get our weekly deep-dives. No spam, unsubscribe anytime.

  • 50+ payment processor integrations
  • Smart routing engine
  • Built-in retry logic
  • PCI-DSS compliant architecture
  • Self-hosted for full data control

Our Deployment at TechSaaS

HyperSwitch runs at pay.techsaas.cloud with 5 containers:

  1. hyperswitch-server: Core API (Rust, ~120MB)
  2. hyperswitch-consumer: Async event processor
  3. hyperswitch-producer: Event producer
  4. control-center: Admin dashboard (React)
  5. hyperswitch-web: Payment SDK (client-facing)

Total: ~260MB RAM.

API GatewayAuthServiceUserServiceOrderServicePaymentServiceMessage Bus / Events

Microservices architecture: independent services communicate through an API gateway and event bus.

Architecture

Client App → HyperSwitch API → Smart Router → Payment Processor
                    ↓                              ↓
              PostgreSQL DB              Stripe / Razorpay / Adyen
                    ↓
              Redis (caching)

Docker Compose Deployment

The deployment uses shared PostgreSQL and Redis, with Traefik routing:

  • pay.techsaas.cloud → Control Center (behind Authelia)
  • pay-api.techsaas.cloud → API (bypass Authelia, API key auth)
  • pay-sdk.techsaas.cloud → Web SDK (bypass Authelia, public)

Free Resource

Free Cloud Architecture Checklist

A 47-point checklist covering security, scalability, cost optimization, and disaster recovery for production cloud environments.

Download the Checklist
ProductionWeb ServerApp ServerDatabaseMonitoringStagingWeb ServerApp ServerDatabaseVLANBackupStorage3-2-1 Rule

Server infrastructure: production and staging environments connected via VLAN with offsite backups.

Key Lessons

  1. Use official TOML config: Don't hand-write the config, copy from the repo and patch your values
  2. API services bypass forward-auth: HyperSwitch API uses its own API key authentication
  3. Database migrations: Run diesel_cli migrations before starting the server

Self-hosted payment orchestration gives you full control over transaction data, no per-transaction fees from the orchestrator layer, and the ability to optimize routing across processors.

TechSaaS deploys and manages HyperSwitch for companies processing payments. Contact [email protected].

#hyperswitch#payments#fintech#self-hosted#orchestration

Related Service

Cloud Solutions

Let our experts help you build the right technology strategy for your business.

Need help with cloud infrastructure?

TechSaaS provides expert consulting and managed services for cloud infrastructure, DevOps, and AI/ML operations.

We Will Build You a Demo Site — For Free

Like it? Pay us. Do not like it? Walk away, zero complaints. You will spend way less than hiring developers or any agency.

47+ companies trusted us
99.99% uptime
< 48hr response

No spam. No contracts. Just a free demo.