Skip to main content

Android Secure Fields

Collect card data inside a native Android application without your code ever touching raw card values. The SDK renders secure input fields, validates the data, tokenizes it against the Purse gateway, and returns an opaque vault_form_token to your app.

How it works

Your backend uses the vault_form_token to create a payment via the Payment API — raw card data never passes through your servers or application code. This is the native Android counterpart of the web SecureFields flow; the server-side payment steps are identical.

Key characteristics

AspectDetail
Card data isolationField values are held inside the SDK module. No public API returns a PAN, CVV, or expiry date.
What your app receivesField validity, character count, detected brand, BIN prefix, last four digits, and the vault_form_token.
UI frameworksJetpack Compose (VaultForm for the whole form, or VaultField per field for custom layouts) and the View system (VaultFieldView in XML)
EnvironmentsSANDBOX and PRODUCTION — the SDK resolves the correct endpoint
DistributionMaven Central (eu.purse:securefields-android)

Requirements

RequirementValue
Minimum Android SDK26 (Android 8.0)
Target / Compile SDK36
Kotlin2.x
Java source compatibility11
Internet permissionRequired in your app manifest

When to use this SDK

ScenarioRecommendation
Building a native Android checkout✅ Android Secure Fields
Building a web checkout with the same server-side controlWeb SecureFields (Advanced Flow)
Building a hybrid or fully web checkoutConsider Drop-in Checkout or Headless Checkout
CVV-only re-auth for a stored card✅ Android Secure Fields (CVV field only)
Fully outsourcing the checkout UIConsider Hosted Page

PCI DSS scope

SAQ A-EP eligibility

The SDK architecture is designed to support SAQ A-EP eligibility: card data is captured and tokenized by the SDK without your application code accessing the raw values. Formal scope determination requires assessment by a qualified security assessor (QSA). See Security and compliance for merchant obligations.

Next steps