How Hyperswitch with VGS as an external card vault works
VGS connects to self-hosted Hyperswitch as an external vault provider that implements the ExternalVault interface. Card data is stored in VGS, and Hyperswitch keeps only an alias token that points to it. Two flows carry this: ExternalVaultInsert sends the card to VGS and returns the alias, and ExternalVaultRetrieve resolves that alias when a payment needs the card. This section applies if your team already tokenizes cards in VGS, or if you need a vault vendor with proxy-based tokenization and want the VGS transparent proxy to forward tokenized requests to processors.
Hyperswitch documents three self-hosted vault models. In the first, you run the native Hyperswitch card vault yourself and accept full responsibility for PCI DSS certification and data handling. In the second, which is this deployment, you keep self-hosted orchestration but move card storage to an external PCI vault provider such as VGS or Tokenex. In the third, you keep orchestration self-hosted but store cards in the SaaS Hyperswitch Vault. The Hyperswitch docs on the external PCI vault model set out the trade-offs between these options, and the docs suggest VGS when cards are already tokenized there or when the proxy path is required.
Before you commit, confirm three things with VGS and your own environment. The VGS connector needs an OAuth2 client ID, a client secret and a vault ID, and the docs note that sandbox vault IDs do not work in production, so plan separate credentials and vault IDs for each environment. Confirm which of your systems will call the insert and retrieve flows, which services can see the alias and which can see raw card data, and whether any retrieval path leaves cardholder data in logs, webhooks or your order system. These answers determine what your assessor will ask about in the cardholder data environment.
What you need before connecting VGS to Hyperswitch
The VGS connector depends on three layers working together: a self-hosted Hyperswitch stack that is current and configured correctly, a production VGS vault with its own credentials, and a network path that lets the Router reach VGS. Check each layer before you write any connector configuration, because a gap in one usually shows up as a failed insert or retrieve call later.
Running self-hosted Hyperswitch stack
Confirm that the Router, Scheduler, PostgreSQL and Redis are running in the environment where the VGS connector will be used. This deployment model keeps orchestration in your infrastructure, so the Router is the component that calls VGS during insert and retrieve. Confirm the exact Hyperswitch version against the releases page before you start, and pin that version in your deployment manifests so the connector behaves the same way across environments.
Hyperswitch releasesSuperposition service for newer releases
Hyperswitch v1.124.0 made Superposition a required configuration dependency. If you are upgrading across that version, a Superposition service must already be running before the Router starts on the new release. Plan this as a prerequisite to the upgrade rather than as a later fix, and confirm the dependency in the release notes for the exact version you are targeting.
Release notesProduction VGS vault and account
You need a VGS account with a production vault that your team controls. The Hyperswitch docs note that sandbox vault IDs do not work in production, so a connector configured with a sandbox vault will pass testing and then fail at go-live. Ask VGS to confirm that the vault you plan to use is a production vault and that your organization owns the account that holds it.
VGS connector docsThree VGS credentials
The connector needs the VGS OAuth2 client ID, the client secret and the vault ID. Store all three in your secrets manager, not in configuration files or Helm values committed to source control. Assign the client credentials to a service identity used only by Hyperswitch, and record who holds the secret so rotation can be done without an outage.
- Credentials required
- 3
Network path from Router to VGS
The Router must be able to reach the VGS endpoints over the network, and egress rules must allow that traffic from the cluster or hosts where the Router runs. Check any outbound proxy, firewall, NAT and DNS policy in the path, and confirm that the connection is encrypted in transit. Test reachability from the same network segment and identity that production Router pods use, not from a workstation.
Ownership of the PCI scope decision
Before go-live, agree in writing who owns the PCI DSS assessment for this design, since the merchant remains responsible for its own cardholder data environment. Confirm with your assessor which systems fall in scope, including the Router, its logs and the network paths to VGS, and which obligations VGS covers through its own compliance evidence. This check should happen before any production card data flows.
Deployment model docsConfiguring the VGS connector in order
This sequence takes a self-hosted Hyperswitch stack from a VGS account with no connector configured to a working external vault, where card data is held by VGS and Hyperswitch only handles alias references. Each step closes with a check you can run before moving on.
Create and verify the VGS vault and OAuth2 client
Your team, with your VGS account administrator, creates a vault for the environment you are configuring and an OAuth2 client with the access it needs to insert and retrieve card data. Keep sandbox and production vaults separate from the start, because the Hyperswitch VGS connector documentation notes that sandbox vault IDs do not work in production. Done when you hold three values for this environment: the OAuth2 client ID, the client secret and the vault ID, and a test API call authenticated with the client credentials succeeds against the vault you intend to use. Ask VGS to confirm the vault region and retention settings in writing before you go further.
Store the client secret in your secrets store
Your platform or security team places the OAuth2 client secret in the secrets manager your Kubernetes cluster already uses, such as an external secrets operator backed by your cloud KMS or a HashiCorp-compatible store. The client ID and vault ID can live in ordinary configuration, but the secret should never appear in Helm values files, Git history or CI logs. Restrict read access to the namespace and service account that run the Hyperswitch router. Done when the secret is retrievable only by that service account, a search of your repositories and pipeline logs for the secret value returns nothing, and rotation ownership is written down with a named owner.
Register VGS as the external vault connector
In a non-production Hyperswitch environment, your platform engineer adds VGS as an external vault connector, supplying the client ID, vault ID and secret reference from the previous step. The connector uses the ExternalVault interface, so card storage moves to VGS and Hyperswitch keeps alias tokens. Confirm the connector configuration key names against the Hyperswitch documentation for your release, since they can change between versions. Done when the connector appears as configured in the Control Center or API, the router starts without credential errors in its logs, and the configuration is recorded in your change system with the secret excluded.
Run a test card insert in non-production
Using a test card number supplied for the sandbox environment, your team submits a payment or vault insert request through the non-production Hyperswitch API so that the ExternalVaultInsert flow runs. Watch the router logs and the VGS audit trail to confirm the card reached VGS and that Hyperswitch received an alias in response. Confirm that no raw card number appears in Hyperswitch logs, database tables, webhook payloads or error traces. Done when the insert returns a payment method reference, VGS shows the record in the expected vault, and a log search for the test PAN returns no matches in the Hyperswitch namespace.
Retrieve the card using the returned alias
Your team runs a retrieve against the alias from the previous step, which exercises the ExternalVaultRetrieve flow. The check is that Hyperswitch resolves the alias through VGS and returns what the flow is designed to return, which should be only the data needed for the next step, not the full card. Record the response shape and confirm with your QSA or internal compliance lead which fields, if any, leave the vault boundary in this flow. Done when retrieve succeeds for a stored alias, the response contains no unexpected cardholder data, and a retrieve against a deleted or invalid alias fails cleanly without exposing details.
Confirm processor calls use the alias
Run a payment against a configured processor sandbox using the stored alias, and trace the request path through the VGS transparent proxy if your design uses it. Verify that the processor receives card data only through the path your architecture documents, and that Hyperswitch's own datastore holds the alias and not the card. Check the processor request logs and any proxy logs to confirm the expected flow. Done when a sandbox authorization succeeds using the alias, the trace matches the data flow diagram your team has approved, and the diagram is stored with the scope documentation for the environment.
Document scope and repeat checks before production
Your compliance lead updates the cardholder data flow diagram and the list of system components to show where card data enters, where it is stored by VGS, and which Hyperswitch components only see aliases. Then the team repeats the same sequence in production with a production vault ID and production client secret, starting from a fresh secret reference. Confirm with your assessor how PCI DSS v4.0.1 requirements apply to this design, because the vault model changes scope but does not remove responsibility for the rest of the environment. Done when the production run passes the same checks, the scope document has been reviewed and signed off, and the decision is recorded for your next assessment.
How the insert and retrieve flows move card data
The core question in this deployment is where the card number lives at each step. In the ExternalVaultInsert flow, the customer's card details go to VGS rather than to your Hyperswitch Router. VGS stores the card data and returns an alias token, and Hyperswitch stores only that alias as the payment method reference. Your Router, Scheduler, PostgreSQL and Redis never need to hold the primary account number for this path. Confirm the exact request and response fields for the insert call in the connector documentation linked from the VGS vault provider page, because the field names and any proxy-specific parameters are not something to assume from the flow name alone. Also confirm whether your checkout SDK posts card data directly to VGS or through your backend, since that choice determines which of your systems touch raw card data during collection.
The ExternalVaultRetrieve flow runs when a later payment needs the card. Hyperswitch presents the stored alias to VGS, and VGS either returns the underlying data to a service that is allowed to receive it or forwards the tokenized request on to the processor. The Hyperswitch docs describe the VGS transparent proxy as the option for the second pattern, where the proxy substitutes the real card data in transit so the processor receives it without Hyperswitch handling it. Decide early which pattern you need for each processor, because it changes what your payment flows send and what the proxy must be allowed to reach. Ask VGS and the Hyperswitch connector documentation to confirm the exact retrieve payload, the outbound destinations the proxy supports, and how a failed retrieve is reported back to Hyperswitch so that retries do not re-expose data.
What Hyperswitch stores and what stays only in VGS should be written down as a data inventory before go-live. Hyperswitch keeps the alias, the payment method metadata it needs for routing and reporting, the transaction records and the webhook history. The card number, expiry and cardholder fields remain in VGS. Verify this split in a test environment by searching your PostgreSQL tables, logs, traces and Redis keys for a known test PAN, since accidental logging of request bodies is the most common way card data reaches systems that were meant to be out of scope. Those checks feed directly into the PCI DSS scope analysis covered elsewhere on this page.
Where card data and alias tokens travel in this model
The flow starts in the shopper's browser or SDK, which sends card details directly to the VGS vault rather than to Hyperswitch. VGS returns an alias token that the SDK passes to the Hyperswitch Router, so the Router only ever handles the token. When a payment is made, the Router sends the alias through the VGS transparent proxy, which swaps it for the card number and forwards the request to the processor. Check that card numbers never appear in Router logs, webhooks or the Control Center, and that the VGS boundary is the only place raw card data exists before it reaches the processor.
Card numbers stay inside the VGS boundary; Hyperswitch stores and routes only alias tokens.
Which data lives where in the VGS model
This table maps each card and credential item to the system that holds it in a self-hosted Hyperswitch deployment with VGS as the external vault. Read it to see which items stay in your Hyperswitch environment, which sit with VGS, and where access control and confirmation with VGS are still needed.
| Data item | Where it is held | Why it sits there and who controls access |
|---|---|---|
| Card number (PAN) | VGS vault, referenced by alias token | Card data is stored in VGS through the ExternalVault insert flow, so Hyperswitch does not hold the raw PAN. Confirm with VGS and your assessor how VGS access is governed. |
| Expiry date | VGS vault, with the alias token in Hyperswitch | Stored with the card data in VGS and retrieved through the ExternalVaultRetrieve flow when needed. Confirm which fields VGS stores and returns for your configuration. |
| Cardholder name | VGS vault, with the alias token in Hyperswitch | Collected and stored alongside the card in VGS. Confirm with VGS whether this field is held in the vault for your flows. |
| Alias token | Hyperswitch database, referencing the VGS record | Hyperswitch stores the alias token so it can request a card from VGS for later payments. The token alone does not reveal card data. Your team controls Hyperswitch access to it. |
| Vault ID | Hyperswitch connector configuration, held as a secret | Identifies your VGS vault for the connector. Sandbox vault IDs do not work in production, so confirm the production ID with VGS before go-live. Restrict who can view or change connector settings. |
| OAuth2 client ID | Hyperswitch connector configuration, held as a secret | Identifies the client that Hyperswitch uses to authenticate to VGS. Confirm the scopes and rotation process with VGS. Limit access to the team that operates the connector. |
| OAuth2 client secret | Hyperswitch connector configuration, held as a secret | Authenticates Hyperswitch to VGS and should be treated as a high-value credential. Confirm storage, rotation and revocation steps with VGS and your secrets management tool. |
What changes for PCI DSS scope with an external vault
An external vault moves stored card numbers out of your Hyperswitch environment, but it does not remove PCI DSS obligations for the rest of the systems that touch payment flows. The cards below cover what stays in scope and what your QSA needs to settle before you finalize the design.
Why the vault move does not end scope
PCI DSS applies to any entity that stores, processes or transmits cardholder data, and also to entities whose systems could affect the security of the cardholder data environment. Moving card storage to VGS shrinks what holds card numbers, but Hyperswitch Router, its database and the surrounding network still sit in the payment flow. Treat the external vault as a reduction in scope, not an exit from it, and ask your QSA to confirm how the VGS integration affects your assessment. The current version to assess against is PCI DSS v4.0.1, the only active version.
PCI DSS overviewHyperswitch Router and services
The Router and Scheduler handle payment requests, retries and webhooks, and they must be assessed for how they handle tokens, alias references and any data that passes through them. Confirm whether any request or response field, including a payment reference, could carry card data before it reaches VGS. Document the network paths between Router, PostgreSQL, Redis and VGS, since every system that can affect the security of these flows belongs in your scope analysis.
Logs and monitoring pipelines
Application logs, request traces and error reports from Router and the Control Center are a common place for card data to leak. Review what gets logged at each stage of the insert and retrieve flows, and confirm that log pipelines do not capture request bodies or the VGS credentials. Your logging platform, retention settings and access list become part of the cardholder data environment if they can reach sensitive data, so have your QSA review them with the same scrutiny as the payment services.
Control Center and administrator access
Users who can open the Control Center or call the admin API can view payment details, change routing and read configuration that includes the VGS connector credentials. Access to these functions is part of your scope, so document who holds admin roles, how sessions are protected and how access reviews are run. Hyperswitch Control Center SSO uses OpenID Connect only, and roles are managed in Hyperswitch rather than mapped from your identity provider, which means access reviews must be done in Hyperswitch itself.
Control Center SSO docsNetwork segments and the VGS credentials
The three VGS credentials, the OAuth2 client ID, client secret and vault ID, must be stored in a secrets system with restricted access, and sandbox vault IDs must not be used in production. Network segmentation decides which hosts can reach VGS and the processors, and which can reach the Hyperswitch database. Map each segment and each credential holder, then confirm with your QSA which components are in the cardholder data environment and which are connected to it.
VGS connector docsScope decisions belong to a QSA
Only a Qualified Security Assessor can determine your final scope and issue the assessment on the official PCI SSC templates, a Report on Compliance or a Self-Assessment Questionnaire with an Attestation of Compliance. Before the assessment, ask your QSA or acquirer which requirements apply to your VGS design, and whether a defined or customized approach fits any control. Any cost or effort for the assessment depends on your scope and is set by the assessor, so request a written scope before you commit to a design.
PCI SSC compliance FAQCommon VGS connector failures and fixes
This table lists the failures most likely to appear when Hyperswitch calls VGS as an external vault, with the likely cause, the check to run and the fix for each. Work through the rows in order, since credential and environment problems are the cheapest to rule out before you inspect network or version issues.
| Failure | Likely cause | Check and fix |
|---|---|---|
| Sandbox vault ID used in production | The connector was configured with a VGS sandbox vault ID, which the Hyperswitch VGS documentation says does not work in production. | Confirm the vault ID in the connector settings belongs to the production VGS environment. Replace it with the production vault ID and retest an insert and a retrieve. |
| Invalid or expired OAuth2 credentials | The client ID or client secret was copied incorrectly, belongs to another environment, or has been rotated in VGS without updating Hyperswitch. | Check that the client ID, client secret and vault ID all come from the same VGS environment. Rotate the client secret in your secret store, update the connector, and confirm the store is the only copy in use. |
| Network block between Router and VGS | Egress rules, a proxy, a firewall or a NAT policy stop the Router pods or hosts from reaching the VGS endpoints. | From the Router runtime, test outbound HTTPS to the VGS endpoints your VGS account documents. Add egress allow rules for those destinations, then repeat the insert and retrieve test from the same runtime. |
| Alias not found on retrieve | The alias stored in Hyperswitch does not match a record in the target VGS vault, often because the insert ran against a different vault ID, environment or connector entry. | Compare the vault ID used at insert time with the one used at retrieve time. Where they differ, fix the connector configuration and re-run affected payments. Do not edit stored aliases by hand without confirming the mapping with VGS. |
| Mismatched connector versions after an upgrade | A Hyperswitch upgrade changed the external vault interface or dependency expectations, and the connector configuration or required services no longer match the router version. | Check the release notes and compatibility matrix for the Hyperswitch version you run. Confirm the router, Control Center and any required services are on compatible versions, and test insert and retrieve in staging before promoting the upgrade. |
| Insert succeeds but retrieve fails in the proxy path | The VGS transparent proxy or outbound forwarding rules were changed, so tokenized requests no longer reach the processor as expected. | Review the proxy or forwarding configuration against the VGS connector setup. Run an end-to-end test payment in sandbox and compare the forwarded request with the expected alias handling before going live. |
| Credentials work in one environment but not another | Staging, pre-production and production use separate Helm values or secrets, and one environment still holds old credentials. | Diff the secret and Helm values across environments. Standardize how the three VGS credentials are injected so each environment reads its own values. |
Questions teams ask before connecting VGS to Hyperswitch
What does connecting VGS to Hyperswitch cost, and who gets paid for what?
Three separate parties carry costs: VGS, which bills under its own contract for the vault service; the party hosting Hyperswitch, which pays for your cloud or data center capacity and the database, cache and supporting services; and the implementation partner or internal team, which is paid for the integration work itself. The VGS and hosting costs recur, while the integration work is usually one-time, followed by any upgrade or support work you choose to retain. Ask for a quote that separates these lines. Ask VGS to confirm its pricing model and sandbox terms directly, because a quote from DeployOpen covers only the implementation scope. DeployOpen does not publish prices, and the written scope is what drives the quote.
How long does a VGS vault integration take?
No fixed duration applies, because the timeline depends on drivers you can inspect before work starts. The main ones are whether card data is already tokenized in VGS, how many processors and payment flows must route through the vault, how many environments you need (sandbox, staging, production), how much of the insert and retrieve path your own code already handles, and how quickly your security and compliance teams can review the design. Ask for a written plan with milestones and the review points that the schedule depends on, rather than a single number.
What does the integration need from our team?
Plan for access and decisions from several groups. Engineering needs access to the Hyperswitch deployment, the database and the configuration used for connectors. Security and compliance need to approve the vault model, the data flow diagram and the credential handling. Whoever administers your VGS account must issue the OAuth2 client ID, client secret and vault ID for each environment. Payments operations need to confirm which processors and flows will use the vault. Before the build starts, confirm which VGS vault IDs belong to which environment, because the Hyperswitch docs note that sandbox vault IDs do not work in production.
Can our internal team build this integration without an outside partner?
Yes, a capable internal team can build it, provided it has engineers who know Hyperswitch configuration and Kubernetes operations, someone who can read the ExternalVault insert and retrieve flows, and a security owner who can produce the evidence your assessor will ask for. The gaps usually appear in operations rather than the first build: rotating the VGS credentials, testing failure paths, keeping Hyperswitch upgraded across releases, and documenting the scope decisions for your QSA. Decide early whether you want a partner for the build only, for the build plus retainer support, or for nothing beyond the initial handover.
Does an external vault like VGS remove our PCI DSS obligations?
No. An external vault changes where cardholder data is stored and may reduce the systems that store, process or transmit it, but it does not remove your obligations. PCI DSS applies to any entity that stores, processes or transmits cardholder data or could affect the security of the cardholder data environment, and the PCI SSC does not decide who is in scope on your behalf. The paths your data takes, the systems that can reach the vault, your own logs and your access controls can all remain in scope. Ask your QSA or acquirer to review the data flow diagram before you rely on any scope reduction.
How is PCI DSS validation done for this setup, and what is an AOC?
PCI DSS compliance is documented through an assessment on official PCI SSC templates. Merchants or service providers either complete a Report on Compliance (ROC) with a Qualified Security Assessor, or complete a Self-Assessment Questionnaire (SAQ), and in both cases the result is summarized in an Attestation of Compliance (AOC). The PCI SSC states that certificates are not recognized as validation, so a certificate from a vendor does not replace the ROC or SAQ. Which route applies to you depends on your transaction volume, your role and the rules of your payment brands and acquirer, so confirm it with them. DeployOpen prepares systems, controls and evidence for assessments but does not issue ROCs, SAQs or AOCs.
What should our engineers verify after the VGS connector goes live?
Check the full insert and retrieve path in each environment, not just a successful test payment. Confirm that card data appears only in VGS and that Hyperswitch stores the alias token, that retrieval works for saved payment methods, and that failures in the vault call are handled without exposing card data in logs or error messages. Verify that the VGS credentials are stored in your secrets system with restricted access, and that the sandbox and production vault IDs are not mixed. Record the outcomes, because your assessor will ask how the controls were tested.
How DeployOpen scopes and delivers this integration
DeployOpen scopes this integration as a fixed-scope engagement, with the written scope agreed before work starts. The scope should name the three VGS credentials to be issued: the OAuth2 client ID, the client secret and the vault ID. It should confirm that the vault ID belongs to a production vault, because the VGS docs note that sandbox vault IDs do not work in production. The scope should also list the ExternalVaultInsert and ExternalVaultRetrieve flows as in scope, and record whether the VGS transparent proxy will forward tokenized requests to processors. That decision changes the data path, so it must be written down before design starts.
Delivery follows the credential and flow model. DeployOpen configures the VGS connector in the self-hosted Hyperswitch deployment, keeps the three secrets in the client's own secrets system rather than in plain configuration files, and tests insert and retrieve in a VGS sandbox before a production cutover. Verification should confirm that Hyperswitch stores only the alias token, that no raw card number appears in router logs, database tables or webhook payloads, and that a failed retrieve produces a visible failed payment. The Hyperswitch VGS connector documentation is the reference for the connector settings used in this build.
The scope should also state what DeployOpen does not do. The PCI DSS scope analysis for the cardholder data environment stays with the client and its Qualified Security Assessor or internal assessor. DeployOpen prepares the evidence those teams need, including data-flow diagrams, configuration exports, network segmentation records and test results, and maps each item to the current version, PCI DSS v4.0.1. The client should confirm with its acquirer or payment brands which validation type applies, since that choice decides between a Report on Compliance and a Self-Assessment Questionnaire. DeployOpen does not issue audit reports or attestations.

