{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-android/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","admonition","step"]},"type":"markdown"},"seo":{"title":"TokenizedResponse | Android SDK Reference","description":"Reference for the Finix Android TokenizedResponse — the object returned after successful PaymentSheet submission.","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/token-response.kt","content":[{"start":0,"condition":{"steps":["token-shape"]},"children":["// TokenizedResponse returned via onPositiveClick:","data class TokenizedResponse(","    val id: String?,          // e.g. \"TKeD6uad8xZc52Rqg1VhvSBw\"","    val fingerprint: String?, // e.g. \"FPRrcobjtdU98gr4sjiqYR1Qg\"","    val createdAt: String?,   // e.g. \"2025-06-10T00:31:53.54Z\"","    val updatedAt: String?,","    val type: String?,        // \"PAYMENT_CARD\" or \"BANK_ACCOUNT\"","    val expiresAt: String?,   // 30 minutes after creation","    val currency: String?,    // \"USD\"",")"]},"",{"start":13,"condition":{"steps":["token-usage"]},"children":["CompletePaymentSheetOutlined(","    applicationId = \"APgPDQrLD52TYvqazjHJJchM\",","    isSandbox = false,","    onDismiss = { viewModel.setShowPaymentSheet(false) },","    onNegativeClick = { viewModel.setShowPaymentSheet(false) },","    onPositiveClick = { token ->","        // token.id is the value you pass to the Finix API","        viewModel.saveTokenResponse(token)","        viewModel.setShowPaymentSheet(false)","    }",")"]},"",{"start":27,"condition":{"steps":["token-type-branch"]},"children":["onPositiveClick = { token ->","    when (token.type) {","        \"PAYMENT_CARD\" -> {","            // Handle card token","        }","        \"BANK_ACCOUNT\" -> {","            // Handle bank account token","        }","    }","}"]},""],"metadata":{"steps":["token-shape","token-usage","token-type-branch"]},"basename":"token-response.kt","language":"kotlin"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"token-shape","heading":"TokenizedResponse shape"},{"id":"token-usage","heading":"Using the token"},{"id":"token-type-branch","heading":"Branching on token type"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"tokenizedresponse","__idx":0},"children":["TokenizedResponse"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The object passed to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPositiveClick"]}," callback after the buyer successfully submits the PaymentSheet. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token.id"]}," to 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. Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token.id"]}," to your backend and create a Payment Instrument immediately."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"token-shape","heading":"TokenizedResponse shape"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"data class TokenizedResponse(\n    val id: String?,\n    val fingerprint: String?,\n    val createdAt: String?,\n    val updatedAt: String?,\n    val type: String?,\n    val expiresAt: String?,\n    val currency: String?,\n)\n","lang":"kotlin"},"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":"Field"},"children":["Field"]},{"$$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":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Token ID — pass this to the Finix API to create a Payment Instrument."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fingerprint"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique fingerprint for the underlying payment instrument."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"PAYMENT_CARD\""]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"BANK_ACCOUNT\""]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiresAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timestamp when the token expires (30 minutes after creation)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currency"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"USD\""]}," for most tokens."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createdAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timestamp when the token was created."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["updatedAt"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Timestamp of the last update."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"token-usage","heading":"Using the token"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token.id"]}," to your backend, then call the Finix API to create a Payment Instrument. Once created, use the Payment Instrument ID for all subsequent Finix API calls."]}]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"token-type-branch","heading":"Branching on token type"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token.type"]}," to handle card and bank account tokens differently if your integration accepts both."]}]}]}]},"headings":[{"value":"TokenizedResponse","id":"tokenizedresponse","depth":1}],"frontmatter":{"seo":{"title":"TokenizedResponse | Android SDK Reference","description":"Reference for the Finix Android TokenizedResponse — the object returned after successful PaymentSheet submission."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-05-13T23:53:35.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/android/online/token-response","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}