Hyperswitch encryption service and per-merchant data encryption keys

The Hyperswitch encryption service and Key Manager add a data encryption key per merchant for connector credentials and customer PII. This page explains when you need them, how they differ from the card vault, and what to plan before you self-host.

On this page

Hyperswitch encryption service and per-merchant keys: what it adds and when you need it

A self-hosted Hyperswitch deployment that holds connector credentials and customer PII for several merchants needs key management that keeps one merchant's protected data readable only through that merchant's keys. The optional encryption service provides that key management layer, and the Key Manager is the component that handles the data encryption keys it relies on. Hyperswitch lists the encryption service as its own component, separate from the Rust core app server and from the card vault, which is a distinct Rust service in its own repository and stores card data. The encryption service therefore protects other sensitive application data. Enabling it does not decide where card numbers live, which remains a separate vault decision.

Teams typically need the service when one installation serves multiple merchants whose data must be separated, such as a platform that onboards merchants under its own brand, or when a customer security review asks how connector credentials are isolated between tenants. A single shared key is simpler to run, but it means one key compromise exposes every merchant's data at once. Teams that assess their software against the PCI Secure Software Standard (PCI SSS) should ask their assessor whether per-merchant key handling is expected for their architecture, because the answer determines whether the service is a requirement or an optional control.

Before enabling the service, confirm the exact configuration in the Hyperswitch self-hosting documentation, including how merchant keys are created, where they are stored, how rotation works and which backends are supported. Inventory the data sets that would move under merchant keys, and agree who owns key creation and rotation for each merchant. Plan the key backend (cloud KMS, HashiCorp Vault or an HSM) alongside the rest of the key design, and test restore and rekeying in a non-production environment before any real merchant data is encrypted under the new scheme.

Keep card data and per-merchant keys on separate paths

The diagram starts at the Router app server, which sends connector credentials and customer PII to the encryption service for per-merchant data encryption keys. The service gets key operations from the key backend (KMS, HashiCorp Vault or an HSM) and stores encrypted records in PostgreSQL. Card numbers take a separate path to the card vault, which has its own database and sits inside its own boundary. Check that the key backend is reachable only from the encryption service and that the vault's keys are never stored in the application zone.

Per-merchant key path and separate card vault path, with the key material boundary marked.

Which key setup fits your merchant model

A single-merchant stack has one business owner for every key, so the main questions are where the keys live and who can recover them, not how to separate tenants. Hyperswitch documents the encryption service as the component that manages keys for sensitive values the app server stores. If you enable it, connector credentials and customer PII are the values it protects. Confirm the exact data classes covered in your release, because the docs and release notes change with each minor version.

  • Connector credentials: processor API keys and signing secrets are the highest-value values in this setup, and one key protecting them is still a single point of failure.
  • Customer PII: names, emails and addresses written to PostgreSQL need the same key discipline as any other personal data.
  • Key backend: choose the backend for your cloud or data center before go-live, because moving keys later means re-encrypting stored values.
  • Recovery: document how you regain access to keys if the key store is lost, and rehearse that restore on a copy of your data first.
  • Rotation: confirm whether the service can rotate keys and re-encrypt existing records, and estimate the time that takes on your data volume.

Before you commit, confirm with Hyperswitch which values the service encrypts in your version and how key rotation is performed.

Configuration options and when each fits

This table compares the key storage options named for Hyperswitch key management (cloud KMS, HashiCorp Vault, HSM and local configuration) by documented coverage, operational burden, custody and audit evidence. It shows which backends the docs tie to the encryption service and which to the card vault. Treat that coverage as a starting point and confirm each backend with Juspay before you commit to it.

Key storage optionDocumented coverageOperational burdenCustody and audit evidence
Cloud KMS (AWS KMS)Documented as an aws backend for both the card vault and encryption service chartsLow to moderate: KMS key and region, plus IAM roles for service accounts on EKSCloud account owner controls the key policy. Confirm which key usage events the provider logs and how you export them.
HashiCorp VaultDocumented for both the card vault and encryption serviceModerate to high: token and URL settings, plus running Vault in high availabilityYour team holds the Vault tokens and unseal material. Confirm which audit devices the integration needs and what they record.
Hardware security module (HSM)Docs place HSM alongside KMS and vault as a key storage layer. Confirm which HSM integration the encryption service supports.Highest: hardware, firmware, redundancy and split-control proceduresKey material stays in hardware under your custodian procedures. Audit evidence comes from HSM logs and custodian records.
Local configuration (keys in config or cluster secrets)Confirm with Juspay whether local key material is supported for the encryption service in productionLowest to set up, but you own every rotation and access reviewAnyone who can read the cluster secrets or config holds the keys. Audit evidence is usually thin unless you add it.
Hosted Hyperswitch Vault (SaaS)Documented for self-hosted orchestration with Juspay's SaaS vault. Confirm whether it also covers merchant keys for the encryption service.Lower key handling on your side, with a dependency on the hosted serviceJuspay holds the vault keys. Confirm the audit and custody terms in writing.
Per-merchant data encryption keysConfirm with Juspay which backends create and store a separate key per merchantAdds key inventory, rotation and access review for each merchantEach merchant's keys need their own audit trail. Ask how key IDs map to merchants in each backend.

How to set up per-merchant encryption keys in your environment

This sequence takes you from confirming the documented deployment model to proving that merchant connector credentials and customer PII are encrypted under per-merchant keys, with rotation and restore tested before go-live. Each step ends with a check you can record as evidence.

  1. Confirm the deployment model in the docs

    Your platform or security lead reads the Hyperswitch self-hosting documentation and the vault deployment model pages, then writes down which model you are running: self-hosted with the native in-house vault, self-hosted orchestration with an external PCI vault, or self-hosted orchestration with the SaaS Hyperswitch Vault. The choice decides whether the encryption service is needed for card data at all, so it must be settled first. Check: a signed design note names the model, the Hyperswitch version you will deploy, and the owner of PCI DSS scope decisions. Confirm the exact version compatibility requirements with the release notes before you pin anything.

  2. Choose the key storage backend

    Your security and infrastructure teams select where the master key material lives: a cloud KMS, HashiCorp Vault, an HSM-backed option, or local configuration for non-production work. Document who can administer the backend, how access is logged, and how the backend is made highly available, because every restart of the encryption service depends on it. Ask the Hyperswitch maintainers or your partner to confirm which backends the chart version you chose supports and which settings change between them. Check: a backend decision record lists the owner, the access policy and the recovery path, and it is approved by the security function.

  3. Deploy the encryption service with the app server and vault

    Your platform team deploys the encryption service in the same Kubernetes namespace or cluster as the Router app server and the card vault, using the Helm charts from the Hyperswitch self-hosting guides. Network policies should allow only the services that need key operations to reach the encryption service, and secrets for backend access should come from your secrets manager rather than values files in source control. Check: all three components report healthy in their readiness probes, and a test request from the app server succeeds while a request from an unapproved pod is refused.

  4. Create and register merchant keys

    Your operators create a data encryption key for each merchant account through the documented key management flow, then the app server records the key reference against that merchant. Keep a register that maps merchant identifiers to key references, the backend that holds each key, and the creation date and approver. Keys must be created for every merchant before that merchant's connector credentials or customer records are written. Check: the register matches the merchant list in the database, and a sample merchant returns a key reference from the backend rather than a plain key.

  5. Verify connector credentials and PII are encrypted at rest

    Your security engineers write one test merchant with a connector credential and a customer record, then inspect the database tables directly with read-only access. The stored values for connector secrets and personal data should be ciphertext, not readable strings. Repeat the check after a restart of the encryption service to confirm no plain values were cached to disk or logs. Check: a dated test record shows encrypted values in every table you reviewed, and log samples contain no connector secrets or customer identifiers in clear text.

  6. Test key rotation and restore

    Your operators rotate a test merchant key using the documented procedure, then confirm the existing records still decrypt and new writes use the new key reference. Separately, restore the database and the key backend into a scratch environment and confirm the encryption service can read the restored data. Record how long each step took and where the procedure needed manual intervention. Check: the rotation log shows old and new key references, a sample record decrypts after rotation, and the restore test completes with the same records readable. Ask your backend vendor to confirm how key backups and restores are handled for the backend you chose.

Security and operational risks of per-merchant keys

A per-merchant data encryption key protects each merchant's connector credentials and customer PII, but it also adds key custody, rotation, backup, logging, isolation and availability dependencies. The cards below cover the failure modes that a self-hosting team should design for and test before relying on the encryption service in production.

Key custody and custodian roles

Every merchant key is only as protected as the people and systems that can reach it. Decide which named roles can generate, read, rotate or unwrap keys, and keep those roles separate from the people who administer the application database. Ask Hyperswitch and your key backend how key material is generated, where it is held and what a custodian departure requires. Document the answers before the first merchant is onboarded, since changing custody later means re-keying live data.

Self-hosting docs

Key rotation and re-encryption effects

Rotating a merchant's data encryption key means the stored connector credentials and customer PII must be re-encrypted under the new key, and some records may be unreadable during the change. Confirm whether rotation can run without downtime, which tables and fields it touches, how long old and new keys coexist, and when the old key can be destroyed. Test a rotation on a copy of production data, and record the rollback path if re-encryption stops partway through.

Backup and restore of key material

A database backup holding encrypted merchant data is useless without the key material that can decrypt it, and a key backup without the matching database snapshot is equally incomplete. Back up the key backend and the PostgreSQL data on a schedule that keeps them consistent with each other, store key backups in a separate trust domain, and restore both into a staging environment at least once. Write down who can authorize a key restore, because a restore that bypasses custodian controls defeats the purpose of the design.

Access logging for key use

Each decrypt call and key fetch is an event that an auditor or incident responder may need to reconstruct. Confirm what the encryption service records, including the calling service identity, the merchant identifier, the operation and the time, and whether those entries reach a central log store that the application team cannot edit. Check that logs contain no plaintext credentials or PII, and set alerts for unusual volumes of key access from a single service.

Tenant isolation mistakes

The main promise of per-merchant keys is that one merchant's data cannot be decrypted with another merchant's key. Misconfiguration can break that promise, for example when a merchant record maps to the wrong key identifier, when several merchants share a key by mistake, or when a staging environment reuses production key references. Test cross-merchant decryption attempts in a non-production environment, review the mapping logic in any multi-tenant setup, and confirm that environment separation covers key identifiers as well as data.

Outage when the key backend is unreachable

If the application server cannot reach the key backend, it may be unable to decrypt connector credentials, which can stop payment processing for affected merchants. Ask how the encryption service behaves during a backend outage, whether any key material is cached and for how long, and which requests fail first. Plan high availability for the key backend, define a runbook for partial outages, and include a key backend failure in your load and chaos testing. The architecture doc is a useful starting point for mapping which services depend on which stores.

When PCI SSS makes a per-merchant key model necessary

Whether PCI SSS applies to your Hyperswitch deployment is a scoping question you answer with a qualified assessor, not a feature you switch on. PCI SSS, the PCI Software Security Framework, is the standard for payment software that handles sensitive payment data, and it asks the software vendor and its customers to show that the software protects that data through its design, its configuration and its key management. Whether a given self-hosted stack falls under it depends on what the software does in your environment, which connectors and vault model you run, and how your merchant assessment defines the boundary. Confirm that boundary before you decide the key model, because the answer changes what evidence you need.

The per-merchant encryption model matters most when one Hyperswitch installation serves several merchants or business units that must be kept apart. In that setup, the encryption service and Key Manager can hold a separate data encryption key for each merchant, so connector credentials and customer PII belonging to one merchant are not protected by the same key as another's. Ask your assessor whether they expect that separation as evidence of logical isolation, and whether a single shared key with strict access controls would be accepted for your structure. Also confirm which key storage backend you will use, since the backend determines how key custody and rotation are demonstrated.

Plan for the evidence before go-live. Record which keys exist, which component uses each key, who can request decryption, how rotation is performed and how you would prove a key was revoked after a custodian leaves. Check the Hyperswitch documentation and release notes for the version you deploy, since configuration requirements for the encryption service can change between releases. If the answers are unclear, treat that as a scoping gap to close before you rely on the stack for live card or customer data.

Limits to confirm in your environment

The encryption service and Key Manager change what your team has to operate, and several of those details depend on the release and chart version you deploy. The cards below list the items to confirm with your own environment and the vendor before you design key custody around them.

Components covered by the encryption service

Confirm which data paths the encryption service and Key Manager protect in the release you plan to run. Check whether connector credentials, customer PII and vault-related keys are all covered by per-merchant keys, or whether some fields still rely on the application's base configuration. Ask for a field-level list in writing, because a gap here changes both your PCI DSS scope analysis and your GDPR records of processing.

Self-hosting docs

Key backends supported by your chart version

Key storage options such as AWS KMS, HashiCorp Vault and HSM-backed storage are not guaranteed to be available in every chart version. Confirm which backends your pinned Helm chart supports for the encryption service, and which settings move out of local configuration when you switch. Changing backend after keys exist is a migration project, so settle this before the first merchant onboards.

Superposition dependency on recent releases

The v1.124.0 release notes state that Superposition became a required configuration dependency, and deployments must have a Superposition service running before upgrading to that version. Confirm whether your target release needs Superposition, who operates it, and how its availability affects the encryption path. Plan this as a separate service in your architecture review rather than an add-on discovered during upgrade.

Hyperswitch releases

Control Center SSO limits

The Control Center supports single sign-on through OpenID Connect only. SAML is not supported, there is no JIT or SCIM provisioning, users must be invited first, and roles are managed in Hyperswitch rather than mapped from your identity provider. Confirm that these limits fit your access reviews for the people who can administer key-related settings, and document how joiners and leavers are handled manually.

SSO configuration guide

Key changes across monthly releases

Hyperswitch ships roughly monthly minor releases, and each release lists a compatibility matrix for Control Center and web client versions. Confirm how a key rotation, backend change or encryption-service version bump is tested against each upgrade, and who approves it. Build the rotation and upgrade steps into one runbook so a routine release does not force an unplanned key operation.

Questions teams ask before self-hosting per-merchant encryption

What does it cost to self-host the Hyperswitch encryption service?

The cost is mostly people and cloud services, because Hyperswitch is licensed under Apache 2.0 and the software itself carries no license fee. Expect costs in five groups: engineering time to deploy and configure the service, fees for the key backend you choose (a cloud KMS, a HashiCorp Vault cluster or an HSM), Kubernetes and database capacity for the stack, recurring operations time for upgrades and monitoring, and time for key custodians who hold key material. Costs go up with the number of environments, the number of merchants that need their own keys, and the amount of compliance evidence your team must produce. For a quote from DeployOpen, ask for an itemized scope that names the key backend, environments, deliverables, and which operations and handover tasks are included.

How long does encryption key setup take for each backend?

No duration is fixed for this work, so the answer depends on the backend and on your environment. A cloud KMS is often the shortest path when your team already runs identity, roles and Kubernetes in that cloud. A HashiCorp Vault backend adds work for a highly available cluster, token handling and certificate setup. An HSM adds procurement, racking, firmware, and the audit and custodian procedures around it, which often sets the critical path. Other drivers include how many environments need separate keys, whether your Kubernetes platform already exists, and how long your security team takes to approve the key ceremony. Ask any provider for milestones with dependencies, and confirm the plan in writing before work starts, since DeployOpen agrees timelines in writing as part of fixed-scope work.

What must our internal team provide for the encryption service?

Your team provides the people, accounts and network paths that the service cannot supply for itself. The main items are:

  • Named key custodians who are trained, available for each restart, and backed up by a second person
  • Cloud accounts or data center access with permission to create keys, IAM roles or Vault policies, and audit logs
  • A Kubernetes cluster and namespaces for the Hyperswitch stack, plus a deployment path such as Helm or Argo CD
  • Network routes from the app server to the key backend, with DNS and TLS certificates that your security team approves
  • Sign-off from security and compliance on where key material lives, who can use it, and how it is logged

These items decide the schedule more than the software does, so confirm the owners and approval steps before the project starts.

Can our engineers set up per-merchant encryption using only the docs?

Your engineers can likely build a working test environment from the docs, but a production setup usually needs more than the deployment guides cover. The self-hosting docs describe Helm charts on Kubernetes, guides for local Minikube, AWS, GCP and Azure, and a Docker-based local setup, which is enough to prove the stack runs. Production work adds key ceremony design, backup and recovery of key material, monitoring, access reviews and a tested upgrade path. Upgrades can also add dependencies. For example, the v1.124.0 release notes made Superposition a required configuration dependency, so a deployment must run that service before upgrading. Start with the self-hosting documentation, then check each release note for new dependencies before you plan an upgrade.

How do key rotation and new merchants affect the encryption setup?

Rotation and merchant onboarding change how keys are created, stored and used, so they need a written runbook before go-live. Ask Juspay's documentation or the project maintainers to confirm how master keys are rotated, whether per-merchant keys can be rotated on their own, and whether stored connector credentials or customer data must be re-encrypted during rotation. For new merchants, confirm how a key is created, which backend holds it, who approves the change, and how the change is logged. Your runbook should also cover a merchant that leaves, including how its keys are retired and how the retirement is evidenced. Ask any implementation partner to include rotation and onboarding steps in the scope, with a test in a non-production environment before the first live rotation.

When does PCI SSS make per-merchant encryption necessary?

Whether per-merchant encryption is necessary depends on your role and on how your payment software is assessed. PCI DSS applies to your environment when you store, process or transmit cardholder data, and the Hyperswitch docs state that a merchant running the native in-house PCI vault is fully responsible for PCI DSS certification and data handling. PCI SSS is a separate standard for payment software, so confirm with your qualified assessor and the PCI Security Standards Council whether it applies to your deployment, and whether a per-merchant key model is needed to meet your obligations. Ask your assessor to review the key design, custodian procedures and evidence before you commit to a model. DeployOpen prepares systems and evidence for assessments, but independent auditors and certification bodies issue the findings.

What happens if the key backend becomes unavailable?

If the key backend cannot be reached, the parts of the system that need decryption cannot complete their work, so payment and data flows that depend on stored credentials or personal data can fail until access returns. Plan for this before go-live. Common controls include a highly available backend, such as a multi-zone cloud KMS, a clustered Vault deployment or redundant HSM hardware, along with monitoring for latency and errors, alerts that reach an on-call owner, and a runbook for failover and for the unlock steps your custodians must perform. Test the failure path in a non-production environment, and confirm with Juspay's documentation exactly how errors surface in the app server and what the service does after a restart.

How DeployOpen scopes and delivers this work

DeployOpen scopes the encryption service and Key Manager work as a fixed-scope engagement with the scope, deliverables and timeline agreed in writing before any work starts. The written scope should name each piece of the key setup: which encryption service deployment runs in your cluster, which key backend holds the master key (KMS, HashiCorp Vault or an HSM), how the per-merchant data encryption keys are created and rotated, which merchants and tenants are in the first build, and which connector credentials and customer PII fields are encrypted. Before scoping, confirm with your own team which key backend your infrastructure already operates and who in your organization will act as key custodians, because those answers change the effort more than any other input.

DeployOpen plans, deploys and documents the setup in your own infrastructure, so the resulting runbooks, configuration, key lifecycle procedures and access records stay under your control. The documentation covers the Hyperswitch configuration for each backend, the per-merchant key creation and rotation steps, the restart and recovery sequence, and the test evidence from verification runs. DeployOpen can also prepare the evidence a compliance assessment will ask for, such as the key management design, access reviews and change records. DeployOpen does not issue audit reports, attestations or certifications; your assessor and the relevant certification body make those determinations, so confirm the evidence format with them early.

After go-live, ongoing support, Hyperswitch upgrades and continuous testing are available as retainers, which matter here because each Hyperswitch release may change key-handling dependencies. A quote follows from the written scope. Ask for the quote to list the design, build, verification, documentation and handover phases separately, and to state which items are one-time and which recur under a 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.