Hyperswitch Android SDK integration: what it covers and when teams need it
An Android app team that must take card and wallet payments through a self-hosted Hyperswitch server needs the Android SDK as the client-side layer. It is the part of the integration that runs inside the app, presents the available payment methods to the shopper, collects payment details and confirms the payment against the server your organization runs. The Hyperswitch repository lists client SDKs for Android alongside web, iOS, React Native and Flutter, so the Android work is a distinct build, with its own dependencies, release cycle and test matrix, even though it depends on the same backend. Your backend deployment answers whether payments can be processed at all. The Android SDK answers whether a shopper on a phone can complete one, and that second question is where most of the app-side effort sits.
Scope the Android work separately when the app team owns its own release process, when the app must support payment methods that need native handling such as Google Pay, or when the app already has a checkout that has to be replaced rather than wrapped. Separate scoping also makes sense when the server is being pointed at a self-hosted endpoint instead of the hosted default, because the SDK configuration, publishable keys and environment handling then need to be designed and tested on Android devices, not just in a browser. Ask the team responsible for the backend which SDK version matches the router and Control Center versions you run, and confirm the compatibility matrix for each release on the Hyperswitch releases page before the app build is planned. If the app is a small change to an existing checkout, a headless or Lite approach may be the first question to settle, and that decision belongs before any build work begins.
How the Android app, SDK, your backend and Hyperswitch fit together
The flow starts in the Android app, where the customer begins checkout. Your own backend creates the payment with Hyperswitch and returns a client-side value to the app, which then hands it to the Android SDK. The SDK collects payment details and sends them to the Hyperswitch Router, which passes card data to the card vault and the processor. Check which side of the trust boundary each component sits on, since your backend holds the server credentials and the app should never hold them.
Payment creation stays server-side while the SDK collects details inside the app.
What the Android SDK needs before the first build
Four prerequisites have to be in place before the first Android build, and they depend on each other. The toolchain, the server version, the credentials and the payment accounts each fail in different ways, so check them in parallel before any code is written.
Android build toolchain and platform level
Confirm the minimum Android API level, the Kotlin and Android Gradle Plugin versions, and the JDK the SDK requires before you add it to a project. Mismatches here usually show up as build failures rather than runtime errors, so catch them early. Check whether the SDK is distributed through a Maven coordinate you can resolve from your artifact repository, and confirm the exact dependency version in the current Hyperswitch Android SDK documentation. Those figures were not part of our verified sources, so do not copy them from older blog posts.
Hyperswitch docsServer version matched to the SDK
The Android SDK talks to your Hyperswitch router, so the SDK version and the server version must be compatible. Hyperswitch publishes a compatibility matrix with each release on its GitHub releases page, covering the Control Center and web client versions. Pin the server release you run in production, then choose an SDK release listed as compatible with it. If you upgrade the server first, confirm the SDK still works against the new router in a staging environment before rolling out the app.
Hyperswitch releasesPublishable and secret keys per environment
Create separate credentials for sandbox, staging and production, and never ship a server-side secret in the app. The mobile client uses only the publishable key to initialize the SDK and to request a client secret for a payment, while your backend uses the secret key to create payments. Keep each environment's keys in its own secret store and confirm which key goes where in the SDK documentation. Plan how keys are rotated, and make sure a build for one environment cannot accidentally point at another.
Self-hosting guideProcessor and wallet accounts enabled
Google Pay and PayPal only appear in the sheet when the matching accounts are configured and enabled in Hyperswitch for the profile and environment you test. Confirm with each processor which merchant IDs, wallet registrations and domain or app verifications are required for Android, since these are set outside the SDK. Test with the wallet provider's test mode before live traffic, and verify that the payment methods you expect appear for the currency and country you target.
Payment sheet, widgets or Lite SDK: which Android option fits
This table compares the three ways an Android app can take payments with Hyperswitch: the prebuilt payment sheet, individual widgets inside an existing screen, and the Lite SDK. Read each row against how much of the payment screen your team wants to own, since that choice also sets how much PCI DSS scope your app's card fields add. Confirm each option's feature availability in the current Android documentation before you commit.
| Option | What the app team builds | What the SDK handles | When it fits |
|---|---|---|---|
| Prebuilt payment sheet | Checkout entry point, server call to create the payment, and result handling | Payment method list, card fields, validation, 3DS challenge screens and the sheet's layout | Fastest route to live checkout when brand control over the payment screen is limited |
| Individual widgets | The screen layout around the payment area, placement of each widget, and result handling | Rendering of selected payment methods such as Google Pay or PayPal elements inside your screen | Existing checkout screens where you want to keep your own layout and add specific methods |
| Lite SDK | Most of the payment screen, including method selection, card entry and error states | Core payment communication with your Hyperswitch backend, with less bundled UI | Teams that want full UI control and accept owning more of the card flow and its PCI scope |
| Card field ownership | Depends on the option: the sheet and widgets keep card entry inside the SDK, while Lite SDK work may place card entry in your screens | Tokenization of card data to the Hyperswitch vault when card fields are SDK-rendered | Confirm with your assessor which card fields your app renders and whether they reach your servers |
| Google Pay and PayPal elements | Enabling the methods in the payment configuration and matching merchant settings | Wallet sheets and redirects, subject to the Android version and SDK release | Confirm each wallet's supported flow in the current Android documentation |
| Backend connection | Server endpoint that creates the payment and returns the client secret to the app | Calls to the server URL you configure for your self-hosted Hyperswitch backend | Same backend pattern for all three options, so the choice does not change the server work |
| Customization effort | Brand, layout and copy work scaled to the option you pick | Default styling and behavior that the option ships with | Expect the most design and testing work with the Lite SDK, and the least with the sheet |
| Upgrade exposure | Regression testing of the screens and flows you own after each SDK update | Updates to the SDK's internal screens and wallet handling | The more UI you own, the more of each SDK release you need to retest |
How Google Pay and PayPal elements change the Android build
Google Pay adds requirements on three sides: the Google side, the processor side and the app. The app must be able to ask Google whether the device and user can pay with Google Pay, and the payment request must match the configuration your processor and Hyperswitch connector expect. Confirm the current merchant onboarding steps, environment settings and any Google policy requirements in Google's official Google Pay documentation before you commit to a design, because these rules change.
- Readiness check: The app should check whether Google Pay is available before showing the button, so users on unsupported devices never see a dead option.
- Merchant configuration: Your Google merchant details and gateway parameters must match the processor and connector setup in Hyperswitch, including the environment you test against.
- SDK handling: The Hyperswitch Android SDK builds the payment request and presents the Google Pay sheet, then passes the result back for processing on your backend.
- Device testing: Test on real Android devices with a test card loaded into Google Pay, across supported Android versions, with a locked screen, a second account and a cancelled sheet.
- Failure paths: Verify that declined, cancelled and unavailable states each show a clear message and leave the cart intact.
Before release, confirm the wallet prerequisites and Google Pay policy terms against the current official documentation and check the result on hardware, not only in an emulator.
PayPal changes the flow more than Google Pay because the customer leaves your app for an approval step and returns later. The app must handle the return reliably, and the backend must treat the final state as the source of truth. Confirm your PayPal account setup, supported regions, the required return and cancel handling, and any PayPal policy requirements in PayPal's official developer documentation, since these depend on your account and region.
- Account and processor setup: The PayPal account, client credentials and the connector configuration must be matched to the same environment, and the merchant account must support the flow you plan to offer.
- Return handling: The app must recover the payment state after the customer returns, including when the app was closed or the process was interrupted during approval.
- SDK handling: The Hyperswitch Android SDK opens the PayPal approval step and reports the outcome, but your backend should confirm the final status through the payment API and webhooks.
- Device testing: Test approval, cancel, back navigation, app switching, killing the app mid-approval and returning on a slow network, using sandbox accounts on real devices.
- Duplicate prevention: Verify that retries after an interrupted return do not create a second charge or an orphaned order.
Before release, confirm the current PayPal requirements with PayPal's documentation and check that every return path ends in a state your backend can reconcile.
Both wallets share several build changes that teams often underestimate. They add entries to the app's dependency and configuration files, they need matching test data in each environment and they add cases to the QA plan. Treat them as part of the same payment release rather than as separate features, so that the mobile, backend and operations teams sign off on the same configuration.
- Configuration per environment: Keep wallet settings for test and production separate, with the publishable keys and connector references stored outside source code.
- Backend contract: Agree on the payload the app sends after a wallet result and the status fields the backend returns, so both wallets follow one flow.
- Observability: Log wallet availability, outcome and error codes with a payment identifier so support can trace a failed attempt.
- Regression scope: Add wallet cases to each SDK upgrade test, because wallet behavior can change with Android and SDK versions.
- Ownership: Name who maintains the Google and PayPal accounts, since credential rotation or policy changes will otherwise block releases.
Before go-live, confirm the environment matrix and the owner for each wallet account with the teams that control those accounts.
Connecting the Android SDK to your own Hyperswitch backend
The Android app should never hold Hyperswitch server credentials. Your own backend holds the secret API key, creates the payment on your self-hosted Hyperswitch server, and returns to the app only the client value the SDK needs to start the payment sheet or widget for that payment. The publishable key the app uses to initialize the SDK is a different kind of credential from the secret key, and it should be scoped to the environment the app is targeting. Keep the secret key in your server's secret store, never in strings.xml, BuildConfig fields, or the APK, because anything shipped in an app can be extracted. Before go-live, confirm with the Android SDK documentation which client secret or payment object value the SDK expects from your backend and how it is passed through your API.
The SDK reports the outcome of a payment sheet or widget to the app through a callback, but that callback reflects what happened on the device, not a verified payment result. A user can cancel, lose connectivity, or be interrupted by the bank's authentication screen, and a modified client could report anything. Before the app releases goods, unlocks a subscription, or marks an order paid, your backend should confirm the final status of the payment on the self-hosted server, either by calling the payment status API or by consuming the webhook that Hyperswitch sends when the status changes. Treat the webhook as the system of record for fulfillment and use the client callback only to update the screen. Plan for the case where the webhook arrives before or after the app returns to the foreground, and make the fulfillment step idempotent.
The base URL and environment settings decide whether the SDK talks to your self-hosted Hyperswitch server or to a hosted endpoint, so they belong in build configuration per environment, such as development, staging and production. Point the SDK at your API host through the base URL option the SDK exposes, and keep it consistent with the publishable key and the server version your backend runs. A mismatch between the SDK version and the router version is a common cause of failed payments after an upgrade, so pin the Android SDK version alongside the Hyperswitch release you deploy. Verify the exact configuration keys, their names and their defaults in the Android SDK documentation for the version you ship, and test the full flow against your staging server before changing production settings.
How to sequence the Android integration build
This sequence takes a team from confirming which Hyperswitch server version it runs to a tested Android checkout that cancels, fails and times out cleanly and reconciles with the server. Each step closes with a check, so problems surface before the next layer is built.
Confirm server version and target environment
Before touching the app, record the Hyperswitch router version running in each environment and the Control Center and web client versions it is paired with. Use the compatibility matrix published with each GitHub release to choose a matching Android SDK version. Confirm that any required dependency, such as the Superposition service that v1.124.0 made mandatory, is running in the environment you will test against. Done means you have a written version pairing for dev, staging and production, and the app team has signed off on it.
Add the SDK dependency at the matching version
Add the Hyperswitch Android SDK to the app's Gradle configuration pinned to the version that matches your server pairing, not the latest published build. Keep the version in one shared location so every build variant resolves the same artifact. Run a clean build and confirm the project resolves the dependency without conflicts with existing payment or wallet libraries. Done means a clean build of each variant succeeds and the resolved SDK version is recorded in your build report.
Build server-side payment creation and status endpoints
Implement the backend calls that create a payment on your self-hosted router and read its status, keeping the secret API key on the server only. The app should never create a payment with credentials it holds locally. Return the client secret and payment identifiers the SDK needs, and expose a status endpoint that your app and support staff can query by payment ID. Done means a test payment created from your backend returns a client secret and a status query returns the expected state in your router logs.
Wire the chosen payment screen
Connect the app to the payment sheet or widget you selected, passing the client secret and the appearance and payment method options your design requires. Launch the sheet from a screen that can be re-entered safely, so a user who returns to the app does not create a duplicate payment. Confirm which payment methods appear for a test profile and that the list matches the connectors you have configured. Done means a test card payment completes through the sheet and the app receives a result callback.
Enable the Google Pay and PayPal paths
Enable Google Pay and PayPal only after the card path works, because each adds its own merchant configuration, device and account prerequisites. Confirm with Google and PayPal the requirements for your merchant account and test environments, and confirm that the connectors behind them are active on your Hyperswitch profile. Verify that each wallet appears only for eligible devices and currencies. Done means a test transaction completes through each wallet and the server shows the same payment method and status as the app.
Configure the self-hosted base URL per build variant
Set the SDK endpoint and publishable key for each build variant, so debug, staging and release builds point at the correct self-hosted router and never at another environment. Store these values in build configuration rather than in source files, and add a build-time check that fails when a release build targets a non-production host. Confirm the chosen setup against the Hyperswitch guidance on pointing SDKs at a self-hosted backend. Done means each variant reaches only its intended backend, verified by a test payment logged on the matching server.
Test cancellation, failure and timeout outcomes
Test the outcomes that cause the most support tickets: the user cancels in the sheet, the issuer declines the card, the network drops mid-authorization and the app is killed before the result returns. For each case, confirm the app shows the correct message and the server reaches a defined state, not an orphaned pending payment. Use a reconciliation view or status query to compare each app result against the server record. Done means every test case has a recorded expected state, an observed state, and a matching server record, and any mismatch is logged as a defect before release.
Security and operational controls for an Android payment app
The most important control is keeping secret keys out of the APK and out of anything the build system bakes into it. The Android app should only hold the publishable key for the environment it targets, supplied at build or runtime through a configuration value your team controls. Server-side API keys, the admin credentials used for the Control Center and any webhook signing secrets must never appear in build.gradle files, strings.xml, BuildConfig fields or the repository history. Review the release APK with a decompiler before each production build, and confirm that your CI system masks these values in logs. Treat the Android SDK as client code: anything that ships in the app is extractable by a determined attacker, so the server, not the app, decides amounts, currency and which payment methods are allowed.
Transport protection deserves a deliberate decision rather than a default. Certificate pinning against the endpoints your self-hosted backend exposes can reduce the risk of traffic interception, but a pin that expires or rotates without a matching app release will break payments for every user on older builds. Only pin if your team can ship a release, and rotate pins, on a schedule it can operate, and confirm with the SDK documentation how pinning interacts with the SDK's own network calls before enabling it. Separately, protect the server endpoints the app and Hyperswitch call back into: the payment status checks your app makes after a result, and the webhook receiver that Hyperswitch calls for asynchronous outcomes. Webhooks should be verified by signature, reject replays and be idempotent, because the mobile client can be interrupted before it learns the outcome.
Logging is where card data and tokens most often leak. Disable verbose SDK and HTTP logging in release builds, strip Log calls that print request or response bodies, and configure crash reporting so that payment payloads, client secrets and client tokens are scrubbed before they leave the device. Confirm with your crash reporting vendor what is captured in breadcrumbs and custom keys. Plan the release process itself as a control: each Android build should record which SDK version and which self-hosted backend release it was tested against, and the Hyperswitch upgrade notes and compatibility matrix are the source for that pairing. Keep a rollback plan for both sides. Finally, PCI DSS scope depends on which vault model and card field approach you choose, so read the vault deployment and compliance guidance before deciding how card data reaches the app.
Limits to confirm before committing to an Android build
The Android SDK sits between your app, your processors and a server you operate, so its limits come from three places at once. The cards below list what your team should confirm in its own environment before the build is scoped, since the answers change the design and the work.
SDK and server version pairing
The Android SDK and the self-hosted app server are released separately, and each Hyperswitch release ships with a compatibility matrix for Control Center and web client versions. Confirm in the release notes for your target server version which SDK versions it supports, and record the pair you will ship. Ask how the team will be told when a server upgrade needs a new SDK release, because a mismatched pair can block payments until an app store release reaches users.
Hyperswitch releasesPayment methods per market
Which wallets and alternative methods appear in the SDK depends on the processors connected to your merchant account and on the market where the customer pays. Google Pay and PayPal elements need to be checked against each processor and country you plan to serve. Ask the connector owner to confirm the exact methods, currencies and limits in writing for each market before the design is locked.
Device and Android version coverage
Your app's minimum Android version, the devices your customers use and the wallet apps installed on them all shape what the checkout can show. Confirm the minimum Android API level the SDK version you select supports, and test on the lowest supported version and on a mid-range device from your user base. Include devices without Google Pay set up, since those customers need a working fallback.
Upgrade behavior on the self-hosted server
When the server is upgraded, the SDK's endpoints, payment method lists and response shapes can change. Plan a staging environment that runs the new server version with the current app build before production. Ask what your rollback path is if an upgrade breaks a payment method, and who signs off on the upgrade window.
Required services in the server version
The v1.124.0 release notes make Superposition a required configuration dependency, and deployments must run a Superposition service before upgrading to that version. Any other required service in the server version you run becomes part of the Android integration's availability, so confirm the full list from the release notes and the deployment guide before you commit to a version.
Self-hosting docsFit with the app's design needs
The payment sheet, the widgets and the Lite SDK differ in how much of the screen you control and how much of the payment flow Hyperswitch handles. Compare them against your app's navigation, branding and accessibility requirements using a clickable prototype, not a description. Confirm which appearance settings are available in the SDK version you select so the design does not depend on options that are not there.
Questions buyers ask about Android SDK integration cost and effort
What drives the effort of an Android SDK integration?
The biggest drivers are the integration option you choose, the number of wallets and alternative payment methods you enable, the amount of server-side work, and how much device and release testing your app needs. A payment sheet with cards only is a smaller job than a custom flow with Google Pay and PayPal elements, because each added payment method adds configuration, test cases and failure paths. Backend work grows with the number of payment states your app must handle, such as pending, requires action and failed. Device testing across Android versions, screen sizes and OEM builds also adds time, as does your release process, including staged rollouts and review cycles. Ask the scope to list each of these items separately so you can see which ones move the total.
Which parts of an Android SDK integration are one-time and which recur?
The initial build is one-time: configuring the SDK, wiring the payment flow, connecting your backend, setting up wallets and completing test and release work. The recurring part is maintenance, mainly upgrades. Hyperswitch publishes frequent minor releases, and each release has a compatibility matrix for Control Center and web client versions, so your Android SDK version, your backend version and your other clients need to stay matched. Each upgrade needs regression testing on real devices and a new app release. Ask whether a written scope covers only the first integration or also a defined number of upgrade cycles, and whether ongoing support is a separate retainer.
What does the work need from our team before it starts?
Plan to provide test accounts for each processor and wallet in scope, access to the self-hosted Hyperswitch server or its configuration, and the publishable keys and environment settings for each stage. Your team also needs to make product decisions: which payment methods appear, how the sheet looks, how failures and pending states are shown to users, and what happens after a successful payment. Name a release owner who can approve app builds, submit them to the Play Console and schedule rollouts. A named engineer who can answer questions about your backend and your app's build setup shortens review cycles. These inputs are usually agreed in the written scope before work begins.
Can an in-house Android team integrate the SDK without outside help?
A capable in-house Android team can integrate the SDK alone if it has experience with payments, has time for the backend work and can run device tests. The main risks for an internal team are less about the SDK itself and more about the surrounding work: payment state handling on the server, webhook processing, wallet configuration with each provider, and keeping versions aligned after upgrades. Teams that have not shipped payment flows before often underestimate the testing of edge cases such as interrupted flows, app backgrounding during authentication and duplicate submissions. Assess your team against that list. If gaps exist, a fixed-scope engagement can cover the parts you lack while your engineers keep ownership of the app.
What should we ask for in a written quote for this integration?
Ask for a scope that names each integration option, each payment method and wallet, each backend component and each platform the app must support. Request a list of deliverables, including the working integration, test evidence, documentation and handover items. Ask which Hyperswitch and SDK versions the quote assumes and what happens if a new minor release lands during the work. Confirm who provides test accounts, server access and release submission, and what happens if those inputs are late. Ask whether upgrades, support and retesting are included or quoted separately, and how changes to scope are priced. Get the timeline from the written scope, not from a verbal estimate.
Does the Android SDK integration need a security or compliance review?
Yes, the review should cover how card data and payment tokens move through your app and backend. Confirm with your assessor which PCI DSS scope applies to your chosen vault model, because that choice determines whether your systems handle card data at all. The SDK integration should avoid storing sensitive payment data in app storage or logs, and your backend should validate payment results before fulfilling orders. DeployOpen can test the integration and prepare evidence for your assessors, but audit reports and certifications come from independent auditors and certification bodies. Ask the scope to list the security tests and the evidence you will receive.
How DeployOpen scopes and delivers Hyperswitch Android SDK work
DeployOpen plans, builds, tests and documents Android SDK integrations for Hyperswitch inside the client's own infrastructure and app pipeline. Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts, so the client's mobile, security and compliance teams review the same written plan.
How we scope
- Confirm the Android app's minimum SDK level, build tooling and release process before estimating the integration work.
- Record which payment methods, wallets and widgets the app will offer, including Google Pay and PayPal where needed.
- Agree whether the SDK connects to a self-hosted Hyperswitch backend or the hosted sandbox, and document the endpoints.
- Write down the card data path, so the vault model and PCI DSS scope decisions are visible in the written scope.
How we build
- Integrate the payment sheet or widgets into the app, following the flow your product and designers have approved.
- Connect the app to your backend for payment creation, status checks and return handling, with keys kept out of the app.
- Test the integration on representative Android devices, OS versions and failure paths such as cancelled and declined payments.
- Keep configuration per environment so sandbox and production settings are separated and reviewable.
How we hand over
- Deliver the source changes, build configuration and a written description of the integration points for your engineers.
- Document the backend contract, environment settings, test cases and known limitations of the Lite SDK or chosen components.
- Walk your team through the release steps, including how SDK version changes are matched to your backend version.
- Provide a verification record showing which test cases passed and which remain open for your team to confirm.
How we support
- Offer ongoing support and SDK version upgrades as a retainer, scoped in writing with your team.
- Re-test the integration when Hyperswitch releases change the SDK or the compatibility matrix your setup depends on.
- Review payment-flow changes with your security and compliance teams before they reach production.
- Confirm with your payment and platform owners any open decisions that depend on your own environment and processors.

