{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-android/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Online Payments | Android SDK Reference","description":"Reference for the Finix Android online tokenization library — securely collect and tokenize card and bank account details using Jetpack Compose.","siteUrl":"https://docs.finix.com/","llmstxt":{"hide":false,"sections":[{"title":"Getting Started","includeFiles":["guides/getting-started/**/*.md"],"excludeFiles":[]},{"title":"Online Payments","includeFiles":["guides/online-payments/**/*.md"],"excludeFiles":["guides/online-payments/payment-features/fsa-hsa-non-healthcare-mcc.md"]},{"title":"In-Person Payments","includeFiles":["guides/in-person-payments/**/*.md"],"excludeFiles":[]},{"title":"Subscriptions","includeFiles":["guides/subscriptions/**/*.md"],"excludeFiles":[]},{"title":"After the Payment","includeFiles":["guides/subscriptions/after-the-payment/**/*.md"],"excludeFiles":[]},{"title":"Managing Operations","includeFiles":["guides/managing-operations/**/*.md"],"excludeFiles":[]},{"title":"Platform Payments","includeFiles":["guides/platform-payments/**/*.md"],"excludeFiles":[]},{"title":"Payouts","includeFiles":["guides/payouts/**/*.md"],"excludeFiles":[]},{"title":"Developers","includeFiles":["additional-resources/developers/**/*.md"],"excludeFiles":[]},{"title":"Plugins","includeFiles":["additional-resources/plugins/**/*.md"],"excludeFiles":[]},{"title":"Industry Considerations","includeFiles":["guides/industry-considerations/**/*.md"],"excludeFiles":[]},{"title":"Regional Considerations","includeFiles":["guides/regional-considerations/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"online-payments","__idx":0},"children":["Online Payments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Finix Android SDK lets you securely collect card and bank account details in your Android app using pre-built Jetpack Compose payment forms. Payment data is tokenized before it reaches your application, keeping sensitive card data out of your code and ensuring PCI compliance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tokens are created in Finix's vault and returned to your app. Use the token immediately to ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/api/payment-instruments"},"children":["create a Payment Instrument"]}," via the Finix API."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Token Expiration"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Tokens expire ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["30 minutes"]}," after creation. Create a Payment Instrument as soon as you receive the token."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installing-the-library","__idx":1},"children":["Installing the Library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The library is available on ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://central.sonatype.com/artifact/com.finix/finix-android-payment-sheet"},"children":["Maven Central"]},". Add it to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["build.gradle"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"groovy","header":{"controls":{"copy":{}}},"source":"buildscript {\n    ext.finix_version = '0.4.1'\n}\n\ndependencies {\n    implementation \"com.finix:finix-android-payment-sheet:$finix_version\"\n}\n","lang":"groovy"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your project must be configured for Jetpack Compose:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"groovy","header":{"controls":{"copy":{}}},"source":"android {\n    compileSdk 36\n    defaultConfig {\n        minSdk 24\n        targetSdk 36\n    }\n    kotlinOptions {\n        jvmTarget = 11\n    }\n    buildFeatures {\n        compose true\n    }\n    composeOptions {\n        kotlinCompilerExtensionVersion '1.5.15'\n    }\n}\n","lang":"groovy"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"system-requirements","__idx":2},"children":["System Requirements"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Requirement"},"children":["Requirement"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["24"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["targetSdk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compileSdk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["36"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kotlin"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.3.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kotlin Compiler Extension"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.5.15"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Material3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.4.0"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["JVM target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["11"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Kotlin Compatibility"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Consult the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developer.android.com/jetpack/androidx/releases/compose-kotlin"},"children":["Compose to Kotlin Compatibility Map"]}," if you need to match a specific Kotlin version."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quick-start","__idx":3},"children":["Quick Start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Render a payment sheet, handle the token response, and dismiss the sheet on any user action."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"@Composable\nfun CheckoutScreen() {\n    val viewModel = viewModel<CheckOutViewModel>()\n    val state = viewModel.state\n\n    if (state.showPaymentSheet) {\n        CompletePaymentSheetOutlined(\n            applicationId = \"YOUR_APPLICATION_ID\",\n            isSandbox = true, // set to false for production\n            onDismiss = { viewModel.setShowPaymentSheet(false) },\n            onNegativeClick = { viewModel.setShowPaymentSheet(false) },\n            onPositiveClick = { token ->\n                // token.id — use this to create a Payment Instrument via the Finix API\n                viewModel.saveTokenResponse(token)\n                viewModel.setShowPaymentSheet(false)\n            }\n        )\n    }\n}\n","lang":"kotlin"},"children":[]}]},"headings":[{"value":"Online Payments","id":"online-payments","depth":1},{"value":"Installing the Library","id":"installing-the-library","depth":2},{"value":"System Requirements","id":"system-requirements","depth":2},{"value":"Quick Start","id":"quick-start","depth":2}],"frontmatter":{"seo":{"title":"Online Payments | Android SDK Reference","description":"Reference for the Finix Android online tokenization library — securely collect and tokenize card and bank account details using Jetpack Compose."}},"lastModified":"2026-05-18T23:35:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/android/online","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}