When a custom Hyperswitch checkout is worth building
Build a custom checkout when the prebuilt unified checkout cannot meet a product requirement, such as a payment screen that must match an existing design system, a multi-step flow inside your own app, or payment fields that sit inside a larger workflow. The headless SDK is the Hyperswitch client library without the prebuilt payment UI. Your code renders the screens and fields, and the SDK handles the calls that create and confirm payments against your Hyperswitch server. Teams that only need brand colors and fonts usually get enough from the unified checkout, so the headless path should be chosen for control over structure and behavior, not for appearance alone. Confirm the current headless capabilities in the Hyperswitch docs before you commit, because the SDK surface changes between releases.
The decision depends on what the SDK covers and what your team still owns. Your team owns layout, copy, validation messages, accessibility, error and retry states, payment method ordering, and the sequence of calls between your frontend and your backend. The SDK surface is the part to verify: list the methods Hyperswitch documents for collecting payment data, confirming a payment, and handling next actions such as redirects or 3DS challenges, and check which ones need a publishable key for each environment. The self-hosted pieces sit underneath. The Router handles payment logic, the Control Center holds connector setup, roles and API keys, and PostgreSQL and Redis back the stack. Your SDK build must match the server version you run, so the checkout decision is tied to your upgrade plan. The Hyperswitch docs are the place to confirm each of these points.
The PCI question often decides whether a custom checkout is practical. A page that collects raw card numbers in your own fields places those inputs in your environment, and the Hyperswitch self-hosting docs state that under the self-hosted, in-house PCI model the merchant is fully responsible for PCI DSS certification and data handling. Before you design any fields, confirm with Hyperswitch whether the SDK hosts the card inputs, tokenizes them before they reach your code, or leaves collection to your page. If your organization wants the vault outside its own scope, review the self-hosted and outsourced PCI model first. Ask a qualified assessor to review the design early, because that answer sets the audit scope for the whole frontend.
How the headless SDK, your frontend, your backend and Hyperswitch fit together
The flow starts in the customer's browser, where your custom UI collects card fields through the headless SDK. Your backend creates the payment against the self-hosted Hyperswitch router, which hands card data to the card vault and the chosen processor. Results return to the browser and, separately, through webhooks to your backend. The dashed boundary marks where card data entry sits, so check that your card fields never reach your own servers.
Request and webhook paths between the browser, your backend and the self-hosted Hyperswitch stack.
Prebuilt checkout, headless SDK or hosted links: which fits your team
The prebuilt unified checkout is the option where the Hyperswitch SDK renders the payment form and the payment method list. Your application creates the payment on the server, mounts the checkout component, and handles the result. It is the smallest build of the three options and the one with the least frontend ownership.
- Layout and copy: Control is limited to the theme, fonts, colors and payment method ordering covered in the appearance topic. The structure of the form is set by the SDK.
- Engineering effort: Your team wires server-side payment creation, mounts the component, and handles success, failure and pending states.
- Frontend ownership: Your team owns the page around the checkout. The SDK owns the payment fields and how they render.
- PCI implications: Card fields are rendered by the SDK, so card numbers are not typed into your application code. Your overall scope still depends on your deployment model and vault choice, so confirm the assessment with your qualified security assessor.
Before committing, confirm that the appearance settings your brand requires are available, because that decides whether this option is enough for your checkout.
The headless SDK approach has your team build the card inputs, layout, copy and payment flow, and call the SDK to collect and submit payment data. You get the most control over the experience, and you take on the most engineering work and the most compliance responsibility. This is the option where card data handling decisions have the largest effect on scope.
- Layout and copy: Full control over fields, validation messages, step order and wording.
- Engineering effort: The largest of the three. Your team builds input handling, error states and any payment method flows that the prebuilt UI would otherwise cover, then tests each path. Confirm with the SDK documentation which flows the headless SDK handles for you and which you must implement.
- Frontend ownership: Your team owns the UI, accessibility, and every change needed as browsers and payment methods evolve.
- PCI implications: If raw card data passes through your page or your servers, your PCI DSS scope grows. The Hyperswitch docs state that in the self-hosted, in-house PCI model the merchant is fully responsible for PCI DSS certification and data handling. Review the in-house PCI deployment model and confirm with your assessor whether tokenization keeps card data out of your environment in your chosen setup.
Before choosing this path, confirm in writing what the headless SDK collects, where it sends it, and which vault model keeps your environment out of card data flow.
Payment links let you accept payments without building a checkout. You create a link in Hyperswitch, and the customer completes payment on a hosted page. This is the lowest-effort option and the one where your application has the least contact with card data.
- Layout and copy: Limited to the theming options that payment links support. The payment link topic covers what can be changed.
- Engineering effort: The lowest of the three. Your team creates and distributes links and handles the return flow after payment.
- Frontend ownership: Hyperswitch hosts the payment page. Your team owns link delivery, any custom domain setup and any iframe embedding.
- PCI implications: Card entry happens on the hosted page, so your application does not receive card data directly. Confirm with your assessor how the hosted page and any custom domain affect your scope.
Before choosing this option, check whether a link-based flow matches your purchase journey, including repeat purchases, in-app purchases and the post-payment experience your customers expect.
Configuration choices for a headless build and when each fits
This table compares the configuration decisions that shape a headless Hyperswitch build, from payment method rendering to asset hosting and result handling. Read each row for the situation where the option fits and the maintenance load it places on your team. Confirm exact parameter names in the Hyperswitch SDK documentation before you commit to a design.
| Decision | When it fits | What it costs to maintain |
|---|---|---|
| Payment methods rendered by your UI | You need full control over layout and every method appears as a custom element, with your team owning each method's flow | Your team tracks method availability per processor and updates the UI when a method's requirements or fields change |
| Payment methods rendered by Hyperswitch components | You want fewer custom screens and accept the prebuilt method layouts for most payment types | Lower UI upkeep, but appearance changes are limited to what the SDK exposes, so check that against your brand needs |
| Client secret handling per environment | Your backend creates payments and passes a short-lived client secret to the browser or app for each session | Secrets must be generated server-side for sandbox, staging and production separately, with rotation and logging reviewed |
| Publishable key per environment | Each environment uses its own publishable key that identifies the merchant account for the SDK | Keys are configured in build pipelines or runtime config, and a mismatched key is a common source of failed test payments |
| Self-hosted web SDK build | You need control over the exact SDK version, must point at your own backend, or have a data residency or change control requirement | Your team builds, hosts and versions the SDK, and must match it to the app server release in each upgrade |
| Hosted SDK asset | You want the fastest path to a working build and accept the vendor-hosted delivery of SDK code | Less hosting work, but you still track version changes and review what loads on your payment page |
| Return URLs and redirects | Some methods redirect customers to a bank or wallet page and return them to your site | Each environment needs correct return URLs, and your team must handle users who return before a payment has settled |
| Result handling in the browser | You display success or failure messages directly from the SDK response | The browser result is not final, so order status must be confirmed by server-side status checks and webhooks |
| Error and decline messages | You map processor errors to your own customer wording and support paths | Your team maintains message mapping as new error types appear and keeps support staff informed |
What the headless SDK handles and what your team still builds
A headless checkout moves the payment form, the rendering and the flow decisions onto your side of the line. The cards below separate the work the SDK carries from the work your team owns, and each one names what to confirm in the SDK reference before you commit to a build plan.
Payment method data collection and tokenization
The headless SDK is the component that collects payment method details and exchanges them for a token rather than passing raw card numbers through your application code. Your team decides which fields render, where they sit in the page and how the SDK is mounted. Confirm in the SDK reference exactly which payment method types the headless flow supports, and whether card fields are hosted by the SDK or must be built by you, since that choice sets your PCI scope.
Vault deployment modelsPayment confirmation and next-action handling
Many payments stop partway through and need the customer to do something: a 3DS challenge, a wallet approval or a redirect to a bank page. Your code must read the next action the SDK returns and act on it, including returning the customer to your site after the redirect. Verify in the SDK reference which next-action types are returned for each payment method, and test the return path with real redirect timing, not only the success case.
Error mapping to customer messages
Declines, validation failures and processor errors arrive in different shapes, and some codes are safe to show while others are not. Your team maps each error to a message the customer can act on, such as retry with another card, and to an internal code your support staff can read. Confirm in the SDK reference which error fields are returned on the client and which only appear server side, so sensitive processor detail stays out of the browser.
Payment state machine
A payment moves through states such as created, requires action, processing and succeeded or failed, and the browser can disagree with the server about which state applies. Your team must define how each state changes the order, which states trigger a retry prompt, and when the order is considered final. Treat webhooks as the authority for final status, and check in the SDK reference and the Hyperswitch docs which status values the API returns for each step.
Order and session logic
The SDK does not know your cart, your tax rules or your order identifiers. Your backend creates the payment with the correct amount and currency, ties it to an order, and issues the client secret or session data the frontend needs. Design how stale sessions expire, how a double-clicked pay button avoids two charges, and how an abandoned payment is reconciled later. Verify the session and client secret lifetime in the SDK reference before you set expiry rules.
UI validation, accessibility and localization
Headless means your team owns the form around the payment fields: input labels, focus order, error announcements for screen readers, currency formatting and translated copy. These are not provided by the SDK, so each one needs a test plan and a named owner. Check in the SDK reference which field-level validation events the SDK emits, so your validation messages stay consistent with what the SDK rejects.
How building your own card fields changes PCI DSS scope
Custom card fields put your frontend on the card data path, so the scope question is where card numbers are captured and whether they ever reach your systems. With the headless SDK, your team builds the inputs that collect the primary account number, expiry and security code. Once those inputs are in your web or mobile code, your application pages, its scripts and its hosting are part of the environment an assessor will examine, even if the card data is then forwarded straight to Hyperswitch. Before you write any field code, map every point where a card number can be displayed, logged, cached or passed through a third-party script, and ask your assessor of record to confirm which of those points are in scope.
The vault model you choose sets how much of that scope you carry. In the self-hosted, in-house PCI model, the Hyperswitch docs state that the merchant is fully responsible for PCI DSS certification and data handling, so your team owns the card vault, its controls and the evidence that goes with them. In the self-hosted orchestration model with an external PCI vault provider, such as VGS or Tokenex, the Hyperswitch docs describe a setup where card storage sits with that provider, which can reduce what you hold but still leaves your frontend and your orchestration layer to be assessed. Read both pages through the self-hosted and in-house PCI model and the external PCI vault model before you choose a design.
DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue certifications or attestations, and it does not decide scope. A qualified security assessor (QSA) or the assessor of record makes that call on your actual architecture. Ask them to confirm, in writing, the scope of your custom field implementation, the vault model, and the controls around script loading and logging before build starts. Changing the vault model after the frontend is built usually means rework in the field code and the payment flow, so settle this decision first.
How to set up a custom headless checkout on a self-hosted backend
This sequence takes a team from a scoping decision about the card vault through a self-hosted Hyperswitch backend, server-side payment creation and a headless SDK front end, to tested declines, 3DS challenges and failures in a sandbox. The output is a checkout that works end to end before any live card data flows through it.
Decide vault model and card data scope
Before anything is deployed, the engineering lead, security lead and compliance owner agree which vault model the checkout will use. Hyperswitch documents three self-hosted models: self-hosted with the native Hyperswitch Vault (in-house PCI), self-hosted orchestration with an external PCI vault provider, and self-hosted orchestration with the SaaS Hyperswitch Vault. The choice decides whether your own card fields and servers fall into PCI DSS scope, so record it in writing with your assessor's view before building. Done when the team has a signed decision note that names the model and the data flows it creates.
Stand up the self-hosted backend
A platform or DevOps engineer deploys the Hyperswitch stack following the self-hosting documentation, which covers Helm charts on Kubernetes, guides for local, AWS, GCP and Azure, and a Docker-based local setup. The stack includes the Router and Scheduler services, PostgreSQL, Redis and the Control Center. Confirm the Superposition service is running if you deploy v1.124.0 or later, because that release made it a required dependency. Done when the health endpoints respond and a test API call to create a payment intent returns a valid response from your own host.
Configure processor connectors in the Control Center
A payments operations owner signs in to the Control Center, invites users (SSO is OpenID Connect only, and users must be invited before they can sign in), and adds connectors for the processors you hold sandbox credentials for. Store processor credentials according to your secrets policy rather than in shared documents. Set a default routing rule that sends test traffic to one connector first. Done when each connector shows as active and a sandbox test transaction appears in the Control Center under the correct merchant account.
Create payments server-side
A back-end developer builds the endpoint that creates a payment on your server with the Hyperswitch API key, so secret keys never reach the browser. The endpoint passes amount, currency, order reference and the customer details you need, then returns the client secret that the front end needs to render the payment form. Log the payment ID with your order record so support can trace it. Done when a payment created from your server returns a client secret, and the payment appears in the Control Center with status requires payment method.
Integrate the headless SDK with your UI
A front-end developer mounts the Hyperswitch headless SDK in your checkout, collects the payment method details through the SDK's fields, and calls confirm with the client secret and the return URL. Keep card entry inside the SDK-controlled fields or the vault model chosen in step one, and do not read raw card numbers into your own state or logs. Use the self-hosted SDK URL configured for your environment. Done when a test card submitted through your page reaches the confirm call, and browser developer tools show no card number in your own network requests or console output.
Wire return and webhook handling
A back-end developer handles two paths: the browser return after 3DS or redirect, and server-side webhooks from Hyperswitch that carry the final payment status. Treat the webhook as the source of truth for order fulfillment, verify its signature, and make the handler idempotent so duplicate deliveries do not create duplicate orders. Use the payment status from the server, not the browser redirect, to confirm the order. Done when a completed test payment marks the order as paid after the webhook arrives, and replaying the same webhook leaves the order unchanged.
Test declines, 3DS challenges and failures
A QA engineer runs the sandbox test cards and scenarios provided by the processor connectors you configured, covering successful payments, declines, 3DS challenge and frictionless flows, timeouts and cancelled challenges. For each scenario, check the payment status in the Control Center, the order state in your database and the message shown to the customer. Record the results and retain them as evidence for your go-live review. Confirm the test card numbers and scenario behavior with each processor's sandbox documentation, since behavior differs by connector. Done when every scenario has a recorded expected and actual result that match.
Confirm routing and card scope before go-live
Before any live traffic, the team reviews the routing configuration, the fallback when no rule applies, and the scope decision from step one against the evidence collected in testing. Confirm that live credentials are stored separately from sandbox ones and that access to the Control Center is limited to named roles. Run one low-risk live transaction under supervision if your governance requires it. Done when the sign-off record lists the vault model, routing rules, test evidence and the named owners of the checkout.
Security and operational considerations for a custom checkout
A headless checkout moves card entry, client configuration and error handling into code your team owns. The cards below cover the controls that connect those decisions, from client-side keys to dashboard access, and what to verify before go-live.
Protect the publishable key and client secret
The publishable key is meant to sit in browser code, but it still identifies which environment and merchant account a checkout talks to. Keep secret keys and client secrets on the server only, and never place them in the bundle, a query string or a mobile app. Confirm which key goes to which environment, and rotate keys through a documented process when a developer leaves or a build leaks configuration.
Set content security policy and script integrity
A custom checkout page runs your scripts beside the SDK, so any injected script can read card fields or alter the payment request. Define a content security policy that allows only the SDK origin, your API origin and the frame sources you need. Where you load the SDK from a CDN, pin the version and check integrity hashes at build time, then test the policy in report-only mode before enforcing it.
Match SDK and backend versions
The client SDK and the server components are released on different cadences, and a mismatch can break payment creation or confirmation. Upgrade the SDK and the self-hosted stack together, reading each release's compatibility matrix on the GitHub releases page before you change either side. Record the pair in your change log and test a payment in staging after every upgrade.
Hyperswitch releasesLog without capturing card data
Application logs, reverse proxies, browser error reporters and APM agents can capture request bodies or form values and store card numbers outside the vault. Filter request and response bodies for payment endpoints, exclude form fields from session replay, and confirm that only tokens and payment identifiers reach your log pipeline. Test the filters with a test card number and search the log store for it.
Monitor checkout errors and drop-off
Declines, SDK load failures and timeouts often appear first as a drop in completed payments rather than as an alert. Track SDK load errors, failed confirmations and webhook delays by browser and payment method, and set alerts on sudden changes. Keep error messages shown to shoppers generic, and send the detailed reason only to internal logs that your support team can access.
Control Center access under OpenID Connect only
The Control Center supports single sign-on through OpenID Connect only, with no SAML, no JIT or SCIM provisioning, and roles managed in Hyperswitch rather than mapped from your identity provider. Users must be invited before they can sign in, so plan an invitation and offboarding procedure that removes access in Hyperswitch when staff leave. Review admin roles on a fixed schedule, since your identity provider will not enforce them.
SSO setup docsQuestions teams ask before building a headless Hyperswitch checkout
Who pays for what when building a headless Hyperswitch checkout?
Your organization pays for its own engineering time, its infrastructure and the people who test and operate the checkout. Hyperswitch is open source under the Apache 2.0 license, so the platform itself carries no license fee, but the build still has several cost lines. Frontend work covers the payment form, field validation, loading states and error handling. Backend work covers creating payments server-side, handling webhooks and reconciling results. Infrastructure covers the self-hosted stack, and testing covers every card and payment method you enable. If you engage DeployOpen, the fee follows from a fixed scope agreed in writing before work starts. Most of the build cost is one-time, while hosting, upgrades, testing and support recur. Ask every quote which line items are one-time and which continue after launch.
Can an internal team build a headless checkout without outside help?
An experienced internal team can build a headless checkout, but the hardest parts are usually the decisions around the form, not the form itself. The team has to design the payment flow end to end, decide where card data is captured and stored, configure processors and routing, and handle failure paths such as declines, timeouts and duplicate submissions. It also needs a plan for upgrades, since the self-hosted stack and the client SDK must stay compatible. Teams with a Hyperswitch engineer, a security reviewer and a compliance owner usually find the build manageable. Teams missing one of those roles often benefit from a partner for the design review, the security testing or the compliance evidence. Compare the internal estimate against a written scope before deciding.
How long does a custom checkout take, and what sets the timeline?
No researched figure is available for a typical headless build, so confirm any duration against a written scope rather than a generic estimate. The timeline is driven by the number of payment methods and wallets you enable, the card capture model you choose, and how many processors you connect. Integration with your order system, your fraud and 3DS rules, and your environments (development, staging and production) also add time. Security testing and compliance review add their own steps, and both depend on how complete the build is. Dependencies on your own change approval processes can matter as much as engineering work. A fixed-scope agreement should list the milestones, the acceptance tests and the points where your team must provide decisions or access.
What skills does a headless Hyperswitch build need from our team?
The build needs four skill sets working together, and each one should have a named owner:
How does building custom card fields change our PCI DSS scope?
Custom card fields usually increase your PCI DSS scope, because your own page or app is now handling card numbers in the browser or on your servers. The Hyperswitch docs state that in the self-hosted, in-house PCI model, the merchant is fully responsible for PCI DSS certification and data handling. Using an external PCI vault provider or the SaaS Hyperswitch Vault changes which systems touch raw card data, and it can reduce the systems you must assess. The exact effect depends on your architecture, so confirm the scope with your acquiring bank and a qualified assessor before you build. Review the self-hosted and in-house PCI model and the outsourced option before choosing a card capture design.
What should a fixed-scope quote for a headless checkout include?
A useful fixed-scope quote lists exactly what will be delivered, how each deliverable will be accepted and who does what. It should name the payment methods, processors and wallets in scope, the card capture model, the environments and hosting targets, and the integrations with your order and fraud systems. It should state which security testing, documentation and handover items are included, and which are excluded. Ask for the assumptions the price depends on, such as access to your processors and cloud accounts, and the change process if scope moves. Separate one-time build fees from any retainer for upgrades, support and continuous testing, and confirm that the quote follows from the written scope, since DeployOpen does not publish a price list.
How do Hyperswitch version releases affect a custom checkout build?
Hyperswitch ships regular minor releases, and each release on the GitHub releases page includes a compatibility matrix for the Control Center and web client versions. Your headless checkout must stay compatible with the app server it calls, so you should pin versions and test upgrades in staging. The v1.124.0 release notes state that Superposition became a required configuration dependency, and deployments must run a Superposition service before upgrading to that version. Plan for that dependency in the first deployment, not as a later change. Build your release process so that SDK updates and server upgrades are tested together, and ask any partner how upgrades are handled after launch.
How DeployOpen scopes and delivers a custom Hyperswitch checkout
DeployOpen approaches a headless Hyperswitch checkout as a scoped build inside your own infrastructure, starting with the card fields, PCI scope and backend contract before any screen is designed. We agree the scope in writing, build and test the checkout against a self-hosted Hyperswitch backend, and hand over documentation your engineers and compliance team can review.
How we scope
- Written scope names the payment flows, payment methods, and screens your custom checkout must support.
- We document which card data path you choose and what that means for your PCI DSS scope before build starts.
- Scope records the self-hosted backend version, SDK version and the Control Center settings the checkout depends on.
How we build
- We build the checkout on the headless SDK, wiring your own card fields to the vault model agreed in scope.
- Payment creation and confirmation run server-side, with error handling and retries for declines, timeouts and 3DS challenges.
- Testing covers the sandbox and your self-hosted environment, including failed payments, abandoned sessions and browser and device coverage.
How we hand over
- Handover includes source code, build instructions and configuration for each environment your team runs.
- Documentation maps every card field, script and network call to the PCI DSS evidence your assessor will ask for.
- Your engineers receive a walkthrough of the upgrade process so SDK and backend versions stay matched after go-live.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer after the fixed-scope engagement ends.
- A retainer can cover matching the checkout to new Hyperswitch releases and retesting card fields after each upgrade.
- Ask any provider to confirm response times, change handling and who owns the PCI evidence before you sign.

