{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-android/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["code-walkthrough","step","admonition"]},"type":"markdown"},"seo":{"title":"Transactions | Android Card Present SDK Reference","description":"Reference for startTransaction — process card-present sales with the PAX D135 using the Finix Android SDK.","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/card-present/_filesets/transactions.kt","content":[{"start":0,"condition":{"steps":["signature"]},"children":["mpos.startTransaction(","    amount = 1000L,","    transactionType = TransactionType.SALE,","    transactionCallback = object : MPOSTransactionCallback {","        override fun onSuccess(result: TransactionResult?) { }","        override fun onError(errorMessage: String) { }","        override fun onProcessing(currentStepMessage: String) { }","    }",")"]},"",{"start":12,"condition":{"steps":["callback"]},"children":["mpos.startTransaction(","    amount = 1000L,","    transactionType = TransactionType.SALE,","    transactionCallback = object : MPOSTransactionCallback {","        override fun onSuccess(result: TransactionResult?) {","            // transaction approved — result contains transfer details","        }","        override fun onError(errorMessage: String) {","            // transaction declined or failed","        }","        override fun onProcessing(currentStepMessage: String) {","            // show progress to the user","        }","    }",")"]},"",{"start":30,"condition":{"steps":["transaction-controls"]},"children":["mpos.cancelTransaction()","","mpos.finishTransaction()"]},"",{"start":36,"condition":{"steps":["prompt-for-signature"]},"children":["mpos.startTransaction(","    amount = 5000L,","    transactionType = TransactionType.SALE,","    transactionCallback = myCallback,","    promptForSignature = PromptForSignature.ThresholdAmount(2500L)",")"]},""],"metadata":{"steps":["signature","callback","transaction-controls","prompt-for-signature"]},"basename":"transactions.kt","language":"kotlin"}],"downloadAssociatedFiles":[]}],"steps":[{"id":"signature","heading":"Function signature"},{"id":"callback","heading":"MPOSTransactionCallback"},{"id":"transaction-controls","heading":"Transaction controls"},{"id":"prompt-for-signature","heading":"PromptForSignature"}],"inputs":{},"toggles":{}},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"transactions","__idx":0},"children":["Transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startTransaction()"]}," after a successful device connection to initiate a card-present payment."]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"signature","heading":"Function signature"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"fun startTransaction(\n    amount: Long,\n    idempotencyId: String? = null,\n    transactionType: TransactionType,\n    transactionCallback: MPOSTransactionCallback,\n    splitTransfers: List<SplitTransfer>? = null,\n    tags: Map<String, String>? = null,\n    buyerIdentityId: String? = null,\n    surcharge: Long? = null,\n    tipAmount: Long? = null,\n    promptForSignature: PromptForSignature = PromptForSignature.Never\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":"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":["amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Long"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction amount in cents (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1000"]}," for $10.00)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotencyId"]}]},{"$$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":["Optional identifier used to idempotently identify transfers, authorizations, or refund requests."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Type of transaction. Supported values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionType.SALE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionType.REFUND"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionType.AUTHORIZATION"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionCallback"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MPOSTransactionCallback"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Callback receiving the transaction result or error."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["splitTransfers"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["List<SplitTransfer>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Split the transaction across multiple merchants. Requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ROLE_PARTNER"]}," credentials."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tags"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, String>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom key-value metadata attached to the transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buyerIdentityId"]}]},{"$$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":["Finix Identity ID of the buyer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["surcharge"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Long?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Surcharge amount in cents added to the transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tipAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Long?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tip amount in cents."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["promptForSignature"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PromptForSignature"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Controls when to prompt for a buyer signature. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Never"]},"."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"callback","__idx":1},"children":["Callback"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"callback","heading":"MPOSTransactionCallback"},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"interface MPOSTransactionCallback {\n    fun onSuccess(result: TransactionResult?)\n    fun onError(errorMessage: String)\n    fun onProcessing(currentStepMessage: 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":"Callback"},"children":["Callback"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Trigger"},"children":["Trigger"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSuccess"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction approved. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}," contains the transfer and authorization details."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transaction declined or failed. Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMessage"]}," for details."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onProcessing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Step in progress. Display ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currentStepMessage"]}," to the user if desired."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"transaction-controls","__idx":2},"children":["Transaction Controls"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"transaction-controls","heading":"Transaction controls"},"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":"Method"},"children":["Method"]},{"$$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":["cancelTransaction()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancels the transaction currently in progress."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["finishTransaction()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Signals that the transaction flow is complete and the SDK can clean up its state."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"signature-prompts","__idx":3},"children":["Signature Prompts"]},{"$$mdtype":"Tag","name":"CodeStep","attributes":{"id":"prompt-for-signature","heading":"PromptForSignature"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Controls when the SDK prompts the buyer to sign after a transaction."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Default suppresses all signature prompts"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Never"]}," and will not prompt for a signature even when EMV or CVM logic recommends one."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"sealed interface PromptForSignature {\n    object Always : PromptForSignature\n    object Never : PromptForSignature\n    class ThresholdAmount(val thresholdAmount: Long) : PromptForSignature\n    object OnNetworkRecommendation : PromptForSignature\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":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Behavior"},"children":["Behavior"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Always"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prompt for signature after every transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Never"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never prompt for signature. Default."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ThresholdAmount(amount)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prompt only when the transaction amount meets or exceeds the threshold."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OnNetworkRecommendation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prompt when the card network recommends it."]}]}]}]}]}]}]}]},"headings":[{"value":"Transactions","id":"transactions","depth":1},{"value":"Callback","id":"callback","depth":2},{"value":"Transaction Controls","id":"transaction-controls","depth":2},{"value":"Signature Prompts","id":"signature-prompts","depth":2}],"frontmatter":{"seo":{"title":"Transactions | Android Card Present SDK Reference","description":"Reference for startTransaction — process card-present sales with the PAX D135 using the Finix Android SDK."},"markdown":{"toc":{"hide":true}},"footer":{"hide":true}},"lastModified":"2026-06-04T00:03:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/android/card-present/transactions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}