Hyperswitch Razorpay integration

A plan for connecting Razorpay as a processor in a self-hosted Hyperswitch stack, covering activation, credentials, supported methods, webhooks and multi-processor checkout. Confirm connector specifics against the current Hyperswitch connector documentation before build.

On this page

How Razorpay fits into a Hyperswitch Razorpay integration

This section covers the work of configuring Razorpay as a connector in Hyperswitch, so that Razorpay credentials, payment methods and webhooks feed your self-hosted Router. For an Indian or India-facing merchant or platform, the supported path is the Hyperswitch Razorpay connector, not a custom plugin or a patch to the Router code. The connector name, the credential fields it expects, and the payment flows it supports must be confirmed against the current Hyperswitch docs and the Hyperswitch releases page, because no Razorpay-specific facts have been verified for this page. Treat any field name or flow list you find in older blog posts or forum threads as provisional until you check it against the release you plan to run.

Razorpay sits in the same position as any other processor in your Router: it receives authorization and capture requests that the routing layer sends to it, and it reports results back through webhooks that Hyperswitch must receive and verify. Your architecture decisions start with the question of whether Razorpay will be the only processor for Indian traffic or one of several. If it is one of several, the routing rules, fallback behavior and reconciliation of Razorpay transactions must be designed alongside the other connectors, not added afterward. Ask your team to document which payment methods will be enabled for Razorpay, which currencies and merchant accounts are in scope, and where the webhook endpoint will be reachable from Razorpay's side in your network design.

Before go-live, confirm three things with Razorpay and in your own environment: the credential set for each environment (test and live), the webhook secret handling in your secrets store, and the list of Razorpay events your Router will process. Your compliance and security reviewers will also want to know where Razorpay credentials are stored and who can rotate them, since those credentials control live payment flows. Write these answers down before the build starts, so the connector configuration can be tested against a sandbox and reviewed without relying on memory of the initial setup.

What you need before connecting Razorpay

Connecting Razorpay is the last step of a longer setup, not the first. Each item below is a dependency that, if missing, blocks the connector or makes failures hard to diagnose. Check them in order, because the running version determines which dependencies you must have in place.

A running self-hosted Hyperswitch stack

Confirm the router, scheduler and Control Center are running in the environment where you will test. Hyperswitch documents Helm on Kubernetes for production-style deployments and a Docker-based local setup for testing. Use the local setup to validate the Razorpay flow before you touch shared environments, and keep the same chart and image versions across environments so that a passing test means something.

Self-hosting docs

Superposition running before upgrade

The Hyperswitch v1.124.0 release notes make Superposition a required configuration dependency. Deployments must have a Superposition service running before they upgrade to that version. Confirm the running Hyperswitch version and whether Superposition is present, because a router upgrade without it can fail at startup and stop payment processing for every connector, not just Razorpay.

Compatibility matrix for your release

Pick the release you will run, then check the compatibility matrix on the releases page for the Control Center and web client versions that match it. Releases such as v1.126.0, v1.127.0 and v1.128.0 each publish this matrix. Record the chosen router, Control Center and SDK versions in your change ticket so that a later upgrade has a known baseline.

Releases and matrix

PostgreSQL and Redis healthy

The router and scheduler depend on PostgreSQL, which uses a master and replica setup, and on Redis for caching and the scheduler queue. Before adding a connector, confirm both are reachable from the router pods, that replicas are in sync, and that Redis has no eviction issues. Connector credentials and payment records are written here, so a degraded database will surface as connector errors that look like Razorpay problems.

Architecture docs

Control Center admin access

You need a Control Center user with an admin role to create the Razorpay connector and manage its settings. If you use single sign-on, note that the Control Center supports OpenID Connect only, that users must be invited before they can sign in, and that roles are managed in Hyperswitch rather than mapped from your identity provider. Invite the people who will configure connectors before the work starts.

SSO setup docs

Razorpay test account with API access

Create or confirm a Razorpay account with API access and test mode enabled. Generate test API credentials, store them in your secrets manager instead of in tickets or chat, and confirm which Razorpay webhook secret you will configure. Keep test and live credentials in separate environments so that a misconfigured test connector cannot send real transactions.

Razorpay payments return to the Router by two paths

The flow starts when the merchant's client or SDK sends a payment request to the Hyperswitch Router, which applies routing and retry logic before calling the Razorpay connector. Razorpay returns a result to the Router, and later events come back through the webhook endpoint. The Router stores payment state in PostgreSQL and caches data in Redis. Card details should go to a vault model that keeps cards out of the Router, so the Router handles only tokens. The trust boundary sits between the merchant's infrastructure and Razorpay. The Control Center is the operator view for configuration and monitoring, outside the payment path.

Payment, webhook and card data paths between merchant infrastructure and Razorpay.

Configuring the Razorpay connector in sequence

This sequence takes a Razorpay account from test credentials to a live connector in Hyperswitch, with a check at each step. The result is a connector that authorizes test payments, receives verified webhooks and shows matching records in the Control Center before any live traffic flows.

  1. Confirm Razorpay test credentials and account setup

    A merchant administrator with access to the Razorpay dashboard confirms that the account is active in test mode and that test API keys are available. Confirm which payment methods and currencies the account is approved for, since the Hyperswitch configuration must match them later. Ask Razorpay support or your account contact to confirm any approvals that are still pending. Check: you can sign in to Razorpay test mode, see a test key pair, and have a written list of approved methods and currencies.

  2. Add the Razorpay connector in Control Center

    An administrator opens the connector section of the Hyperswitch Control Center for the test merchant account and selects Razorpay. If your team prefers automation, use the API calls shown in the current Hyperswitch docs at docs.hyperswitch.io instead, and confirm the exact request format for your deployed version. Give the connector a clear label that names the environment, such as test. Check: Razorpay appears in the merchant's connector list with an unverified or untested status, and you have recorded the connector ID.

  3. Enter credentials and webhook secret

    Enter the Razorpay test key ID and key secret in the matching fields. If you set a webhook secret in the Razorpay dashboard, enter the same value so Hyperswitch can verify incoming webhook signatures. Store the values in your secrets manager and avoid pasting them into tickets or chat. Confirm the exact field names in the current connector documentation for your version. Check: the save completes without an error, the secret fields display masked values, and a connector test or authentication check reports success if the version offers one.

  4. Enable payment methods and currencies

    Select only the payment methods and currencies that the Razorpay account is approved to process. A mismatch between what Hyperswitch sends and what Razorpay accepts usually produces declines that look like processor errors, so keep the two lists identical. Also confirm how the merchant account in Hyperswitch maps to this connector if you run more than one. Record the final list in your configuration notes. Check: the enabled methods and currencies in Hyperswitch match the written list from the first step line for line.

  5. Point Razorpay webhooks at your deployment

    In the Razorpay test dashboard, add a webhook endpoint that points to the public HTTPS hostname of your Hyperswitch deployment, using the connector webhook path shown in the current docs. Subscribe to the payment and refund events your flows need. The hostname must be reachable from Razorpay, so a local-only address will not receive events. Check: Razorpay shows a successful delivery response from Hyperswitch for a test event, and the Hyperswitch logs show the event was received.

  6. Run an end-to-end test payment

    Using the test payment methods and test data that Razorpay provides for its test mode, create a payment through your Hyperswitch checkout or API call. Watch the payment move from creation to authorization, then run a capture if your flow uses separate capture. Note the Hyperswitch payment ID and the Razorpay payment reference. Check: the authorization succeeds, the payment appears in the Control Center with the correct amount, currency and connector, and the Razorpay dashboard shows the same reference.

  7. Verify webhook status updates and records

    Trigger the events your flow depends on, such as a capture or a refund, and confirm that each webhook reaches Hyperswitch, passes signature verification and updates the payment status. Compare the status in the Control Center with the status in Razorpay for the same payment reference. Repeat the test with a failed or declined test case so you know failure states also flow back correctly. Check: every status change in Razorpay appears in the Control Center within the time you observe, and no webhook is rejected for a signature error.

  8. Move to live credentials after test checks pass

    Switch to live Razorpay credentials only after every test check passes and the team has reviewed the configuration. Create a separate live connector entry or update the existing one according to the current docs, add the live webhook endpoint in Razorpay and confirm that live methods match the approved list. Then run one small transaction that you control and reconcile it against the Razorpay dashboard. Check: the live test transaction matches in both systems, and your team has signed off the configuration and webhook settings.

Mapping Hyperswitch objects to Razorpay concepts

This table pairs each Hyperswitch object with the Razorpay object it usually corresponds to, who owns the value, and what to check before go-live. Use it to plan reconciliation and webhook handling, and confirm every field name and status value against the current connector documentation and live Razorpay API responses in your own account, since those were not supplied for this page. The main takeaway is that the two platforms model the lifecycle differently, so mismatches are most likely in status transitions and identifiers.

Hyperswitch object or fieldRazorpay object or fieldWho owns the valueWhat to verify
Merchant accountRazorpay account (merchant ID)Your finance and operations team, set up in Razorpay and Hyperswitch Control CenterConfirm which Razorpay account ID maps to each Hyperswitch merchant and that live and test modes are not mixed
Connector accountAPI key pair (key ID and secret) for the Razorpay accountYour platform or security team, stored in your secrets managerConfirm the credentials are scoped to the intended account, rotated on a schedule and absent from logs
Payment intentOrderHyperswitch creates it at checkout, Razorpay issues the order ID for the connector callConfirm the order amount, currency and receipt reference match the Hyperswitch payment intent in every case
Payment attemptPaymentRazorpay assigns the payment ID once the customer pays through a methodConfirm that retries create new Razorpay payments and that the attempt-to-payment link is stored for reconciliation
RefundRefundYour operations team initiates, Razorpay confirms the refund IDConfirm partial and full refunds update the Hyperswitch refund status and that amounts agree with Razorpay settlement reports
Webhook eventWebhook event and event typeRazorpay sends them, your endpoint verifies signatures and Hyperswitch processes themConfirm the signature check uses the webhook secret from your account and that duplicate deliveries are handled idempotently
Status values (intent and attempt)Order and payment status valuesMapped by the Hyperswitch connector, reviewed by your engineering teamConfirm every Razorpay status in your live responses has a Hyperswitch equivalent and that unknown statuses alert instead of failing silently
Settlement and reference IDsSettlement reports and payment referencesYour finance team reconciles against Razorpay exportsConfirm which identifiers appear in settlement exports so your reconciliation job can match them to Hyperswitch records

Running Razorpay alongside other processors in one checkout

Hyperswitch decides which connector handles a payment through its routing configuration, and Razorpay is only one candidate in that decision. The documented strategies are rule-based routing, volume-based routing, auth-rate routing, multi-objective routing (which re-ranks auth rate by processor cost), least cost routing for debit networks, and default fallback routing for when no rule applies or a processor is ineligible. Each strategy answers a different question: rule-based routing sends traffic by attributes you define, auth-rate and multi-objective routing order processors by observed results, and fallback catches what the other rules leave unassigned. Before you pick a strategy, confirm with the Hyperswitch docs which strategies apply to the payment methods and currencies you plan to route, because support can differ by method and flow.

Razorpay's payment method coverage is the main input to eligibility. Confirm in your own Razorpay activation which methods, currencies and countries your merchant account accepts, then mirror those limits in your routing rules. A rule that sends a payment type Razorpay cannot accept to Razorpay will produce declines that look like processor failures in your reporting. Set rules so that anything outside Razorpay's enabled methods falls through to a second connector, and keep the default fallback pointed at a processor you have verified for that traffic. Test the fallback path explicitly, because it is the path most likely to be unused in normal operation and most likely to be broken when you need it.

Testing routing decisions costs engineering time and needs data. You need test transactions for each payment method and currency combination, sandbox credentials for every connector in the route, and a way to see which connector handled each attempt and why. Judge the routes on auth rate, decline reasons, fees and settlement timing, which requires reconciled data from each processor over a period long enough to cover your normal volume patterns. Ask your team or partner to state, in the written scope, which routing strategies will be configured, which payment methods and currencies each one covers, how the tests will be run and what reporting will show the results. Those answers determine most of the effort.

Single processor or multi-processor setups

When Razorpay is the only connector, Hyperswitch mostly acts as a thin orchestration layer in front of one processor. Routing decisions collapse to a single choice, so the configuration work centers on the Razorpay credentials, the enabled payment methods and the webhook path that reports payment state back to your system. This is the simplest model to test and to explain to auditors, because every payment, refund and settlement record traces to one source.

  • Credentials and merchant setup: Store the Razorpay key pair in your secrets system and confirm which environment (test or live) each Hyperswitch profile points at before go-live.
  • One webhook path: Register a single Razorpay webhook endpoint and verify its signature handling in your self-hosted stack, so state changes reach Hyperswitch once and only once.
  • Single reconciliation source: Plan reconciliation against Razorpay settlement reports alone, which keeps matching logic and exception queues simple for finance.
  • Limited fallback: With no second processor, a Razorpay outage or decline pattern has no automatic alternative, so decide whether manual fallback or a queued retry is acceptable.
  • Easy migration later: Keep Razorpay-specific fields out of your own data model so adding a second connector later does not force a schema change.

Before build starts, confirm with your Razorpay account team which payment methods your account can enable and what your operations team does during a processor incident. Check the Hyperswitch connector documentation for the current supported flows rather than assuming them.

Securing the Razorpay connection

A Razorpay connector gives Hyperswitch access to live money movement, so the controls around it matter as much as the connector configuration itself. The five controls below cover where secrets live, who can change the connection, how webhooks are trusted and how test and live work stay apart.

Keep API keys in your secrets manager

Store the Razorpay API key pair and the webhook secret in a secrets manager your team already operates, not in Helm values files, Git repositories or the Control Center notes field. Confirm which secret store your deployment reads from, how the connector credentials are injected into the Router, and who can read them. Rotate the keys on a schedule you document, and confirm the rotation steps with Razorpay and Hyperswitch before the first production cutover.

Restrict Control Center roles

Hyperswitch manages roles inside its own Control Center, so access is granted per user rather than inherited from your identity provider. Assign the smallest role that lets each person do their job, and review the user list on a fixed cadence. Because users must be invited before they can sign in, removing a departed employee is a Hyperswitch task as well as an identity provider task.

SSO setup docs

Single sign-on limits to OpenID Connect

The Control Center supports single sign-on through OpenID Connect only. SAML is not supported, and there is no JIT or SCIM provisioning. If your identity provider standardizes on SAML, plan an OIDC application for the Control Center or accept manual invitations. Confirm these limits against the current docs before you write them into an access policy.

Control Center SSO docs

Verify webhook signatures before processing

Razorpay sends payment and refund events to your Hyperswitch endpoint, and an unauthenticated endpoint would let anyone post false payment states. Confirm that the connector validates the webhook signature with the webhook secret before any event changes a payment record. Test a deliberately altered payload in staging and confirm it is rejected and logged. Restrict who can read the webhook secret, since it is the only proof of origin.

Separate test and live credentials

Keep Razorpay test and live keys in separate environments, with separate secrets, separate Hyperswitch merchant configurations and separate webhook endpoints. A test key must never be able to reach production traffic, and a live key must never appear in a sandbox deployment used by developers. Confirm the naming and promotion path for connector settings, and review who can copy credentials between environments.

Common Razorpay connector failures and how to fix them

This table pairs common Razorpay connector symptoms in Hyperswitch with a likely starting cause and a first fix to try. Treat each cause as a hypothesis to verify against your logs, configuration and the Razorpay dashboard, not as a confirmed diagnosis. Work top to bottom, since webhook and credential problems often explain several later symptoms.

SymptomLikely cause to verifyFirst fix to try
Razorpay events never reach the RouterThe webhook endpoint is not reachable from the internet, often because it sits behind a private ingress, VPN or firewall ruleConfirm the Router webhook path resolves and responds publicly through your load balancer or ingress, then send a test event from Razorpay and check the access logs
Webhooks arrive but the Router rejects themThe webhook URL configured in Razorpay does not match the environment, or the signing secret in Hyperswitch differs from the one Razorpay shows for that webhookCompare the URL and secret in the Razorpay webhook settings with the connector configuration for the same mode, then resend a test event and confirm the signature check passes
Payment routed to Razorpay fails with a method or currency errorThe payment method, currency or country is not enabled on the Razorpay account, or the routing rule sends traffic Razorpay was never set up to acceptCheck the enabled payment methods and currencies in the Razorpay account, then narrow the routing rule so only eligible requests reach the connector
Hyperswitch shows a payment as pending while Razorpay shows it capturedA webhook was missed, delayed or processed out of order, so the status update did not landCompare the payment ID across both systems, check webhook delivery history in Razorpay, and confirm the Router processed the event; resending the event usually corrects the state
Status flips back to an earlier state after a later eventOut-of-order webhook delivery overwrote a newer status with an older oneCheck event timestamps in the logs and confirm the status handling compares the event order before updating; retrieve the current payment status from Razorpay to reconcile
Router fails to start or errors after a minor release upgradeThe release requires Superposition as a configuration dependency and no Superposition service is running (documented for v1.124.0)Confirm a Superposition service is deployed and reachable from the Router before upgrading, and check the release notes for the target version
Control Center does not match the Router after an upgradeThe Control Center version is outside the compatibility matrix published for the new Router releaseCheck the compatibility matrix on the release page and upgrade the Control Center to a listed version in the same change window
Razorpay calls fail right after switching from test to liveLive API keys were not created, or test keys or test webhook secrets were left in the live connector configurationRe-enter live key ID and secret for the live mode, regenerate the webhook secret, and confirm the Razorpay account has completed activation for live payments

Questions buyers ask before connecting Razorpay

What does a Razorpay connector project include?

The work covers the Hyperswitch environment, the Razorpay connector setup, webhook endpoints and verification, routing rules that decide when Razorpay handles a payment, and end-to-end testing in Razorpay test mode. Environment work includes deploying the self-hosted stack in infrastructure you control and confirming that the Control Center and client SDKs match the Hyperswitch version you run. Each item should appear in a written scope with its deliverables and acceptance checks before work starts. Ask the provider to list each payment method you plan to enable, because the connector setup changes with that list.

What makes the effort on a Razorpay integration go up?

Effort rises with the number of payment methods you enable, the number of processors that share checkout, and how far reconciliation has to reach. Each added method needs its own configuration, test cases and webhook handling. Routing between Razorpay and other processors adds rule design, fallback behavior and sign-off cycles. Compliance evidence adds more work when auditors or internal reviewers want logs, configuration records and proof of how card data is handled. Clarify early whether Razorpay is one processor among several, because that single decision changes most of the plan.

Can our own team connect Razorpay to Hyperswitch without a partner?

Yes, a team can do this alone if it already runs Kubernetes in production, has engineers who have built and debugged payment webhooks, and has someone who understands your settlement and reconciliation process. The team also needs time to read the Hyperswitch documentation for the exact release it runs, because release notes can add required dependencies. Teams without this background often underestimate webhook signature checks, retry behavior and test data cleanup. A partner is most useful when the internal team lacks one of these skills or when deadlines are tight. Ask any provider to show how they would staff the work and which skills they would rely on.

How long does a Razorpay integration take to complete?

The duration depends on the scope, the state of your environment and how quickly test accounts and approvals arrive. A project with an existing, healthy Hyperswitch deployment and one processor moves faster than a greenfield build that also needs routing across several acquirers. No duration is stated here because it has to come from a written plan based on your inventory. Ask for a plan that lists milestones, the dependencies on your team and the points where the work pauses for sign-off. Treat any timeline given before the environment has been reviewed as a rough guess.

What do we need to provide for the Razorpay work?

You need to provide Razorpay test and live account access, owners for each Hyperswitch environment, and named approvers for routing rules and go-live. Your team should also supply the list of payment methods, currencies and business rules that Razorpay must handle. Security or compliance staff should confirm how credentials and webhook secrets are stored and who can rotate them. Late delivery of any of these items usually moves the schedule more than the technical work does. Confirm the exact list in the written scope so both sides know what they owe.

Which parts of a Razorpay integration are one-time and which recur?

Initial setup, connector configuration, routing design and testing are one-time costs. Ongoing costs include Hyperswitch upgrades, connector maintenance when Razorpay changes its API or webhook behavior, credential rotation and monitoring of payment failures. Hyperswitch publishes roughly monthly minor releases, so budget for regular upgrade review rather than a single update. Recurring work can be handled by your team or covered by a retainer, which DeployOpen offers for ongoing support, upgrades and continuous testing. Ask the provider to separate one-time and recurring items in the quote.

How DeployOpen scopes and delivers the Razorpay connector work

DeployOpen plans, builds, tests and documents Hyperswitch Razorpay integration inside your own infrastructure, so your team keeps control of credentials, webhooks and routing. Engagements start from a written scope that names the Razorpay features, the other processors in checkout and the evidence your reviewers need.

How we scope

  • Confirm which Razorpay payment methods and flows your checkout needs before any build starts.
  • Map which other processors stay in the same checkout and how traffic will be split between them.
  • Agree in writing the deliverables, environments, test accounts and handover items for the Razorpay connector.
  • Engagements are fixed-scope, and ongoing support is available as a retainer after go-live.

How we build

  • Configure the Razorpay connector in your self-hosted Hyperswitch environment with credentials held in your secrets store.
  • Set up Razorpay webhook endpoints and verify that event handling matches the payment states your team tracks.
  • Test authorization, capture, refund and failure paths against Razorpay test credentials before any live traffic.
  • Configure routing rules between Razorpay and other connectors, with default fallback behavior documented.

How we hand over

  • Document the connector configuration, credential locations, webhook URLs and routing rules in your own repository.
  • Provide a test report listing each payment flow, the result and any open items that need your decision.
  • Walk your payments, security and operations staff through runbooks for failed webhooks and processor outages.
  • Confirm with Razorpay and your compliance lead which evidence they need for review, and record the answers.

How we support

  • Review Hyperswitch release notes and the compatibility matrix before each upgrade that touches the connector.
  • Retest Razorpay flows after upgrades, connector changes or Razorpay API changes announced to your team.
  • Offer retainer support for monitoring, incident response and periodic routing reviews in your environment.
  • Agree the support scope, response expectations and retest cadence in writing as part of the retainer.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.