{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Flute Terminal SDK for Android","siteUrl":"https://developer.flute.com","description":"Documentation and API reference for integrating Flute payment processing.","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"flute-terminal-sdk-for-android","__idx":0},"children":["Flute Terminal SDK for Android"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Flute Terminal SDK for Android is a native integration layer for ISV point-of-sale applications running on Flute-provisioned Android terminals. It handles authentication, token management, payment configuration, and the full transaction lifecycle, letting your application focus on business logic rather than payment infrastructure."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK's primary feature is ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#deeplink-integration"},"children":["Deeplink Integration"]},", which lets your app initiate a card-present transaction and hand off to the Flute Terminal app on the same device for card collection. Additional features may be added to the SDK over time and documented here as new sections."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Flute Terminal SDK is the on-device counterpart to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/in-person-payments/pos-terminal-integration"},"children":["POS Terminal Integration"]}," REST flow:"]},{"$$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":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Flute Terminal SDK (this guide)"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Flute Terminal SDK (this guide)"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"POS Terminal Integration (REST)"},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["POS Terminal Integration (REST)"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Where your app runs"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["On the payment terminal itself"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Anywhere: back office, web POS, another till"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How the terminal is reached"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Deeplink to the Flute Terminal app on-device"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cloud connection to the terminal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Terminal must be Online/Ready at create time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How you get the outcome"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Callback, delivered exactly once"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Poll ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v2/pos/transactions/{id}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integration effort"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One method and one callback"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create, poll, interpret status"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$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":"Detail"},"children":["Detail"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hardware"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A Flute-provisioned Android payment terminal (for example, Sunmi P2 Pro)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Flute Terminal app"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Installed and activated on the same device, in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Semi-Integrated"]}," mode"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Android"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," 25 or higher; the SDK targets ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compileSdk"]}," 34"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credentials"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant-scoped ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientSecret"]}," (managed via the Flute dashboard or API)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Language"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kotlin or Java (the public API is Java-interoperable)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installation","__idx":3},"children":["Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Flute Terminal SDK is available on ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/getflute/flute-terminal-sdk","target":"_blank","rel":"noopener noreferrer"},"children":["Flute's official GitHub"]},". Download the SDK package from the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/getflute/flute-terminal-sdk/releases","target":"_blank","rel":"noopener noreferrer"},"children":["releases page"]},", unzip it next to your project, and register it in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.gradle.kts"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"dependencyResolutionManagement {\n    repositories {\n        google()\n        mavenCentral()\n        maven { url = uri(\"../flute-terminal-sdk\") }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then add the dependency to your app module:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"dependencies {\n    implementation(\"com.flute.terminal:sdk:1.0.0\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Third-party dependencies (Retrofit, OkHttp, Coroutines) resolve from Maven Central automatically."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK includes its own consumer ProGuard rules. No additional keep rules are required in your app, and R8 minification can remain enabled on release builds."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"environments","__idx":4},"children":["Environments"]},{"$$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":"Environment"},"children":["Environment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API Base URL"},"children":["API Base URL"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"OAuth Base URL"},"children":["OAuth Base URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SANDBOX"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://sandbox.api.flute.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://sandbox.oauth.api.flute.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRODUCTION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.flute.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://oauth.api.flute.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["On ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRODUCTION"]},", every payment and refund is real: cards are charged and money moves. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SANDBOX"]}," for integration and testing."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Credentials are scoped to one environment. A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientSecret"]}," issued for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SANDBOX"]}," are rejected on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRODUCTION"]}," and vice versa, surfacing as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," during initialization."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialization","__idx":5},"children":["Initialization"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"initialize","__idx":6},"children":["Initialize"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.initialize(context, config, onReady)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Call once, typically from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Application.onCreate()"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"FluteTerminal.initialize(\n    applicationContext,\n    FluteTerminalConfig(\n        environment = FluteTerminalConfig.Environment.SANDBOX,\n        clientId = BuildConfig.FLUTE_CLIENT_ID,\n        clientSecret = BuildConfig.FLUTE_CLIENT_SECRET,\n    ),\n) { result ->\n    when (result) {\n        is FluteResult.Success -> Log.i(\"Flute\", \"SDK ready\")\n        is FluteResult.Failure -> Log.e(\"Flute\", \"Initialization failed: ${result.error.message}\")\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initialization runs in the background: it fetches and caches an OAuth token, loads the merchant's payment configuration, identifies the terminal for this device, and keeps the session current automatically. The callback is optional; on-demand calls still work if warm-up is skipped or fails."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Never hardcode credentials in source. Inject them through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["local.properties"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BuildConfig"]},", or collect them once in an onboarding screen and let the SDK persist them."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminalConfig"]}," parameters"]}]},{"$$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":["environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Target environment (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SANDBOX"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRODUCTION"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First run only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Persisted encrypted after the first run; omit on subsequent launches."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientSecret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First run only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["As above."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serialNumber"]}]},{"$$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":["Overrides the auto-detected device serial. Required only on an emulator or when the Flute Terminal app cannot publish the serial."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enableHttpLogging"]}]},{"$$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":["Logs HTTP requests and responses. Disable in production."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["logger"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteLogger?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Receives redacted SDK diagnostics."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["terminalResultTimeoutSeconds"]}]},{"$$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":["Watchdog timeout for a terminal that never returns a result."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"provision-credentials","__idx":7},"children":["Provision Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.provisionCredentials(clientId, clientSecret, callback)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Supplies or rotates credentials at runtime without a rebuild. The SDK stores them encrypted per environment, invalidates the existing token, and re-warms."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"FluteTerminal.provisionCredentials(clientId, clientSecret) { result ->\n    // FluteResult.Failure with httpStatus 401 means wrong keys or keys for a different environment\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-credentials","__idx":8},"children":["Check Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.hasCredentials()"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if this device holds credentials for the selected environment."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val ready = FluteTerminal.hasCredentials()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"shut-down","__idx":9},"children":["Shut Down"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.shutdown()"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Releases the SDK and stops the token-refresh loop. After calling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shutdown()"]},", re-register the payment result launcher before taking new payments."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"FluteTerminal.shutdown()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"deeplink-integration","__idx":10},"children":["Deeplink Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deeplink Integration is the SDK's mechanism for initiating a card-present transaction directly from your POS application. The SDK launches the Flute Terminal app on the same device to handle card collection, then returns a typed result to your callback once the payment is resolved."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-it-works","__idx":11},"children":["How It Works"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your app calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startPayment()"]}," with an amount."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SDK resolves the terminal and currency, then requests the amounts to display (surcharge, cash discount, dual pricing, and tip)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SDK creates the POS transaction through the Flute API."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SDK launches the Flute Terminal app, which collects the card and processes the payment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Flute Terminal app returns control to your app."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The SDK fetches the authoritative transaction outcome from the API and delivers it to your callback."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The result returned to your callback reflects the transaction record as the gateway sees it, not just what the terminal app reported."]},{"$$mdtype":"Tag","name":"Diagram","attributes":{"data-language":"mermaid","diagramType":"mermaid","diagramSource":"sequenceDiagram\n    participant App as POS Application\n    participant SDK as Flute Terminal SDK\n    participant API as Flute API\n    participant Terminal as Flute Terminal App\n\n    App->>SDK: registerForPaymentResult(callback)\n    App->>SDK: startPayment(PaymentRequest)\n    SDK->>API: Create POS transaction\n    API-->>SDK: POS Transaction ID\n    SDK->>Terminal: Launch Flute Terminal app\n    Terminal->>Terminal: Collect card and process\n    Terminal-->>SDK: setResult() (ends deeplink session)\n    SDK->>API: Fetch authoritative outcome\n    API-->>SDK: Transaction record\n    SDK-->>App: PaymentResult callback\n","diagramHtml":"<svg id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" style=\"max-width: 1084.5px;\" viewBox=\"-50 -10 1084.5 741\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><g><rect x=\"813\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"Terminal\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"893\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"893\" dy=\"0\">Flute Terminal App</tspan></text></g><g><rect x=\"613\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"688\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"688\" dy=\"0\">Flute API</tspan></text></g><g><rect x=\"327\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"SDK\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"407\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"407\" dy=\"0\">Flute Terminal SDK</tspan></text></g><g><rect x=\"0\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">POS Application</tspan></text></g><g><line id=\"actor3\" x1=\"893\" y1=\"65\" x2=\"893\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Terminal\" data-et=\"life-line\" data-id=\"Terminal\"></line><g id=\"root-3\" data-et=\"participant\" data-type=\"participant\" data-id=\"Terminal\"><rect x=\"813\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"Terminal\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"893\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"893\" dy=\"0\">Flute Terminal App</tspan></text></g></g><g><line id=\"actor2\" x1=\"688\" y1=\"65\" x2=\"688\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"API\" data-et=\"life-line\" data-id=\"API\"></line><g id=\"root-2\" data-et=\"participant\" data-type=\"participant\" data-id=\"API\"><rect x=\"613\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"688\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"688\" dy=\"0\">Flute API</tspan></text></g></g><g><line id=\"actor1\" x1=\"407\" y1=\"65\" x2=\"407\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"SDK\" data-et=\"life-line\" data-id=\"SDK\"></line><g id=\"root-1\" data-et=\"participant\" data-type=\"participant\" data-id=\"SDK\"><rect x=\"327\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"SDK\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"407\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"407\" dy=\"0\">Flute Terminal SDK</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"App\" data-et=\"life-line\" data-id=\"App\"></line><g id=\"root-0\" data-et=\"participant\" data-type=\"participant\" data-id=\"App\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">POS Application</tspan></text></g></g><style>#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882{font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .error-icon{fill:#552222;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .error-text{fill:#552222;stroke:#552222;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-thickness-normal{stroke-width:1px;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-thickness-thick{stroke-width:3.5px;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-pattern-solid{stroke-dasharray:0;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-thickness-invisible{stroke-width:0;fill:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-pattern-dashed{stroke-dasharray:3;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .edge-pattern-dotted{stroke-dasharray:2;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .marker{fill:#333333;stroke:#333333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .marker.cross{stroke:#333333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 svg{font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;font-size:16px;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 p{margin:0;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .actor{stroke:#9370DB;fill:#ECECFF;stroke-width:1;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 rect.actor.outer-path[data-look=\"neo\"]{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 rect.note[data-look=\"neo\"]{stroke:#aaaa33;fill:#fff5ad;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 text.actor&gt;tspan{fill:black;stroke:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .actor-line{stroke:#9370DB;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [id$=\"-arrowhead\"] path{fill:#333;stroke:#333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .sequenceNumber{fill:white;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [id$=\"-sequencenumber\"]{fill:#333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [id$=\"-crosshead\"] path{fill:#333;stroke:#333;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .messageText{fill:#333;stroke:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .labelBox{stroke:#9370DB;fill:#ECECFF;filter:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .labelText,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .labelText&gt;tspan{fill:black;stroke:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .loopText,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .loopText&gt;tspan{fill:black;stroke:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .sectionTitle,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .sectionTitle&gt;tspan{fill:black;stroke:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#9370DB;fill:#9370DB;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .note{stroke:#aaaa33;fill:#fff5ad;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .noteText,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .noteText&gt;tspan{fill:black;stroke:none;font-weight:normal;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .activation0{fill:#f4f4f4;stroke:#666;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .activation1{fill:#f4f4f4;stroke:#666;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .activation2{fill:#f4f4f4;stroke:#666;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .actorPopupMenu{position:absolute;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .actor-man circle,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 line{fill:#ECECFF;stroke-width:2px;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 g rect.rect{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));stroke:#9370DB;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 .node .neo-node{stroke:#9370DB;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node rect,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].cluster rect,#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node polygon{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].swimlane.cluster rect{filter:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node path{stroke:#9370DB;stroke-width:1px;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node .outer-path{filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node .neo-line path{stroke:#9370DB;filter:none;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node circle{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].node circle .state-start{fill:#000000;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].icon-shape .icon{fill:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 [data-look=\"neo\"].icon-shape .icon-neo path{stroke:#9370DB;filter:drop-shadow(1px 2px 2px rgba(185, 185, 185, 1));}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;}#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;}</style><g></g><defs><symbol id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-solidTopArrowHead\" refX=\"7.9\" refY=\"7.25\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 8 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-solidBottomArrowHead\" refX=\"7.9\" refY=\"0.75\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 0 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-stickTopArrowHead\" refX=\"7.5\" refY=\"7\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 7 7\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><defs><marker id=\"diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-stickBottomArrowHead\" refX=\"7.5\" refY=\"0\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 7 L 7 0\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><text x=\"240\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">registerForPaymentResult(callback)</text><line x1=\"76\" y1=\"119\" x2=\"403\" y2=\"119\" class=\"messageLine0\" data-et=\"message\" data-id=\"i0\" data-from=\"App\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></line><text x=\"240\" y=\"134\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">startPayment(PaymentRequest)</text><line x1=\"76\" y1=\"173\" x2=\"403\" y2=\"173\" class=\"messageLine0\" data-et=\"message\" data-id=\"i1\" data-from=\"App\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></line><text x=\"546\" y=\"188\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Create POS transaction</text><line x1=\"408\" y1=\"227\" x2=\"684\" y2=\"227\" class=\"messageLine0\" data-et=\"message\" data-id=\"i2\" data-from=\"SDK\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></line><text x=\"549\" y=\"242\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POS Transaction ID</text><line x1=\"687\" y1=\"281\" x2=\"411\" y2=\"281\" class=\"messageLine1\" data-et=\"message\" data-id=\"i3\" data-from=\"API\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"649\" y=\"296\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Launch Flute Terminal app</text><line x1=\"408\" y1=\"335\" x2=\"889\" y2=\"335\" class=\"messageLine0\" data-et=\"message\" data-id=\"i4\" data-from=\"SDK\" data-to=\"Terminal\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></line><text x=\"894\" y=\"350\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Collect card and process</text><path d=\"M 894,389 C 954,379 954,419 894,409\" class=\"messageLine0\" data-et=\"message\" data-id=\"i5\" data-from=\"Terminal\" data-to=\"Terminal\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></path><text x=\"652\" y=\"434\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">setResult() (ends deeplink session)</text><line x1=\"892\" y1=\"473\" x2=\"411\" y2=\"473\" class=\"messageLine1\" data-et=\"message\" data-id=\"i6\" data-from=\"Terminal\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"546\" y=\"488\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Fetch authoritative outcome</text><line x1=\"408\" y1=\"527\" x2=\"684\" y2=\"527\" class=\"messageLine0\" data-et=\"message\" data-id=\"i7\" data-from=\"SDK\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"fill: none;\"></line><text x=\"549\" y=\"542\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Transaction record</text><line x1=\"687\" y1=\"581\" x2=\"411\" y2=\"581\" class=\"messageLine1\" data-et=\"message\" data-id=\"i8\" data-from=\"API\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"243\" y=\"596\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">PaymentResult callback</text><line x1=\"406\" y1=\"635\" x2=\"79\" y2=\"635\" class=\"messageLine1\" data-et=\"message\" data-id=\"i9\" data-from=\"SDK\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-db873b40e68e9b0344b0f4e164d280ef7487f484068d6618a9722e4e5afea882-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line></svg>","diagramHtmlDark":"<svg id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9\" width=\"100%\" xmlns=\"http://www.w3.org/2000/svg\" style=\"max-width: 1084.5px;\" viewBox=\"-50 -10 1084.5 741\" role=\"graphics-document document\" aria-roledescription=\"sequence\"><g><rect x=\"813\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"Terminal\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"893\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"893\" dy=\"0\">Flute Terminal App</tspan></text></g><g><rect x=\"613\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"688\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"688\" dy=\"0\">Flute API</tspan></text></g><g><rect x=\"327\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"SDK\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"407\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"407\" dy=\"0\">Flute Terminal SDK</tspan></text></g><g><rect x=\"0\" y=\"655\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-bottom\"></rect><text x=\"75\" y=\"687.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">POS Application</tspan></text></g><g><line id=\"actor3\" x1=\"893\" y1=\"65\" x2=\"893\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"Terminal\" data-et=\"life-line\" data-id=\"Terminal\"></line><g id=\"root-3\" data-et=\"participant\" data-type=\"participant\" data-id=\"Terminal\"><rect x=\"813\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"Terminal\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"893\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"893\" dy=\"0\">Flute Terminal App</tspan></text></g></g><g><line id=\"actor2\" x1=\"688\" y1=\"65\" x2=\"688\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"API\" data-et=\"life-line\" data-id=\"API\"></line><g id=\"root-2\" data-et=\"participant\" data-type=\"participant\" data-id=\"API\"><rect x=\"613\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"API\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"688\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"688\" dy=\"0\">Flute API</tspan></text></g></g><g><line id=\"actor1\" x1=\"407\" y1=\"65\" x2=\"407\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"SDK\" data-et=\"life-line\" data-id=\"SDK\"></line><g id=\"root-1\" data-et=\"participant\" data-type=\"participant\" data-id=\"SDK\"><rect x=\"327\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"160\" height=\"65\" name=\"SDK\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"407\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"407\" dy=\"0\">Flute Terminal SDK</tspan></text></g></g><g><line id=\"actor0\" x1=\"75\" y1=\"65\" x2=\"75\" y2=\"655\" class=\"actor-line 200\" stroke-width=\"0.5px\" stroke=\"#999\" name=\"App\" data-et=\"life-line\" data-id=\"App\"></line><g id=\"root-0\" data-et=\"participant\" data-type=\"participant\" data-id=\"App\"><rect x=\"0\" y=\"0\" fill=\"#eaeaea\" stroke=\"#666\" width=\"150\" height=\"65\" name=\"App\" rx=\"3\" ry=\"3\" class=\"actor actor-top\"></rect><text x=\"75\" y=\"32.5\" dominant-baseline=\"central\" alignment-baseline=\"central\" class=\"actor actor-box\" style=\"text-anchor: middle; font-size: 16px; font-weight: 400; font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif;\"><tspan x=\"75\" dy=\"0\">POS Application</tspan></text></g></g><style>#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9{font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;font-size:16px;fill:#ccc;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .error-icon{fill:#a44141;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .error-text{fill:#ddd;stroke:#ddd;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-thickness-normal{stroke-width:1px;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-thickness-thick{stroke-width:3.5px;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-pattern-solid{stroke-dasharray:0;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-thickness-invisible{stroke-width:0;fill:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-pattern-dashed{stroke-dasharray:3;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .edge-pattern-dotted{stroke-dasharray:2;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .marker{fill:lightgrey;stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .marker.cross{stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 svg{font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;font-size:16px;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 p{margin:0;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .actor{stroke:#ccc;fill:#1f2020;stroke-width:1;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 rect.actor.outer-path[data-look=\"neo\"]{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 rect.note[data-look=\"neo\"]{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 text.actor&gt;tspan{fill:lightgrey;stroke:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .actor-line{stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [id$=\"-arrowhead\"] path{fill:lightgrey;stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .sequenceNumber{fill:black;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [id$=\"-sequencenumber\"]{fill:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [id$=\"-crosshead\"] path{fill:lightgrey;stroke:lightgrey;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .messageText{fill:lightgrey;stroke:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .labelBox{stroke:#ccc;fill:#1f2020;filter:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .labelText,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .labelText&gt;tspan{fill:lightgrey;stroke:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .loopText,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .loopText&gt;tspan{fill:lightgrey;stroke:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .sectionTitle,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .sectionTitle&gt;tspan{fill:lightgrey;stroke:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:#ccc;fill:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .note{stroke:hsl(180, 0%, 18.3529411765%);fill:hsl(180, 1.5873015873%, 28.3529411765%);}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .noteText,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .noteText&gt;tspan{fill:rgb(183.8476190475, 181.5523809523, 181.5523809523);stroke:none;font-weight:normal;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .activation0{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .activation1{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .activation2{fill:hsl(180, 1.5873015873%, 28.3529411765%);stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .actorPopupMenu{position:absolute;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .actorPopupMenuPanel{position:absolute;fill:#1f2020;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .actor-man circle,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 line{fill:#1f2020;stroke-width:2px;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 g rect.rect{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 .node .neo-node{stroke:#ccc;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node rect,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].cluster rect,#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node polygon{stroke:url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].swimlane.cluster rect{filter:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node path{stroke:url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-gradient);stroke-width:1px;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node .neo-line path{stroke:#ccc;filter:none;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node circle{stroke:url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].node circle .state-start{fill:#000000;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].icon-shape .icon{fill:url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 [data-look=\"neo\"].icon-shape .icon-neo path{stroke:url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;}#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9 :root{--mermaid-font-family:\"Redocly Mermaid Sans\",\"Redocly Mermaid CJK\",sans-serif;}</style><g></g><defs><symbol id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-computer\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"></path></symbol></defs><defs><symbol id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-database\" fill-rule=\"evenodd\" clip-rule=\"evenodd\"><path transform=\"scale(.5)\" d=\"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"></path></symbol></defs><defs><symbol id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-clock\" width=\"24\" height=\"24\"><path transform=\"scale(.5)\" d=\"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"></path></symbol></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead\" refX=\"7.9\" refY=\"5\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M -1 0 L 10 5 L 0 10 z\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-crosshead\" markerWidth=\"15\" markerHeight=\"8\" orient=\"auto\" refX=\"4\" refY=\"4.5\"><path fill=\"none\" stroke=\"#000000\" stroke-width=\"1pt\" d=\"M 1,2 L 6,7 M 6,2 L 1,7\" style=\"stroke-dasharray: 0, 0;\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-filled-head\" refX=\"15.5\" refY=\"7\" markerWidth=\"20\" markerHeight=\"28\" orient=\"auto\"><path d=\"M 18,7 L9,13 L14,7 L9,1 Z\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-sequencenumber\" refX=\"15\" refY=\"15\" markerWidth=\"60\" markerHeight=\"40\" orient=\"auto\"><circle cx=\"15\" cy=\"15\" r=\"6\"></circle></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-solidTopArrowHead\" refX=\"7.9\" refY=\"7.25\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 8 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-solidBottomArrowHead\" refX=\"7.9\" refY=\"0.75\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 10 0 L 0 8 z\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-stickTopArrowHead\" refX=\"7.5\" refY=\"7\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 0 L 7 7\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><defs><marker id=\"diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-stickBottomArrowHead\" refX=\"7.5\" refY=\"0\" markerUnits=\"userSpaceOnUse\" markerWidth=\"12\" markerHeight=\"12\" orient=\"auto-start-reverse\"><path d=\"M 0 7 L 7 0\" stroke=\"black\" stroke-width=\"1.5\" fill=\"none\"></path></marker></defs><text x=\"240\" y=\"80\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">registerForPaymentResult(callback)</text><line x1=\"76\" y1=\"119\" x2=\"403\" y2=\"119\" class=\"messageLine0\" data-et=\"message\" data-id=\"i0\" data-from=\"App\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></line><text x=\"240\" y=\"134\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">startPayment(PaymentRequest)</text><line x1=\"76\" y1=\"173\" x2=\"403\" y2=\"173\" class=\"messageLine0\" data-et=\"message\" data-id=\"i1\" data-from=\"App\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></line><text x=\"546\" y=\"188\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Create POS transaction</text><line x1=\"408\" y1=\"227\" x2=\"684\" y2=\"227\" class=\"messageLine0\" data-et=\"message\" data-id=\"i2\" data-from=\"SDK\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></line><text x=\"549\" y=\"242\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">POS Transaction ID</text><line x1=\"687\" y1=\"281\" x2=\"411\" y2=\"281\" class=\"messageLine1\" data-et=\"message\" data-id=\"i3\" data-from=\"API\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"649\" y=\"296\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Launch Flute Terminal app</text><line x1=\"408\" y1=\"335\" x2=\"889\" y2=\"335\" class=\"messageLine0\" data-et=\"message\" data-id=\"i4\" data-from=\"SDK\" data-to=\"Terminal\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></line><text x=\"894\" y=\"350\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Collect card and process</text><path d=\"M 894,389 C 954,379 954,419 894,409\" class=\"messageLine0\" data-et=\"message\" data-id=\"i5\" data-from=\"Terminal\" data-to=\"Terminal\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></path><text x=\"652\" y=\"434\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">setResult() (ends deeplink session)</text><line x1=\"892\" y1=\"473\" x2=\"411\" y2=\"473\" class=\"messageLine1\" data-et=\"message\" data-id=\"i6\" data-from=\"Terminal\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"546\" y=\"488\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Fetch authoritative outcome</text><line x1=\"408\" y1=\"527\" x2=\"684\" y2=\"527\" class=\"messageLine0\" data-et=\"message\" data-id=\"i7\" data-from=\"SDK\" data-to=\"API\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"fill: none;\"></line><text x=\"549\" y=\"542\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">Transaction record</text><line x1=\"687\" y1=\"581\" x2=\"411\" y2=\"581\" class=\"messageLine1\" data-et=\"message\" data-id=\"i8\" data-from=\"API\" data-to=\"SDK\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line><text x=\"243\" y=\"596\" text-anchor=\"middle\" dominant-baseline=\"middle\" alignment-baseline=\"middle\" class=\"messageText\" dy=\"1em\" style=\"font-family: &quot;Redocly Mermaid Sans&quot;, &quot;Redocly Mermaid CJK&quot;, sans-serif; font-size: 16px; font-weight: 400;\">PaymentResult callback</text><line x1=\"406\" y1=\"635\" x2=\"79\" y2=\"635\" class=\"messageLine1\" data-et=\"message\" data-id=\"i9\" data-from=\"SDK\" data-to=\"App\" stroke-width=\"2\" stroke=\"none\" marker-end=\"url(#diagram-ddcf1304398fc5637c5e6d8f5a372b1f7ea7f17d1f0d162685afba49c86c4ac9-arrowhead)\" style=\"stroke-dasharray: 3, 3; fill: none;\"></line></svg>"},"children":["sequenceDiagram\n    participant App as POS Application\n    participant SDK as Flute Terminal SDK\n    participant API as Flute API\n    participant Terminal as Flute Terminal App\n\n    App->>SDK: registerForPaymentResult(callback)\n    App->>SDK: startPayment(PaymentRequest)\n    SDK->>API: Create POS transaction\n    API-->>SDK: POS Transaction ID\n    SDK->>Terminal: Launch Flute Terminal app\n    Terminal->>Terminal: Collect card and process\n    Terminal-->>SDK: setResult() (ends deeplink session)\n    SDK->>API: Fetch authoritative outcome\n    API-->>SDK: Transaction record\n    SDK-->>App: PaymentResult callback\n"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseResult(activityResult)"]}," is available as an alternative for apps that handle the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ActivityResult"]}," directly, bypassing the callback. The callback path is the recommended approach. It is also used for process-death recovery (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#recovery-after-process-death"},"children":["Recovery After Process Death"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"register-for-payment-result","__idx":12},"children":["Register for Payment Result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.registerForPaymentResult(owner, callback)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Registers the result callback and returns the launcher used to start payments. Must be called before the Activity reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STARTED"]},", making ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCreate()"]}," the only safe place."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"class CheckoutActivity : ComponentActivity() {\n    private lateinit var launcher: FluteTerminalLauncher\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        launcher = FluteTerminal.registerForPaymentResult(this) { result ->\n            handleResult(result)\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The callback fires exactly once per payment, on the main thread, for every outcome: approval, decline, cancellation, timeout, or a failure before the terminal was launched."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Registering after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STARTED"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RegistrationLifecycleException"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"start-a-payment","__idx":13},"children":["Start a Payment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["launcher.startPayment(PaymentRequest)"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"launcher.startPayment(\n    PaymentRequest.Builder(BigDecimal(\"25.00\"))\n        .posDeviceId(\"TILL-1\")\n        .referenceId(orderId)\n        .build(),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentRequest"]}," parameters"]}]},{"$$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":["baseAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BigDecimal"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount before ZCP or tip math. Two decimal places maximum."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pricingType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PricingType?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASH"]},". Required for Dual Pricing merchants to indicate which price ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseAmount"]}," represents. Must be omitted otherwise."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captureMethod"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CaptureMethod"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTO"]}," (sale, default) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MANUAL"]}," (authorization to capture later)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["readingMethod"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ReadingMethod?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["KEYED_ENTRY"]}," opens manual card entry on the terminal. Omit to use tap, insert, or swipe."]}]},{"$$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":["BigDecimal?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Preset tip amount. Omit to let the terminal prompt the customer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tipRatePercent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BigDecimal?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Preset tip as a percentage."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["referenceId"]}]},{"$$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 order reference, echoed on the transaction record."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posDeviceId"]}]},{"$$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":["Identifies the till within your estate."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paymentProcessorId"]}]},{"$$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":["Overrides the merchant's default processor."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customerId"]}]},{"$$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":["Associates the payment with a stored customer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestPaymentMethodStorageConsent"]}]},{"$$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":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", asks the cardholder to consent to saving their card. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["terminalId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currencyCode"]}," are resolved by the SDK from the device and merchant configuration. You do not supply them."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only one payment may be in flight at a time. A second call while a payment is running is rejected immediately with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorReason.ALREADY_IN_PROGRESS"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["captureMethod: MANUAL"]},", the transaction is authorized but not captured. Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capture()"]}," (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#post-payment-operations"},"children":["Post-Payment Operations"]},") to settle the funds."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"start-a-refund","__idx":14},"children":["Start a Refund"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["launcher.startRefund(RefundRequest)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initiates an unreferenced refund: funds are returned to whatever card the customer presents, with no originating transaction required."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"launcher.startRefund(\n    RefundRequest(\n        refundAmount = BigDecimal(\"25.00\"),\n        posDeviceId = \"TILL-1\",\n    ),\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The outcome arrives on the same payment callback as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult.Approved"]},", with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionType"]}," identifying it as a refund and a negative ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processedAmount"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An unreferenced refund credits funds to whatever card the customer presents, with no link to a prior sale. Confirm the amount with the operator before calling this method."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cancel-a-payment","__idx":15},"children":["Cancel a Payment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal.cancelPayment(posTransactionId, callback)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cancels the payment currently in flight, before the cardholder completes it."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"FluteTerminal.pendingPosTransactionId()?.let { id ->\n    FluteTerminal.cancelPayment(id) { /* accepted or rejected */ }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The return value indicates only whether the cancellation request was accepted by the SDK. The backend rejects it once the transaction has already reached the processor. The final outcome still arrives on the payment callback."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"handling-the-result","__idx":16},"children":["Handling the Result"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult"]}," is a sealed class with three cases."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"approved-case","__idx":17},"children":["Approved Case"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult.Approved"]}]},{"$$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":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["posTransactionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The POS transaction record identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The gateway transaction identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Processor authorization code."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["responseCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Processor response code."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processedAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BigDecimal?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Total actually charged. Reconcile against this, not the requested base amount."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AmountBreakdown?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Breakdown of base, tip, surcharge, discount, and their rates."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardInfo?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Masked PAN, brand, type, entry method, and CVM."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processor"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ProcessorReferences?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Auth code, RRN, MID, and TID for receipt and dispute reference."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["avs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AvsResult?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Address verification outcome."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["availableRefundAmount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BigDecimal?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Refundable remainder."]}]},{"$$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":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Sale\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Authorization\""]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Refund\""]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionDateTime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gateway timestamp."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["receiptData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Opaque receipt payload to render or print."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"declined-case","__idx":18},"children":["Declined Case"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult.Declined"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Carries ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posTransactionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["responseCode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]},", plus ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processedAmount"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["avs"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gatewayReferenceId"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionDateTime"]}," where available."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A decline is a completed transaction with a negative outcome, not an error. AVS and CVV rejections arrive here, with the reason in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"error-case","__idx":19},"children":["Error Case"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult.Error"]}]},{"$$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":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["reason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorReason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Machine-readable cause (see table below)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Human-readable detail."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["posTransactionId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Present when the transaction record was created before the failure."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlationId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Flute trace identifier. Include this when contacting support."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ErrorReason"]}," values"]}]},{"$$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":"Meaning"},"children":["Meaning"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Suggested handling"},"children":["Suggested handling"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USER_CANCELLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancelled on the terminal or by your app."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Return to the order."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TIMEOUT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No result within the configured timeout."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction may still complete. Reconcile with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkPendingPayment()"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ALREADY_IN_PROGRESS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Another payment is running."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wait for the current payment result."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TRANSACTION_CREATION_FAILED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction was never created."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show the message; safe to retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUTHENTICATION_FAILED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credentials rejected."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Re-provision credentials."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["APP_NOT_INSTALLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Flute Terminal app is missing or cannot handle the deeplink."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Install and activate the terminal app in Semi-Integrated mode."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNAUTHORIZED_CALLER"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This app is not permitted to start payments."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contact Flute."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TERMINAL_FAILED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The terminal flow failed."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retry."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MALFORMED_RESPONSE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unexpected response shape."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Retry and report with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlationId"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["NOT_INITIALIZED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]}," was not called, or the SDK was shut down."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]}," first."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UNKNOWN"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unclassified error."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Show the message and report with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlationId"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example result handler:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"private fun handleResult(result: PaymentResult) = when (result) {\n    is PaymentResult.Approved -> completeOrder(result.transactionId, result.processedAmount)\n    is PaymentResult.Declined -> showDeclined(result.message)\n    is PaymentResult.Error -> when (result.reason) {\n        ErrorReason.USER_CANCELLED -> returnToOrder()\n        ErrorReason.TIMEOUT -> reconcileLater(result.posTransactionId)\n        else -> showError(result.message, result.correlationId)\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"recovery-after-process-death","__idx":20},"children":["Recovery After Process Death"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your app is killed while the terminal is collecting the card, the in-flight transaction ID is persisted. Call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkPendingPayment()"]}," at startup and resolve the outstanding result before initiating new payments:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"FluteTerminal.checkPendingPayment { check ->\n    check.onSuccess { pending ->\n        when {\n            !pending.hasPending -> Unit                        // nothing was interrupted\n            pending.stillInProgress -> waitForTerminal()       // terminal has not finished yet\n            else -> pending.result?.let { handleResult(it) }  // resolved outcome\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PendingPaymentCheck"]}," properties"]}]},{"$$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":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$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":["hasPending"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether a payment was left in flight."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["stillInProgress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the terminal has not yet produced an outcome."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["result"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentResult?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The resolved outcome, when available."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Recovery methods"]}]},{"$$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":["checkPendingPayment(callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Resolves a payment left in flight, returning its outcome or indicating it is still running."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pendingPosTransactionId()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returns the persisted in-flight transaction ID, if any."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["parseResult(activityResult)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Parses a terminal ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ActivityResult"]}," directly. This is an escape hatch; the callback is the recommended integration path."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"post-payment-operations","__idx":21},"children":["Post-Payment Operations"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All methods are available as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@JvmStatic"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteTerminal"]}," and deliver results via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FluteCallback"]}," on the main thread."]},{"$$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":["capture(transactionId, amount?, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Captures an authorization, fully or partially."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["adjustTip(transactionId, tipAmount?, tipRate?, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Adjusts the tip on a captured transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reverseTransaction(transactionId, amount?, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Voids or refunds an existing transaction, fully or partially."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getTransaction(transactionId, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fetches the current transaction record."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["printReceipt(posTransactionId, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reprints the receipt on the terminal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shareReceipt(transactionId, method, recipient, hasCustomerConsent, callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sends the receipt by SMS. Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hasCustomerConsent = true"]}," only when the cardholder has agreed to be contacted."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"device-and-merchant-information","__idx":22},"children":["Device and Merchant Information"]},{"$$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":"Returns"},"children":["Returns"]},{"$$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":["fetchTerminals(callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["List<TerminalInfo>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Terminals on the merchant account, with online status."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetchPaymentConfig(callback)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentConfig"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currency, zero-cost processing option, and processors. Live fetch."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deviceSerialNumber()"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Serial number the SDK resolved for this device."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaymentConfig.requiresPricingType"]}," to determine whether ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pricingType"]}," must be set on every payment. It is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," for Dual Pricing merchants."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"threading-and-lifecycle","__idx":23},"children":["Threading and Lifecycle"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Every callback is delivered on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["main thread"]},", so you can update the UI directly."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The payment flow runs on a process-wide scope and survives Activity recreation while the terminal app is in the foreground."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shutdown()"]}," or an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]}," with changed configuration, re-register to obtain a new launcher."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":24},"children":["Troubleshooting"]},{"$$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":"Symptom"},"children":["Symptom"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Cause"},"children":["Cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Resolution"},"children":["Resolution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," during initialization"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Credentials belong to a different environment."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Provision keys for the correct environment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Transaction is already in progress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A previous POS transaction is unresolved on the terminal."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cancel it or wait for the SDK to release it."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Merchant uses Dual Pricing; pricingType is required"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pricingType"]}," omitted on a Dual Pricing merchant."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CARD"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CASH"]}," on every payment request."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["APP_NOT_INSTALLED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Flute Terminal app is missing or not in Semi-Integrated mode."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Install and activate the terminal app."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Result never arrives"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Launcher registered after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["STARTED"]},", or against a shut-down SDK."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Register in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCreate()"]}," and re-register after re-initializing."]}]}]}]}]}]},"headings":[{"value":"Flute Terminal SDK for Android","id":"flute-terminal-sdk-for-android","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Installation","id":"installation","depth":2},{"value":"Environments","id":"environments","depth":2},{"value":"Initialization","id":"initialization","depth":2},{"value":"Initialize","id":"initialize","depth":3},{"value":"Provision Credentials","id":"provision-credentials","depth":3},{"value":"Check Credentials","id":"check-credentials","depth":3},{"value":"Shut Down","id":"shut-down","depth":3},{"value":"Deeplink Integration","id":"deeplink-integration","depth":2},{"value":"How It Works","id":"how-it-works","depth":3},{"value":"Register for Payment Result","id":"register-for-payment-result","depth":3},{"value":"Start a Payment","id":"start-a-payment","depth":3},{"value":"Start a Refund","id":"start-a-refund","depth":3},{"value":"Cancel a Payment","id":"cancel-a-payment","depth":3},{"value":"Handling the Result","id":"handling-the-result","depth":3},{"value":"Approved Case","id":"approved-case","depth":4},{"value":"Declined Case","id":"declined-case","depth":4},{"value":"Error Case","id":"error-case","depth":4},{"value":"Recovery After Process Death","id":"recovery-after-process-death","depth":3},{"value":"Post-Payment Operations","id":"post-payment-operations","depth":2},{"value":"Device and Merchant Information","id":"device-and-merchant-information","depth":2},{"value":"Threading and Lifecycle","id":"threading-and-lifecycle","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2}],"frontmatter":{"title":"Flute Terminal SDK","description":"Integration guide for the Flute Terminal SDK for Android, covering installation, initialization, payments, result handling, and post-payment operations.","seo":{"title":"Flute Terminal SDK for Android"}},"lastModified":"2026-08-19T17:37:52.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/sdk/flute-terminal-sdk","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}