Hyperswitch iOS SDK integration

Hyperswitch iOS SDK integration decides how your app shows payment methods, handles Apple Pay and talks to your own Hyperswitch server. This page covers the options, setup sequence, checks and limits to confirm first.

On this page

What the Hyperswitch iOS SDK integration covers and when teams need it

The Hyperswitch iOS SDK is the native client piece that presents payment options to a customer and collects payment data inside your app, while your self-hosted Hyperswitch server handles orchestration: choosing processors, routing, retries and vaulting. A native iOS team that wants payments without building card fields or processor logic itself, and that wants the backend in infrastructure it controls, is the reader this section is written for. The Hyperswitch repository lists client SDKs for iOS alongside web, Android, React Native and Flutter, and Juspay maintains the project under Apache 2.0, so the client code can be reviewed and pinned like any other dependency.

Teams usually need this integration when they are shipping a native checkout and have decided the server side must stay in their own cloud account, data center or private network. The decisions to make early are whether the payment sheet is enough or a more customized flow is needed, whether Apple Pay is in scope for launch, whether the Lite SDK fits the app's size and footprint goals, and which environment the app will point at during development, staging and production. Each choice changes the configuration, the test plan and who signs off on the payment data path. Scope the work in writing before the build starts, because these decisions feed directly into the quote.

The iOS minimum requirements, the CocoaPods version to use, and the Apple Pay merchant and entitlement setup must be confirmed against the current Hyperswitch SDK documentation and the Apple developer requirements for your app at the time you start, since they change between releases. Ask your integration partner or your own iOS leads to record the exact versions they tested against, and check the Hyperswitch releases page for the matching server version before you pin anything.

Which iOS SDK integration options fit your app

This table compares four iOS integration options: the payment sheet, Apple Pay, the Lite SDK and a self-hosted endpoint configuration. Read each row for what the option covers, when it fits, what your team builds and what to confirm with Hyperswitch before you commit. Where public documentation does not settle a detail, the last column lists it as a question to confirm.

OptionWhat it covers and when it fitsWhat your team buildsWhat to confirm
Payment sheetPrebuilt payment UI inside your app. Fits teams that want a maintained checkout surface with less custom card UI.Server-side payment creation, sheet presentation, and handling of success, failure and pending results.Supported payment methods, customization limits, and which screens fall within your PCI DSS scope.
Apple PayWallet payment through Apple's sheet. Fits apps where Apple Pay is a required or high-volume method.Merchant identifier and domain setup in your Apple developer account, plus enabling the method in your Hyperswitch configuration.Which processors and connectors support Apple Pay in your setup, and the certificate and domain steps required.
Lite SDKA slimmer SDK footprint for apps that need only part of the full payment experience.Selecting the flows the app uses, and testing the reduced feature set against your checkout requirements.Whether an iOS Lite SDK is offered, its feature list, and how it differs from the full SDK.
Self-hosted endpoint configurationPoints the SDK at your own Hyperswitch server and hosted assets. Fits when residency or data path rules require your infrastructure.Per-environment base URLs, publishable keys, and a release process that keeps the SDK and server versions aligned.Exact iOS configuration keys, compatible SDK and server versions, and whether SDK assets can be served from your domain.

How the iOS app, your backend and self-hosted Hyperswitch exchange payment data

The flow starts when the customer begins checkout in the iOS app. Your merchant backend creates the payment on your self-hosted Hyperswitch server before the SDK presents anything, so the app receives only what it needs to start the payment sheet. Card details are captured inside the trust boundary and passed to the card vault, which keeps raw card data out of your app and most of your other services. Check where the boundary sits in your design, which systems can see card data, and how the processor or wallet result returns to your backend.

Payment creation happens server-side before the SDK presents the payment sheet.

Set up the iOS SDK with CocoaPods against your own server

This sequence takes a team from a clean Xcode project to a verified payment flow that runs through a self-hosted Hyperswitch backend. Each step ends with a check so problems surface at the point they are introduced, not at go-live.

  1. Confirm Xcode and deployment target requirements

    The mobile engineering lead checks the current iOS SDK release notes in the Hyperswitch repository and records the minimum Xcode version, the minimum iOS deployment target and the Swift toolchain the release expects. Confirm these against the release you plan to pin, not against an older tutorial, and agree the same values with the app team so every build machine matches. Done means a short written requirements note exists and the project's deployment target meets or exceeds it. Ask the vendor or the release notes for any change that affects your target platforms before you commit to a version.

  2. Add the SDK through CocoaPods

    An iOS engineer adds the Hyperswitch SDK pod to the app's Podfile, pinning the version confirmed in the previous step, then runs pod install from a clean checkout. Open the generated .xcworkspace file rather than the .xcodeproj so the Pods target is linked. The check is a clean run: delete the Pods directory and the local build folder, run pod install again, and confirm the build succeeds with no unresolved symbol or module errors. Commit the Podfile and Podfile.lock together so every developer and the CI runner resolve the same SDK version.

  3. Configure the publishable key and environment

    The engineer adds the publishable key and the environment value to the app configuration, keeping both out of source files by reading them from the build configuration or a secrets store. Publishable keys differ per environment, so use separate values for development, staging and production and confirm which key belongs to your self-hosted deployment. Pointing the SDK at your own server is covered in the dedicated SDK endpoint guide; here the goal is only a configuration that can be switched per build. Done means the app launches in a debug build and reads the expected key for the selected environment, with no key committed to version control.

  4. Create the payment on your backend

    The backend team creates the payment through the Hyperswitch API from your own server, never from the device, and returns only the client secret or the fields the SDK needs to the app. The API key stays on the server. Confirm the request and response shapes against the API reference for the version you run, since field names change between releases. The check is a successful server call that returns a payment identifier and a client secret, with the payment visible in the Control Center for the sandbox merchant account.

  5. Present the payment sheet and Apple Pay

    The app team presents the payment sheet with the client secret received from the backend, and enables Apple Pay only after the merchant identifier, domain and payment processing certificates are configured for the connector in use. Apple Pay setup happens outside the app as well as inside it, so confirm each step with the processor and Apple's developer account before testing. The check is a sheet that opens on a physical device or simulator, lists the expected payment methods, and completes a test card payment that returns a success callback to the app.

  6. Test results in the sandbox

    The QA lead runs a matrix of test cases in the sandbox: a successful payment, a declined card, a cancelled sheet, a network interruption and an Apple Pay payment if enabled. For each case, record what the app displays and what status the payment reaches on the server. Do not treat the app callback as proof of payment. The check is that the server-side status matches the app result for every case. Use the sandbox provided with the documentation before moving any configuration to your own infrastructure.

  7. Point the app at self-hosted infrastructure and confirm webhooks

    Once the sandbox flow passes, the team switches the SDK and the backend API base URL to the self-hosted server, using the configuration method documented for custom endpoints and a fresh publishable key for that environment. Repeat one test payment end to end, then confirm the webhook arrives at your backend, the signature validates and the payment status updates in your database. The check is a payment that appears in your own server logs and Control Center, with a webhook event recorded and processed once. Keep the sandbox test set as a regression suite for each SDK upgrade.

How Apple Pay fits into the Hyperswitch iOS SDK setup

Apple Pay is a wallet that depends on three separate setups, and none of them lives entirely in the iOS app. The Hyperswitch docs list Apple Pay among the supported wallets, but a working payment sheet needs Apple merchant identity configured for your business, a processor or connector that accepts Apple Pay payments for that identity, and the app's own entitlements so the device will present the sheet at all. If any one of the three is missing, the failure often shows up as a missing payment option in the sheet rather than as a clear error, so the team should test each layer in isolation before the first end-to-end run.

The iOS team owns the app side. They need to enable the Apple Pay capability in the Xcode project, add the merchant identifier that Apple issued for the business to the entitlements, and confirm that the SDK configuration passes the same merchant identifier and country and currency values the payment flow expects. They should also agree with the platform team which environment each build points at, since a sandbox merchant identity and a production one are not interchangeable. The platform team configures the Apple Pay wallet connection in the Hyperswitch Control Center for the relevant merchant profile and connector, and records which connector handles each currency. Check the current Control Center screens and the connector page in the Hyperswitch docs for the exact fields, because they change between releases.

Ask the processor or connector provider to confirm three things before go-live: that they accept Apple Pay for the merchant identity and countries you plan to serve, what certificate or domain verification steps they require on their side and who renews them, and how Apple Pay transactions appear in their settlement and dispute reports. Also confirm that the connector's Apple Pay support matches the Hyperswitch version you run, since connector behavior can change between releases. Write these answers into the runbook, with a named owner for certificate or identity renewals, so an expiry does not surface first as a checkout outage.

Security considerations for keys, card data and the device

The iOS SDK runs on a device you do not control, so the security decisions sit on both sides: what the app holds, what the server holds and what the team ships. The cards below cover the risks that connect the app, your backend and the self-hosted Hyperswitch stack, and the checks to confirm before go-live.

Keep secret keys off the device

The app should carry only the publishable key. Secret keys authorize server-side API calls such as creating and confirming payments, and anything bundled into an IPA can be extracted. Confirm that no secret key, admin credential or Control Center token appears in the Xcode project, Info.plist, build settings or remote configuration. Search the built binary and the source history, and rotate any key that has ever been committed. The secret key must never ship inside the app.

Hyperswitch docs

Use publishable keys per environment

Publishable keys should differ between sandbox, staging and production, and each build should point only at the backend for its environment. A production app that talks to a test backend, or a test build that reaches live processors, is a common misconfiguration. Confirm how your build pipeline selects the key and the endpoint, and that a debug or TestFlight build cannot reach live payment operations. Review how the key is injected so that it is not hard-coded across multiple targets.

Card data scope when fields run in the app

If card fields are rendered inside your app rather than by a hosted or tokenizing element, the device and the app code can touch card numbers, which can widen your PCI DSS scope. 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. Ask your QSA or internal assessor to confirm how the SDK's payment sheet keeps card entry inside the SDK boundary, and document where card data could be visible to your code.

In-house PCI model

Protect the endpoints that create payments

The iOS app typically calls your backend to create a payment intent and receive the client secret. That endpoint should require an authenticated user, validate the amount and currency from your own records rather than trusting the app, and apply rate limits. Without these controls, a modified client can request arbitrary amounts or flood your Hyperswitch server. Confirm the authentication method, the server-side price source and the logging behavior of this endpoint with your security team before release.

Logs and crash reports that capture payment data

Crash reporters, analytics SDKs and debug logs can capture request bodies, URLs or view hierarchies that include payment details, tokens or client secrets. Check that your crash reporting and analytics configuration excludes payment screens, that print and os_log calls do not write client secrets, and that log retention matches your policy. Ask the team to test a deliberately failed payment and inspect what reached each logging destination. Confirm this with your compliance lead, since logs can bring stored data into scope.

Pin and review SDK versions

The Hyperswitch iOS SDK is distributed through CocoaPods, so an unpinned version range can pull a new build into your app without review. Pin the exact version in your Podfile and Podfile.lock, and review the release notes and compatibility with your self-hosted router and Control Center before every upgrade. Hyperswitch publishes compatibility matrices on its releases page, so confirm the SDK version against your server version. Record each upgrade in your change log as part of your supply chain review.

Hyperswitch releases

Pointing the SDK at a sandbox, staging or self-hosted server

The hosted sandbox is the fastest way to confirm that the SDK builds, presents the payment sheet and returns a result before any self-hosted infrastructure exists. Here the application points at Hyperswitch's hosted test environment rather than your own server, so most of the configuration you will later change is still at its default. The purpose of this stage is to prove the integration logic, not your deployment.

  • Endpoint: The SDK targets the hosted sandbox, so no custom base URL is set yet. Confirm the exact setting in the SDK documentation for your version.
  • Keys: Use the sandbox publishable key and sandbox API credentials only. Never reuse them in staging or production.
  • Version: Record the SDK version you tested with, since the sandbox may update independently of your build.
  • Test data: Use test cards and test wallet configurations provided for the sandbox, and keep test and live data physically separate in your reporting.

Before moving on, confirm that a payment completes end to end, that your app handles a declined and a cancelled payment, and that the sandbox dashboard shows the same payment your app reported.

Limits to confirm before you commit to the iOS SDK

The iOS SDK sits on top of a self-hosted router, Control Center and supporting services, so its limits depend on choices made elsewhere in your stack. Each card below names one item to settle with Hyperswitch or test in your own environment before the mobile release calendar is set.

Lite SDK feature parity

Compare the Lite SDK with the full payment sheet against the features your checkout needs, such as saved cards, wallets, 3DS handling and country-specific payment methods. Ask Hyperswitch which payment sheet features the Lite SDK omits, then confirm each gap in a test build on a real device. Do not assume parity from the product name.

Hyperswitch docs

SDK and server version matching

Confirm which iOS SDK release works with the router and Control Center version you run. The GitHub releases page lists a compatibility matrix for Control Center and web client versions, but the iOS SDK row must come from Hyperswitch directly. Ask how long a mismatched SDK keeps working after a server upgrade and test that window before you ship.

Hyperswitch releases

Monthly minor release cadence

Hyperswitch ships roughly monthly minor releases, so the server side changes faster than most app store cycles. Ask which server changes require a matching SDK update and which do not. Plan your mobile release calendar around that answer, and decide whether you will pin the SDK version or follow each minor release.

Required services beyond the router

The v1.124.0 release notes make Superposition a required configuration dependency, and upgrades to that version need it running first. Confirm whether your self-hosted deployment includes Superposition and any other required service, and who operates it. A mobile release that depends on a service missing from your environment will fail in production.

Release notes

Payment methods enabled per processor

The payment methods the sheet shows depend on what each connected processor enables for your merchant account, not only on the SDK. Build a list of the methods your customers use, then check in a sandbox which ones appear on iOS for each processor. Ask Hyperswitch which methods require configuration on the server, and which need the app itself to change.

Undocumented iOS minimum versions

The Hyperswitch docs do not state the minimum iOS version or Xcode version the SDK supports. Ask Hyperswitch for both in writing, and check the CocoaPods deployment target in a clean build. Test the SDK on the oldest iOS version your app still supports, because a failing build or runtime error there is hard to catch in simulator testing alone.

Keeping the iOS SDK and the self-hosted server on compatible versions

The main upgrade risk in this integration is that your self-hosted Hyperswitch server and your iOS app ship on different schedules. The server is a stack you operate, so you decide when the Router, Scheduler and Control Center move forward. The app goes out through App Store review and stays on whatever version your users have installed, sometimes for a long time. A server upgrade can therefore reach users who run an older SDK build, and an app release can point at a server that has not yet been upgraded. Treat the server version and the SDK version as a pair that you record and test together, not as two independent upgrades.

The Hyperswitch GitHub releases page is the starting point. It lists the release cadence, and each release carries a compatibility matrix for Control Center and web client versions. Read those matrices before every server upgrade, and note the v1.124.0 release, which made Superposition a required configuration dependency. Deployments must have a Superposition service running before they upgrade to that version, so an upgrade that looks like a simple image bump can fail without that service in place. Confirm whether the iOS SDK has an equivalent compatibility matrix, and if it does not, ask your integration owner which server versions the SDK release you ship has been tested against.

Plan a test environment that runs your current app build against the target server version before you upgrade production. Use a non-production server built from the same release, point the app at it using your environment configuration, and run the payment sheet, Apple Pay and a refund or status path end to end. Keep the previous server version available so you can roll back, and keep a record of which app build and server version were paired in each environment. Ask your partner or internal team to confirm the upgrade order, whether the app must ship first or the server first, before the production change window.

Questions teams ask before integrating the iOS SDK

What drives the effort of an iOS SDK integration?

The main drivers are the number of payment methods you offer, how far you customize the payment sheet, whether Apple Pay is in scope, how much backend work sits behind the app, and how much testing your release process requires. Each one adds a different kind of work:

  • Payment methods: each method needs processor configuration, test cases and a check of how the sheet behaves for it.
  • Custom UI: brand changes within the SDK's supported options are cheaper than screens you build around it.
  • Backend: the server must create payments and handle results and webhooks correctly.
  • Testing: device, OS and app release checks multiply with each method.

Ask for each driver as its own line in the written scope, with the assumptions behind it, so you can see which choices move the quote.

Can our in-house iOS team integrate the Hyperswitch SDK alone?

Often yes for a standard payment sheet, provided the team has Swift or Objective-C experience, can manage CocoaPods dependencies, and has a backend engineer who can create payments on the server. The harder part is ownership. The SDK keeps card entry out of your app code, but your team still needs to confirm how the chosen vault and deployment model affects PCI DSS scope and who signs off on it. A useful test is a short pilot on a single payment method in a non-production app, reviewed by your security lead before the scope grows. If the team has not shipped a payment flow before, plan for a partner to review the design and test plan.

What does the iOS team need to provide for the integration?

The iOS team provides access to the app repository, build pipeline and TestFlight or equivalent distribution, plus the people who make UX and release decisions. The backend team provides a payment creation endpoint and a way to receive server-side status updates. Your payments or operations team provides the list of payment methods and the processor accounts behind them, along with sandbox credentials. Your Apple developer account owner must be available for any merchant identity or entitlement setup. Confirm the exact access list, owners and turnaround times in the written scope, because missing access is one of the most common causes of delay.

How does Apple Pay change the scope of an iOS integration?

Apple Pay adds work on both the Apple side and the payments side. On the Apple side, you need merchant identity configuration, entitlements in the app, and a test setup on real devices with Apple's sandbox conditions. On the payments side, the Apple Pay wallet must be enabled for the processors you route through, and the backend must handle the wallet's payment data correctly. Each of these needs an owner. Check the current Apple Pay requirements and the Hyperswitch documentation before you plan, since both can change between releases. Request a separate line for Apple Pay in the scope so it can be priced, scheduled and tested on its own.

Does the Lite SDK reduce the build effort?

It can, if your checkout fits the flow the Lite SDK supports. A lighter SDK usually means less UI code to build and maintain, but it also moves more decisions into your own code, such as how payment states are shown and how errors are handled. Before you choose it, confirm in the Hyperswitch documentation which payment methods, flows and customization options the Lite SDK supports in the version you plan to pin. Then test your two or three most important payment journeys on it. If one of them needs a feature the Lite SDK lacks, the savings may disappear, so settle that question during scoping rather than during build.

How do we plan switching the iOS SDK to a self-hosted server?

Treat the switch as a configuration and release change with a rollback path. Plan separate settings for development, staging and production, each with its own server address and publishable key. Match the SDK version to your self-hosted app server, and check the compatibility information in Hyperswitch's documentation and release notes before you upgrade either side. Test the full payment path in staging against your own router, including webhooks and refunds. Because app store review adds time to every release, plan the cutover so that a server-side rollback can happen without a new app build. Confirm the exact configuration keys with the SDK documentation for your version.

How long does an iOS SDK integration take?

The duration depends on the drivers covered above: payment method count, UI customization, Apple Pay, backend readiness, and how many release cycles your app needs. No general duration is stated here, and any figure you see elsewhere should be checked against your own scope. Ask for a milestone plan that lists dependencies explicitly: backend endpoint ready, sandbox credentials issued, Apple configuration complete, test sign-off, and app store submission. Then ask which milestones are at risk if an access request or review takes longer than expected. A written schedule tied to these dependencies is more useful for planning than a single number.

How DeployOpen scopes and delivers a Hyperswitch iOS SDK integration

DeployOpen plans, implements, tests and documents Hyperswitch iOS SDK integrations inside your own infrastructure, including the connection to a self-hosted Hyperswitch server. Engagements start with a written scope that names the SDK version, payment methods, Apple Pay configuration and backend endpoints before any code changes begin.

How we scope

  • Written scope names the iOS app, Xcode and minimum iOS targets, and the SDK version to be integrated.
  • We list which payment sheet flows, Apple Pay settings and Lite SDK usage are in or out of the agreed work.
  • Scope records the self-hosted server endpoints, publishable key handling and environments that the app must reach.

How we build

  • We add the SDK through CocoaPods and wire the payment sheet into your existing checkout flow.
  • Apple Pay merchant configuration and entitlements are set up alongside the processors you have connected.
  • Each integration step is tested on simulators and physical devices against your staging Hyperswitch server.

How we hand over

  • You receive the source changes, a configuration guide for each environment and the test results from the build.
  • Documentation covers how to repoint the SDK at a new self-hosted server and how to rotate keys safely.
  • A handover session walks your mobile team through the integration points, known limits and upgrade steps.

How we support

  • Engagements are fixed-scope, with the deliverables and timelines agreed in writing before work starts.
  • Ongoing support, SDK version upgrades and repeated testing are available as a retainer after handover.
  • Upgrades are planned against the Hyperswitch release notes and the compatibility matrix for each version.

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.