Testing Hyperswitch connectors with Newman and Postman

Hyperswitch's connector test tooling runs Postman collections through a Newman fork wrapped in Rust, so you can regression-test payment flows before upgrades and connector changes. This page covers what to test, how to set it up and what to confirm.

On this page

Why Hyperswitch connector testing with Newman and Postman matters before every upgrade

Newman and Postman give a self-hosted Hyperswitch team a repeatable way to prove that payment flows still work against each connector after a release or configuration change. The test collections are Postman collections that exercise payment operations through connectors, and they are run through Hyperswitch's connector test tooling, which wraps a fork of Newman in Rust. Connector credentials are supplied in an auth.toml file, so the same collections can run against each processor account your organization uses. Run them before every upgrade, and run them again whenever you change connector settings, credentials, routing-related configuration or the connector set itself.

The main trigger is a Hyperswitch upgrade. Minor releases arrive roughly monthly, and each one ships with a compatibility matrix for Control Center and web client versions. Your router, Control Center and SDK versions have to line up, and a release can change behavior that only shows up on a live processor call. Before you promote a new release, confirm the exact versions in the release notes and the matrix, then run the collections in a non-production environment that points at sandbox or test credentials for each connector you rely on. A passing run does not replace your own acceptance checks for flows that the collections do not cover.

The second trigger is a change on the processor side. When a connector changes its API, adds required fields or alters webhook behavior, the collections can show whether Hyperswitch still maps the request and response correctly. Ask your team to record which connector version and which auth.toml profile each run used, so a failure can be traced to a Hyperswitch change, a configuration change or a processor change. Confirm with Juspay's current documentation which connectors and flows the collections cover, because coverage differs by connector and you will need to fill any gaps with your own tests.

How a connector regression run moves from collections to results

A regression run starts with the Postman collections and the connector credentials kept in an auth.toml file. The Rust wrapper runs those collections through a fork of Newman against a Hyperswitch test environment, which calls the connector and returns responses. Check the results against the expected payment states before deciding whether the upgrade or connector change can go ahead. Any failure should be traced to the connector, the configuration or the test itself before the run is repeated.

The diagram shows how collections, credentials and the test environment combine into a go or no-go decision.

Which payment flows belong in the regression suite

A connector regression suite should exercise the flows that move money and change payment state, because those are the paths a connector change can break silently. The cards below group those flows into categories, explain why each matters, and name what to confirm in the bundled collections before you rely on them.

Authorization and payment creation

Authorization is the first call that reaches the processor, so a change to request mapping, credentials or response parsing shows up here first. Test card and wallet payments in both successful and declined outcomes, and confirm that the status Hyperswitch records matches what the processor returned. Check which payment methods the bundled collections cover, since coverage varies by connector.

Capture and manual capture

Capture is where authorized funds become settled revenue, so a broken capture path can leave money held or never collected. Cover full and partial captures for flows that use manual capture, and verify that the payment state updates correctly after the processor accepts the call. Confirm whether the collections include partial capture for every connector you run.

Refunds and partial refunds

Refund requests depend on the original transaction identifiers and amounts, so mapping changes often break refunds before they break authorizations. Test full and partial refunds, and check how the stack handles a refund the processor rejects. Confirm in the repository which refund scenarios the collections include.

Voids and cancellations

A void releases an authorization that has not been captured, and it is easy to omit from a suite because it is less common than a refund. Include a void against an uncaptured payment and confirm that a void attempted after capture fails in the expected way. Confirm whether the bundled collections include void tests for each connector.

Webhooks and asynchronous status

Many processors confirm final status through webhooks rather than in the synchronous response, so a change to callback handling can leave payments stuck in pending. Test that inbound callbacks update the payment state, that signature checks still pass, and that the system falls back to status sync when a callback is missing. Check the repository for how the collections simulate or replay callbacks.

Failure handling and error mapping

Processors return declines, timeouts and malformed responses in different shapes, and a connector update can change how those map to Hyperswitch error codes. Test a timeout, a processor error and an invalid credential, and confirm that retries do not duplicate charges. Ask the connector maintainers which failure cases the collections reproduce and which need manual testing.

Choosing how to run connector test collections

This table compares the bundled Newman-based runner, manual Postman runs and a custom collection set maintained by your team. Read each row against your upgrade cadence and connector mix, because the right choice depends on who owns the credentials and how often you need repeatable regression evidence.

OptionWhen it fitsWhat it needsTrade-off for upgrade regression
Bundled Newman-based runner (local or CI)Repeatable regression runs before each Hyperswitch upgrade or connector changeConnector credentials in an auth.toml file, a test environment, and an owner who keeps the runner workingMost repeatable and easiest to gate in CI, but coverage follows the bundled collections, so confirm which flows they exercise for your connectors
Manual Postman collectionsExploring a new connector or investigating a failed payment flowPostman, access to a test workspace, and test credentials kept out of shared filesGood for diagnosis, but results depend on the person running them and are hard to compare between upgrades
Custom collection set maintained by your teamFlows the bundled tests do not cover, such as your saved-card journeys, routing rules or merchant-specific settingsOwnership by a named team, version control for collections, and a review step when Hyperswitch releases change behaviorCovers your own business paths and gives you control, but adds maintenance work with every release and needs its own evidence trail
Hosted sandbox versus self-hosted stackEarly testing before your own environment is readyA sandbox account and test processor credentialsUseful for first runs, but confirm it matches the Hyperswitch version and configuration you will operate

Setting up the Newman runner and connector credentials

This sequence gets the Hyperswitch connector test tooling running against sandbox credentials in a non-production environment, and ends with a recorded baseline that shows the current version passes before any upgrade or connector change.

  1. Obtain the test tooling from the repository

    The platform engineering or payments engineering lead clones the Hyperswitch repository at the exact release tag that matches the Hyperswitch version running in your non-production environment, so the collections and runner match the code under test. Confirm the tag against the release notes and the compatibility matrix on the GitHub releases page before you pull anything. Record the commit hash in your change ticket. The step is done when the checkout builds the test runner from that tag and the hash is on file.

  2. Prepare a non-production environment

    Stand up a self-hosted Hyperswitch instance that is separate from production, with its own database, Redis, and key material, so test payments never touch live merchant data or live processor accounts. Confirm that the instance runs the same version and configuration you plan to upgrade, including any required service dependencies named in the release notes. Check that the Control Center and router respond to health checks before you continue. The step is done when the target environment is reachable and its version is recorded.

  3. Create the auth.toml file with sandbox credentials

    The engineer who manages processor relationships creates the auth.toml file that the test runner reads, filling in sandbox or test credentials only for each connector in scope. Keep this file out of version control, store it in your secrets manager, and restrict read access to the people who run the suite. Confirm with each processor which credentials are sandbox-only and which keys can move funds, and do not place production keys in this file. The step is done when every in-scope connector has a populated entry and the file is excluded from commits.

  4. Select the collections for each connector

    The QA or payments engineer chooses the Postman collections that cover the connectors and payment flows your business uses, such as authorization, capture, refund, void, and 3DS paths where applicable. Map each collection to the connector it exercises and remove connectors you do not run, so failures point to real exposure. Ask each processor which flows its sandbox supports, because some scenarios will not run in every sandbox. The step is done when you have a written list of collections per connector with any known gaps noted.

  5. Run the baseline on the current version

    Before you change anything, the engineer runs the selected collections through the Newman-based runner against the current version in the non-production environment. Expect some connectors to show sandbox limitations or flaky responses, and document those instead of treating them as upgrade regressions. Confirm the run completes end to end on the current version. The step is done when the baseline run has a clean result or every failure has a documented, accepted cause.

  6. Record and approve the baseline results

    The engineer saves the runner output, including the version tested, the collection set, the connectors covered, and the pass and fail counts, and attaches it to the upgrade or connector change ticket. A payments lead or security reviewer reads the report and signs off that the baseline represents acceptable behavior. Store the output with the change record so you can compare future runs against it. The step is done when the baseline report is approved and linked to the change.

  7. Confirm the baseline before any upgrade

    Before you apply an upgrade or connector configuration change, the team reruns the approved collections on the target version in the same non-production environment and compares the result against the recorded baseline. Any new failure is treated as a blocker until it is explained or fixed. Confirm that credentials and collection versions did not change between runs, so differences reflect the code under test. The step is done when the post-change run matches or improves on the baseline and the comparison is filed with the change.

How to use connector test results when planning an upgrade

Run the connector suite twice before you commit to an upgrade: once against the release you run today and once against the target release, using the same connector credentials, the same auth.toml file and the same Postman collections. The comparison between the two runs is the useful output. A single green run tells you little about an upgrade, because a failure that appears only on the target release is the signal you are paying for. Record each test case with its result on both runs so that a changed outcome is visible at a glance, and keep the run logs with the change ticket so the decision can be reviewed later.

Hyperswitch ships minor releases roughly monthly, and the Hyperswitch releases on GitHub page lists a compatibility matrix for Control Center and web client versions with each one. Check that matrix before you pick the target, then plan the Control Center and SDK moves alongside the router. A connector run that passes on the router alone does not prove the dashboard or checkout works against it. Confirm the Superposition dependency in the same run plan: the v1.124.0 release notes make Superposition a required configuration dependency, so a Superposition service must be running before you upgrade to that version or later. Treat a missing service as a blocker, not a test failure to triage later.

Classify every failure before the upgrade window. A failure in a flow you rely on for live traffic, such as authorization, capture, refund or a webhook-driven status update for a connector you process through, is a blocker. A failure in a flow you do not use, or one that also fails on the current release, can be logged as a known issue with an owner and a retest date. Ask the connector owner to confirm whether the failure comes from Hyperswitch, the processor sandbox or your credentials. Sandbox behavior can change independently of Hyperswitch, so rerun the current-release baseline on the same day as the target run.

Protecting connector credentials and test data

Connector regression tests need real processor credentials and produce logs, responses and stored results that can expose them. The cards below cover where those secrets and test artifacts sit, and the controls that keep sandbox and live access apart.

Keep auth.toml out of source control

The auth.toml file holds the connector credentials that the Newman-wrapped test runner uses. Treat it as a secret file from the first commit: exclude it in .gitignore, add a pre-commit or CI secret scanner, and inject values from your secret store at run time. Check the git history of any repository that has held a copy, because deleting the file does not remove it from past commits.

Newman test docs

Separate sandbox and live credentials

A test run should only ever hold sandbox credentials for the processor. Keep sandbox and production connector accounts in different files, secret paths and CI variables, and name them so a reviewer can tell them apart. Confirm with each processor that its sandbox keys cannot move real money, and block production credentials from being loaded into any job that runs on pull requests.

Limit card data in test runs

Test flows use processor test card numbers, which are published for sandbox use, but any fixture that carries a real cardholder number puts the test environment into PCI DSS scope. Use only the processor's published test cards, keep them in version-controlled fixtures, and confirm with your QSA whether the test environment can receive any production card data. Do not copy production payment traces into test collections.

Prevent secrets in logs and reports

Newman and Postman output prints request headers, bodies and environment variables when a request fails, and CI systems store that output. Mask the authorization headers and connector keys in the runner, avoid verbose debug flags in shared pipelines, and review a sample log before enabling a new collection. Confirm that your CI platform masks registered secrets and that report artifacts are not public.

Isolate shared CI runners

Connector tests often run on shared self-hosted runners where a previous job may have left credentials in a workspace, cache or environment. Use ephemeral runners or clean workspaces for each run, scope secret access to protected branches and approved environments, and restrict who can edit workflow files that read those secrets. Ask your CI vendor how it isolates secrets between jobs.

Control access to test results

Test results show which connectors passed, failed or returned processor error codes, and those details help an attacker map your payment setup. Limit who can read run history and artifacts to the payments and platform teams, set a retention period for artifacts, and keep result storage in the same access model as your other payment data. Review access when team members change roles.

Questions teams ask before running connector regression tests

How much effort does a first connector regression run take?

The first run is mostly setup work, and the effort depends on how many connectors you run, how much of each collection you need to adapt, and how quickly you can get valid credentials for each one. Each connector needs its own auth.toml entries, a working sandbox account, and a check that the Postman collections match the payment methods and flows that connector actually supports. Expect the first pass to uncover gaps in credentials and test data before it uncovers product defects. Ask any partner for a written breakdown of these items per connector, because the figure that matters is the count of connectors and flows in your scope, not a generic number.

Can an internal team run Newman regression tests without outside help?

Yes, a team with Rust and Postman experience and access to the Hyperswitch repository can run the suite itself, and many teams do. The harder part is keeping it running. Someone has to own the collections, update them when a connector or Hyperswitch release changes request or response behavior, and interpret failures that come from sandbox instability rather than from your code. If your platform engineers already maintain CI pipelines and payment integrations, the internal option is realistic. If the same people are also carrying upgrades, incident work and new connector builds, the suite tends to go stale first.

What does the work need from our payments and engineering teams?

Three things are needed before the first run starts. First, sandbox or test merchant accounts for every processor in scope, with the API keys and any webhook endpoints each one requires. Second, environment access: a non-production Hyperswitch deployment you control, network paths from that environment to each processor sandbox, and a secure place to store auth.toml so credentials stay out of source control. Third, a named owner for each processor who can answer questions about sandbox behavior, approve test card data, and confirm expected outcomes for declines, 3DS challenges and refunds. Without those owners, failures sit unresolved and the team cannot tell a broken connector from a changed expectation.

How long does a regression run take, and what sets that time?

Run duration is driven by the number of collections and requests, how many connectors run in parallel, the response times of each processor sandbox, and whether the suite waits on asynchronous webhooks or scheduled sync steps. Sandbox rate limits and retry logic can add time even when the code is healthy. A suite that runs cleanly on every pull request usually needs a smaller, fast subset, with the full connector matrix run before upgrades and connector changes. Ask your team to time a full run on the first pass and record it, because that baseline is the number you will use to plan later runs.

Which parts of a Hyperswitch upgrade does regression testing cover?

Regression tests cover the payment flows that the collections encode, such as authorization, capture, void, refund and sync, for each connector your merchants use. They catch changes in connector behavior and in how Hyperswitch maps those responses. They do not test your checkout front end, your reconciliation files, your fraud rules or your data retention, so those need their own checks. Before a Hyperswitch upgrade, review the release notes and compatibility information on the Hyperswitch releases page to find changes that may require new configuration, then decide which collections to rerun.

Does regression testing put card data or PCI DSS scope at risk?

It can, if test data is handled carelessly. Use sandbox test card numbers that the processor provides, not real cards, and keep any captured request or response logs free of live credentials and full card numbers. If your deployment stores cards in the Hyperswitch card vault, the test environment should be isolated from production vault data and access should be limited to the people who need it. Confirm with your QSA or internal compliance lead whether your test environment falls inside PCI DSS scope, since that depends on where test data flows and who can reach it.

When is it worth buying outside help for connector testing?

Outside help is worth considering when the first run is blocked by work your team has not done before, or when the suite must be running before a deadline such as a planned connector change or a platform migration. Common triggers include many connectors with unclear sandbox access, a need to adapt collections to custom flows, or no one internally with time to own the suite after the first run. DeployOpen plans and implements self-hosted platform work in your own infrastructure, and a scope for connector regression support can be agreed in writing before work starts. Ask for a quote that lists each connector, each flow, who provides credentials and who owns maintenance after handover.

What a DeployOpen connector regression engagement covers

A DeployOpen connector regression engagement is fixed in scope, so the list of connectors, Postman collections, environments and deliverables is agreed in writing before any test runs. The written scope names each connector under test, the processor account or sandbox credentials it uses, and the Hyperswitch version and Control Center version the baseline and candidate builds are pinned to. It also states which payment flows are covered for each connector, such as card authorization, capture, partial and full refunds, voids, and the webhook events that should follow each step. Anything outside those flows, including connectors not listed, is excluded unless the scope is amended in writing.

The environments section of that scope matters as much as the test list. It should say where the Newman runs execute, how the auth.toml credentials are stored and who can read them, and whether a processor's sandbox or a non-production merchant account is used. Ask the vendor or processor to confirm which sandbox behaviors differ from live processing, since regression results are only as useful as the match between test and production. Deliverables are agreed up front too: typically a per-connector pass and fail record, the collection and version used for each run, logs of failed requests, and a comparison against the prior release so the upgrade decision rests on evidence.

Results are reported in a form that supports an upgrade or connector change decision. For each failing case, the report should show the expected and actual response, whether the failure is a Hyperswitch defect, a processor-side change, a credential or sandbox issue, or a gap in the collection, and the recommended action. Ask for a clear statement of which flows are safe to promote, which need a fix and retest, and which need a go or no-go decision from your team. Whether retesting after fixes is included, and how many rounds it covers, should be written into the scope rather than assumed.

How DeployOpen scopes, delivers and supports connector testing

DeployOpen approaches connector testing for Hyperswitch as a fixed-scope regression exercise tied to your own connectors, credentials and upgrade calendar. The work starts with a written scope, builds a Postman and Newman test set you can rerun, and hands over the runbook and results so your team can repeat the checks before each upgrade or connector change.

How we scope

  • Written scope lists which connectors, payment flows and Hyperswitch versions the regression run covers
  • Scope records the test credentials you will supply through the auth.toml file and who owns them
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts

How we build

  • Postman collections are built or extended for each agreed flow, such as authorization, capture, refund and void
  • Collections run through the Newman-based test runner that Hyperswitch uses, wrapped in Rust, in your environment
  • Each test case records expected results so failures point to a connector, configuration or Hyperswitch change

How we hand over

  • Runbook explains how to set credentials, run the suite, read reports and rerun it after a version change
  • Test collections and configuration are delivered in your repository so your team owns and versions them
  • Documentation lists known gaps, skipped flows and the connector behavior each test assumes

How we support

  • Ongoing support and continuous testing are available as a retainer, including reruns before each Hyperswitch release you adopt
  • Retainer work can cover updating collections when connector APIs change or a new connector is added
  • Ask any provider to confirm how credentials are stored, rotated and kept out of shared logs before engagement

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.