{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-android/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step"]},"type":"markdown"},"seo":{"title":"PaymentSheet | Android SDK Reference","description":"Parameter reference for the Finix Android PaymentSheet composable — renders a secure tokenization form for collecting card and bank account details.","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":"CodeWalkthrough","attributes":{"__idx":1,"filters":{},"filesets":[{"files":[{"path":"android/online/_filesets/payment-sheet.kt","content":[{"start":0,"condition":{"steps":["signature"]},"children":["CompletePaymentSheetOutlined(","    applicationId = applicationId,","    isSandbox = isSandbox,","    paymentSheetResources = paymentSheetResources,","    paymentSheetColors = paymentSheetColors,","    onDismiss = onDismiss,","    onNegativeClick = onNegativeClick,","    onPositiveClick = onPositiveClick",")"]},"",{"start":12,"condition":{"steps":["param-application-id"]},"children":["// Sandbox","CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = true,","    onDismiss = { },","    onNegativeClick = { },","    onPositiveClick = { token -> }",")","","// Production","CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = false,","    onDismiss = { },","    onNegativeClick = { },","    onPositiveClick = { token -> }",")"]},"",{"start":32,"condition":{"steps":["param-is-sandbox"]},"children":["// Sandbox — use a sandbox Application ID","CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = true,","    onDismiss = { },","    onNegativeClick = { },","    onPositiveClick = { token -> }",")"]},"",{"start":43,"condition":{"steps":["param-callbacks"]},"children":["CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = false,","    onDismiss = {","        // Sheet was closed without submitting","        viewModel.setShowPaymentSheet(false)","    },","    onNegativeClick = {","        // Buyer tapped cancel","        viewModel.setShowPaymentSheet(false)","    },","    onPositiveClick = { token ->","        // Tokenization succeeded — save the token and dismiss","        viewModel.saveTokenResponse(token)","        viewModel.setShowPaymentSheet(false)","    }",")"]},"",{"start":63,"condition":{"steps":["param-customization"]},"children":["CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = false,","    paymentSheetResources = PaymentSheetResources(","        logoText = R.string.my_brand_name,","        tokenizeButtonText = R.string.pay_now,","        cancelButtonText = R.string.back","    ),","    paymentSheetColors = PaymentSheetColors(","        tokenizeButtonColor = Color(0xFF00897B),","        tokenizeButtonTextColor = Color.White,","        focusedIndicatorColor = Color(0xFF00897B),","        focusedLabelColor = Color(0xFF00897B)","    ),","    onDismiss = { viewModel.setShowPaymentSheet(false) },","    onNegativeClick = { viewModel.setShowPaymentSheet(false) },","    onPositiveClick = { token ->","        viewModel.saveTokenResponse(token)","        viewModel.setShowPaymentSheet(false)","    }",")"]},"",{"start":87,"condition":{"steps":["full-example"]},"children":["@Composable","fun CheckoutScreen() {","    val viewModel = viewModel<CheckOutViewModel>()","    val state = viewModel.state","","    if (state.showPaymentSheet) {","        CompletePaymentSheetOutlined(","            applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","            isSandbox = false,","            paymentSheetResources = PaymentSheetResources(","                logoText = R.string.my_brand_name,","                tokenizeButtonText = R.string.pay_now","            ),","            paymentSheetColors = PaymentSheetColors(","                tokenizeButtonColor = Color(0xFF00897B)","            ),","            onDismiss = { viewModel.setShowPaymentSheet(false) },","            onNegativeClick = { viewModel.setShowPaymentSheet(false) },","            onPositiveClick = { token ->","                viewModel.saveTokenResponse(token)","                viewModel.setShowPaymentSheet(false)","            }","        )","    }","}"]},""],"metadata":{"steps":["signature","param-application-id","param-is-sandbox","param-callbacks","param-customization","full-example"]},"basename":"payment-sheet.kt","language":"kotlin"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"signature","heading":"Function signature"},{"id":"param-application-id","heading":"applicationId"},{"id":"param-is-sandbox","heading":"isSandbox"},{"id":"param-callbacks","heading":"onDismiss / onNegativeClick / onPositiveClick"},{"id":"param-customization","heading":"paymentSheetResources / paymentSheetColors"},{"id":"full-example","heading":"Full example"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"paymentsheet","__idx":0},"children":["PaymentSheet"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Renders a secure tokenization form as a modal sheet. When the buyer submits the form, the SDK tokenizes the payment details and returns a ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/token-response"},"children":["TokenizedResponse"]}," via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPositiveClick"]}," callback."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/form-types"},"children":["form type"]}," comes in two style variants, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Outlined"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Classic"]},", and shares the same parameters."]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"signature","heading":"Function signature"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"CompletePaymentSheetOutlined(\n    modifier, applicationId, isSandbox,\n    paymentSheetResources, paymentSheetColors,\n    logoTextStyle, textStyle, buttonTextFont,\n    onDismiss, onNegativeClick, onPositiveClick\n)\n","lang":"text"},"children":[]},{"$$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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applicationId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your Finix Application ID. Defaults to sandbox environment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isSandbox"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," for sandbox, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," for production. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onDismiss"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the buyer dismisses the sheet without submitting."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onNegativeClick"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called when the buyer taps the cancel button."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPositiveClick"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(TokenizedResponse) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Called with the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/token-response"},"children":["TokenizedResponse"]}," on successful submission."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentSheetResources"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSheetResources"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customize logo, button labels, and strings. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/resources"},"children":["PaymentSheetResources"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentSheetColors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSheetColors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Customize field, button, and error colors. See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/colors"},"children":["PaymentSheetColors"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["modifier"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Modifier"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Jetpack Compose modifier applied to the sheet container."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["logoTextStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TextStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Text style for the logo label. Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["headlineSmall"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["textStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TextStyle"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Text style for input fields. Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LocalTextStyle.current"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buttonTextFont"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TextUnit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Font size for button labels. Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BUTTON_TEXT_FONT"]},"."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"param-application-id","heading":"applicationId"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your Finix Application ID, found in the Finix Dashboard. Application IDs are environment-specific, so use the one that matches your chosen ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isSandbox"]}," value."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"param-is-sandbox","heading":"isSandbox"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Controls which Finix environment the SDK connects to."]},{"$$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":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Environment"},"children":["Environment"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sandbox"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applicationId"]}," must belong to the same environment."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"param-callbacks","heading":"onDismiss / onNegativeClick / onPositiveClick"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The three required callbacks control what happens when the buyer interacts with the sheet."]},{"$$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":"Callback"},"children":["Callback"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Trigger"},"children":["Trigger"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Receives"},"children":["Receives"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onDismiss"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Buyer swipes the sheet away"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["nothing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onNegativeClick"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Buyer taps the cancel button"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["nothing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPositiveClick"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Successful tokenization"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/token-response"},"children":["TokenizedResponse"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dismiss the sheet in all three callbacks to avoid leaving it open after interaction."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"param-customization","heading":"paymentSheetResources / paymentSheetColors"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSheetResources"]}," to customize text and images, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentSheetColors"]}," to customize colors."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/resources"},"children":["PaymentSheetResources"]}," and ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/android/online/colors"},"children":["PaymentSheetColors"]}," for all available properties."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"full-example","heading":"Full example"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A complete implementation with customized colors and resources, controlled by a ViewModel."]}]}]}]},"headings":[{"value":"PaymentSheet","id":"paymentsheet","depth":1}],"frontmatter":{"seo":{"title":"PaymentSheet | Android SDK Reference","description":"Parameter reference for the Finix Android PaymentSheet composable — renders a secure tokenization form for collecting card and bank account details."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-05-18T23:35:10.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/android/online/payment-sheet","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}