{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading"]},"type":"markdown"},"seo":{"title":"Non-3DS transactions","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"non-3ds-transactions","__idx":0},"children":["Non-3DS transactions"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Integrate a frictionless checkout experience."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By implementing non-3DS transactions into your payment flow, you benefit from:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Streamlined checkout:"]}," No additional authentication required, providing faster payment completion"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Lower transaction friction:"]}," Reduced cart abandonment with seamless payment flow"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Faster processing:"]}," Immediate payment completion without authentication delays"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Better mobile experience:"]}," Optimised for mobile checkouts where 3DS challenges can be problematic"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Non-3DS transactions are ideal for low-risk scenarios, trusted customers, or when implementing other fraud prevention measures. However, they may have different liability arrangements and potentially higher processing fees."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"payment-flow","__idx":2},"children":["Payment flow"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The non-3DS flow is made up of six key steps."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-submission","__idx":3},"children":["Step 1: Submission"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The customer taps the submit button or the payment is triggered programmatically. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submit()"]}," method in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardSubmitComponent"]}," is invoked and validation occurs inside it. If validation passes, the method continues with the payment processing. If it fails, the method exits early and doesn't proceed with the transaction."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-card-tokenisation","__idx":4},"children":["Step 2: Card tokenisation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If it's a new card, the SDK sends the card details to the tokenisation service. If it's a saved card, the SDK retrieves the existing token."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-evaluation","__idx":5},"children":["Step 3: Evaluation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK evaluates whether 3DS authentication is required. In this flow, no 3DS authentication is performed - the payment proceeds directly to authorisation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-authorisation","__idx":6},"children":["Step 4: Authorisation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK sends the transaction to the payment processor for authorisation without requiring additional customer authentication."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-5-capture","__idx":7},"children":["Step 5: Capture"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Depending on your configuration, the transaction may be automatically captured or require manual capture later."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-6-completion","__idx":8},"children":["Step 6: Completion"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The payment is completed and your application receives the final result through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," callback."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"non-3ds-callback-details","__idx":9},"children":["Non-3DS callback details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Non-3DS transactions use simplified callbacks without authentication complexity:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"core-callbacks","__idx":10},"children":["Core callbacks"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(SubmitResult) -> Unit"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose:"]}," Receives the final transaction result from the payment gateway."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameter:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmitResult"]}," (one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthorisedSubmitResult"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CapturedSubmitResult"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RefusedSubmitResult"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FailedSubmitResult"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Contains:"]}," Transaction status, provider response, transaction reference, processing details."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Usage:"]}," Handle payment success/failure, navigate to appropriate screens, update order status."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(PreAuthorisationData) -> TransactionInitiationData?"]}," (optional)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose:"]}," Last chance to modify transaction data before authorisation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameter:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PreAuthorisationData"]}," containing transaction details (no 3DS data)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionInitiationData"]}," with additional metadata, exemption data, or custom parameters."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return null:"]}," To proceed with default authorisation settings."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"additional-callbacks","__idx":11},"children":["Additional callbacks"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreTokenisation"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["() -> Boolean"]}," (optional)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose:"]}," Called before card tokenisation begins."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Return:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to proceed with tokenisation, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to abort."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Usage:"]}," Perform final validation, show loading states."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostTokenisation"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(CardTokenisationResult) -> Unit"]}," (optional)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose:"]}," Receives tokenisation results."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameter:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CardTokenisationResult"]}," (either success with token ID or failure with error)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Usage:"]}," Handle tokenisation success/failure, store token references."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["(BaseSdkException) -> Unit"]}," (optional)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Purpose:"]}," Handles submission errors."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameter:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BaseSdkException"]}," containing error details and codes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Usage:"]}," Display error messages, implement retry logic, track failures."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sdk-configuration","__idx":12},"children":["SDK configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To process non-3DS transactions, configure your SDK without 3DS callbacks:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val sdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = SessionConfig(\n        sessionId = \"your_session_id\",\n        sessionData = \"your_session_data\"\n    ),\n    transactionData = TransactionData(\n        amount = 99.99,\n        currency = CurrencyType.USD,\n        entryType = EntryType.Ecom,\n        intent = IntentType.Authorisation,\n        merchantTransactionId = \"order-123\",\n        merchantTransactionDate = { Instant.now().toString() },\n        shopper = Shopper(\n            email = \"customer@example.com\",\n            firstName = \"John\",\n            lastName = \"Doe\"\n        )\n    ),\n    clientId = \"your_client_id\",\n    ownerId = \"Unity\",\n    ownerType = \"MerchantGroup\",\n    merchantShopperId = \"shopper-123\"\n)\n\nval pxpCheckout = PxpCheckout.builder()\n    .withConfig(sdkConfig)\n    .withContext(this)\n    .withDebugMode(true)\n    .build()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-create-components","__idx":13},"children":["Step 1: Create components"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val cardNumberConfig = CardNumberComponentConfig(\n    label = \"Card number\",\n    isRequired = true,\n    validateOnChange = true\n)\n\nval cardExpiryConfig = CardExpiryDateComponentConfig(\n    label = \"Expiry date\",\n    isRequired = true,\n    validateOnChange = true\n)\n\nval cardCvcConfig = CardCvcComponentConfig(\n    label = \"Security code\",\n    isRequired = true,\n    validateOnChange = true\n)\n\nval cardSubmitConfig = CardSubmitComponentConfig(\n    buttonText = \"Pay £99.99\",\n    // Note: No 3DS callbacks = non-3DS transaction\n    onPostAuthorisation = { result ->\n        when (result) {\n            is AuthorizedSubmitResult -> {\n                Log.d(\"NonThreeDS\", \"Payment successful: ${result.providerResponse.message}\")\n                navigateToSuccessScreen()\n            }\n            is CapturedSubmitResult -> {\n                Log.d(\"NonThreeDS\", \"Payment captured: ${result.providerResponse.message}\")\n                navigateToSuccessScreen()\n            }\n            is RefusedSubmitResult -> {\n                Log.e(\"NonThreeDS\", \"Payment declined: ${result.stateData.message}\")\n                showError(\"Payment was declined by your bank\")\n            }\n            is FailedSubmitResult -> {\n                Log.e(\"NonThreeDS\", \"Payment failed: ${result.errorReason}\")\n                showError(\"Payment failed. Please try again.\")\n            }\n            else -> {\n                Log.e(\"NonThreeDS\", \"Unknown result: ${result::class.simpleName}\")\n                showError(\"Payment completed with unknown status.\")\n            }\n        }\n    },\n    onSubmitError = { error ->\n        Log.e(\"NonThreeDS\", \"Payment error: ${error.message}\")\n        showError(\"Payment failed: ${error.message}\")\n    }\n)\n\nval cardNumberComponent = pxpCheckout.createComponent(ComponentType.CARD_NUMBER, cardNumberConfig)\nval cardExpiryComponent = pxpCheckout.createComponent(ComponentType.CARD_EXPIRY_DATE, cardExpiryConfig)\nval cardCvcComponent = pxpCheckout.createComponent(ComponentType.CARD_CVC, cardCvcConfig)\nval cardSubmitComponent = pxpCheckout.createComponent(ComponentType.CARD_SUBMIT, cardSubmitConfig)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-handle-common-scenarios","__idx":14},"children":["Step 2: Handle common scenarios"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"low-value-transactions","__idx":15},"children":["Low-value transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For low-value transactions where 3DS exemptions apply:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"class LowValuePaymentManager {\n    \n    fun createNon3DSConfig(amount: Double): CardSubmitComponentConfig {\n        return CardSubmitComponentConfig(\n            buttonText = \"Pay ${formatCurrency(amount)}\",\n            onPostAuthorisation = { result ->\n                when (result) {\n                    is AuthorizedSubmitResult -> {\n                        Log.d(\"LowValue\", \"Low-value payment successful: ${result.providerResponse.message}\")\n                        // Track successful low-value payment\n                        trackPaymentSuccess(amount, \"low_value_non_3ds\")\n                        navigateToSuccessScreen()\n                    }\n                    is RefusedSubmitResult -> {\n                        Log.e(\"LowValue\", \"Low-value payment declined: ${result.stateData.message}\")\n                        showError(\"Payment declined. Please try a different card.\")\n                    }\n                    else -> {\n                        Log.e(\"LowValue\", \"Low-value payment failed\")\n                        showError(\"Payment failed. Please try again.\")\n                    }\n                }\n            }\n        )\n    }\n    \n    private fun formatCurrency(amount: Double): String {\n        return \"£%.2f\".format(amount)\n    }\n    \n    private fun trackPaymentSuccess(amount: Double, type: String) {\n        // Analytics tracking for successful payments\n        Log.d(\"Analytics\", \"Payment successful: amount=$amount, type=$type\")\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"trusted-customer-transactions","__idx":16},"children":["Trusted customer transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For returning customers with established trust:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"class TrustedCustomerPaymentManager(private val customerId: String) {\n    \n    fun createTrustedCustomerConfig(): CardSubmitComponentConfig {\n        return CardSubmitComponentConfig(\n            buttonText = \"Pay securely\",\n            onPreAuthorisation = { preAuthData ->\n                // Return transaction initiation data with risk screening\n                // Note: TransactionInitiationData only supports psd2Data and riskScreeningData\n                TransactionInitiationData(\n                    psd2Data = null, // Set to Psd2Data(scaExemption = ...) if needed\n                    riskScreeningData = RiskScreeningData(\n                        performRiskScreening = true,\n                        userIp = \"192.168.1.100\",\n                        account = RiskScreeningAccount(\n                            id = customerId,\n                            creationDateTime = \"2024-01-15T10:30:00.000Z\"\n                        ),\n                        items = listOf(\n                            RiskScreeningItem(\n                                price = 45.00,\n                                quantity = 1,\n                                category = \"General\"\n                            )\n                        ),\n                        fulfillments = listOf(\n                            RiskScreeningFulfillment(\n                                type = FulfillmentType.SHIPPED,\n                                recipientPerson = RiskScreeningRecipientPerson(\n                                    phoneNumber = \"+1234567890\"\n                                )\n                            )\n                        )\n                    )\n                )\n            },\n    onPostAuthorisation = { result ->\n                when (result) {\n                    is AuthorizedSubmitResult -> {\n                        Log.d(\"Trusted\", \"Trusted customer payment successful\")\n                        updateCustomerTrustScore(customerId, \"successful_payment\")\n                        navigateToSuccessScreen()\n                    }\n                    is RefusedSubmitResult -> {\n                        Log.e(\"Trusted\", \"Trusted customer payment declined\")\n                        updateCustomerTrustScore(customerId, \"declined_payment\")\n                        showError(\"Payment declined. Please verify your card details.\")\n                    }\n                    else -> {\n                        Log.e(\"Trusted\", \"Unknown payment result\")\n                        showError(\"Payment completed with unknown status.\")\n                    }\n                }\n            }\n        )\n    }\n    \n    private fun updateCustomerTrustScore(customerId: String, event: String) {\n        Log.d(\"TrustScore\", \"Updating trust score for $customerId: $event\")\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-handle-errors","__idx":17},"children":["Step 3: Handle errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Implement comprehensive error handling for non-3DS transactions:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"class Non3DSErrorHandler {\n    \n    fun handlePaymentError(error: PaymentError) {\n        when (error.code) {\n            \"CARD_DECLINED\" -> {\n                showError(\"Your card was declined. Please try a different payment method.\")\n            }\n            \"INSUFFICIENT_FUNDS\" -> {\n                showError(\"Insufficient funds. Please try a different card.\")\n            }\n            \"INVALID_CARD\" -> {\n                showError(\"Invalid card details. Please check and try again.\")\n            }\n            \"EXPIRED_CARD\" -> {\n                showError(\"Your card has expired. Please use a different card.\")\n            }\n            \"BLOCKED_CARD\" -> {\n                showError(\"Your card is blocked. Please contact your bank.\")\n            }\n            \"NETWORK_ERROR\" -> {\n                showError(\"Network error. Please check your connection and try again.\")\n            }\n            \"VALIDATION_FAILED\" -> {\n                showError(\"Please check all required fields are completed correctly.\")\n            }\n            else -> {\n                showError(\"Payment failed. Please try again or use a different payment method.\")\n            }\n        }\n    }\n    \n    private fun showError(message: String) {\n        // Implementation depends on your UI framework\n        Log.e(\"Non3DS\", message)\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"complete-example","__idx":18},"children":["Complete example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example shows a complete non-3DS implementation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"class Non3DSPaymentActivity : ComponentActivity() {\n    private lateinit var pxpCheckout: PxpCheckout\n    private lateinit var newCardComponent: NewCardComponent\n    private val errorHandler = Non3DSErrorHandler()\n    \n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        \n        setupPxpCheckout()\n        setupComponents()\n        \n        setContent {\n            Non3DSPaymentScreen()\n        }\n    }\n    \n    private fun setupPxpCheckout() {\n        val sdkConfig = PxpSdkConfig(\n            environment = Environment.TEST,\n            session = SessionConfig(\n                sessionId = \"session-${System.currentTimeMillis()}\",\n                sessionData = \"your_session_data\"\n            ),\n            transactionData = TransactionData(\n                amount = 29.99,\n                currency = CurrencyType.GBP,\n                entryType = EntryType.ECOM,\n                intent = IntentType.AUTHORISATION,\n                merchantTransactionId = \"order-${System.currentTimeMillis()}\",\n                merchantTransactionDate = { Instant.now().toString() },\n                shopper = Shopper(\n                    email = \"customer@example.com\",\n                    firstName = \"Jane\",\n                    lastName = \"Smith\"\n                )\n            ),\n            clientId = \"your_client_id\",\n            ownerId = \"Unity\",\n            ownerType = \"MerchantGroup\",\n            merchantShopperId = \"shopper-456\"\n        )\n        \n        pxpCheckout = PxpCheckout.builder()\n            .withConfig(sdkConfig)\n            .withContext(this)\n            .withDebugMode(true)\n            .build()\n    }\n    \n    private fun setupComponents() {\n        val newCardConfig = NewCardComponentConfig(\n            submit = CardSubmitComponentConfig(\n                // No 3DS callbacks - transaction will be non-3DS\n                onPostAuthorisation = { result ->\n                    when (result) {\n                        is AuthorizedSubmitResult -> {\n                            Log.d(\"Non3DS\", \"Payment successful: ${result.providerResponse.message}\")\n                            navigateToSuccessScreen()\n                        }\n                        is CapturedSubmitResult -> {\n                            Log.d(\"Non3DS\", \"Payment captured: ${result.providerResponse.message}\")\n                            navigateToSuccessScreen()\n                        }\n                        is RefusedSubmitResult -> {\n                            Log.e(\"Non3DS\", \"Payment declined: ${result.stateData.message}\")\n                            showDeclinedMessage(result.stateData.code)\n                        }\n                        is FailedSubmitResult -> {\n                            Log.e(\"Non3DS\", \"Payment failed: ${result.errorReason}\")\n                            showError(\"Payment failed. Please try again.\")\n                        }\n                        else -> {\n                            Log.e(\"Non3DS\", \"Unknown result: ${result::class.simpleName}\")\n                            showError(\"Payment completed with unknown status.\")\n                        }\n                    }\n                },\n                onSubmitError = { error ->\n                    Log.e(\"Non3DS\", \"Submit error: ${error.message}\")\n                    errorHandler.handlePaymentError(error)\n                }\n            )\n        )\n        \n        newCardComponent = pxpCheckout.createComponent(ComponentType.NEW_CARD, newCardConfig)\n    }\n    \n    @Composable\n    private fun Non3DSPaymentScreen() {\n        var isLoading by remember { mutableStateOf(false) }\n        var errorMessage by remember { mutableStateOf<String?>(null) }\n        \n        Column(\n            modifier = Modifier\n                .fillMaxSize()\n                .padding(16.dp)\n        ) {\n            Text(\n                text = \"Express checkout\",\n                style = MaterialTheme.typography.headlineMedium,\n                modifier = Modifier.padding(bottom = 8.dp)\n            )\n            \n            Text(\n                text = \"Fast and secure payment without additional verification\",\n                style = MaterialTheme.typography.bodyMedium,\n                color = MaterialTheme.colorScheme.onSurfaceVariant,\n                modifier = Modifier.padding(bottom = 16.dp)\n            )\n            \n            // Show error message if any\n            errorMessage?.let { message ->\n                Card(\n                    colors = CardDefaults.cardColors(containerColor = Color.Red.copy(alpha = 0.1f)),\n                    modifier = Modifier\n                        .fillMaxWidth()\n                        .padding(bottom = 16.dp)\n                ) {\n                    Text(\n                        text = message,\n                        color = Color.Red,\n                        modifier = Modifier.padding(16.dp)\n                    )\n                }\n            }\n            \n            // Render payment components\n            pxpCheckout.buildComponentView(\n                component = newCardComponent,\n                modifier = Modifier.fillMaxWidth()\n            )\n            \n            // Loading indicator\n            if (isLoading) {\n                Box(\n                    modifier = Modifier.fillMaxWidth(),\n                    contentAlignment = Alignment.Center\n                ) {\n                    CircularProgressIndicator()\n            Text(\n                        text = \"Processing payment...\",\n                        modifier = Modifier.padding(top = 60.dp)\n                    )\n                }\n            }\n        }\n    }\n    \n    private fun navigateToSuccessScreen(transactionId: String?) {\n        val intent = Intent(this, PaymentSuccessActivity::class.java).apply {\n            putExtra(\"transaction_id\", transactionId)\n            putExtra(\"payment_type\", \"non_3ds\")\n        }\n        startActivity(intent)\n        finish()\n    }\n    \n    private fun showDeclinedMessage(reasonCode: String?) {\n        val message = when (reasonCode) {\n            \"insufficient_funds\" -> \"Insufficient funds. Please try a different card.\"\n            \"expired_card\" -> \"Your card has expired. Please use a different card.\"\n            \"invalid_card\" -> \"Invalid card details. Please check and try again.\"\n            else -> \"Payment was declined. Please try a different card.\"\n        }\n        showError(message)\n    }\n    \n    private fun showError(message: String) {\n        AlertDialog.Builder(this)\n            .setTitle(\"Payment Error\")\n            .setMessage(message)\n            .setPositiveButton(\"OK\") { dialog, _ ->\n                dialog.dismiss()\n            }\n            .show()\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"callback-data","__idx":19},"children":["Callback data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This section describes the data received by the different callbacks as part of the non-3DS flow."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"onpreauthorisation","__idx":20},"children":["onPreAuthorisation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," callback receives:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Pre-authorisation data (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["preAuthData"]},"): Transaction data ready for authorisation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Error data (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"): Any error that occurred during pre-authorisation."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For non-3DS transactions, the 3DS-related data will be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"pre-authorisation-data","__idx":21},"children":["Pre-authorisation data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The pre-authorisation data includes transaction initiation data (for new cards) or card token data (for saved cards)."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["With transaction initiation data:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"PreAuthorisationData(\n    transactionInitiationData = TransactionInitiationData(\n        threeDSecureData = null, // Always null for non-3DS\n        psd2Data = PSD2Data(\n            scaExemption = \"LowValue\"\n        ),\n        identityVerification = IdentityVerification(\n            nameVerification = true\n        ),\n        addressVerification = AddressVerification(\n            countryCode = \"US\",\n            houseNumberOrName = \"123\",\n            postalCode = \"10001\"\n        )\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["With card token data:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"PreAuthorisationData(\n    transactionInitiationData = null,\n    cardTokenData = CardTokenData(\n        gatewayTokenId = \"gw_token_abc123def456789\",\n        schemeTokenId = null,\n        maskedPrimaryAccountNumber = \"****-****-****-4242\",\n        cardExpiryMonth = \"12\",\n        cardExpiryYear = \"2025\",\n        scheme = \"VISA\",\n        fundingSource = \"CREDIT\",\n        ownerType = \"PERSONAL\",\n        issuerName = \"Chase Bank\",\n        issuerCountryCode = \"US\",\n        lastSuccessfulPurchaseDate = \"2024-01-15T10:30:00Z\",\n        lastSuccessfulPayoutDate = null\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"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":["transactionInitiationData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the transaction, if associated with a new card, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," otherwise."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.threeDSecureData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is always ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," for non-3DS transactions."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.psd2Data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about PSD2. This is required for non-3DS transactions."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.psd2Data.scaExemption"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The type of SCA exemption that applies to this transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Possible values:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AnonymousCard"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LowValue"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SecureCorporate"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TransactionRiskAnalysis"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TrustedBeneficiary"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.identityVerification"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the identity verification."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.identityVerification.nameVerification"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the cardholder's name matches the name associated with the registered address on file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.addressVerification"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the address verification."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.addressVerification.countryCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The country code associated with the cardholder's address, in ISO-3166-1 alpha-2 format."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.addressVerification.houseNumberOrName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The cardholder's street address."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionInitiationData.addressVerification.postalCode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The postal or ZIP code associated with the cardholder's address."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardTokenData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the card token if associated with a saved card, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," otherwise."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of what to do with this data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"onPreAuthorisation = { preAuthData ->\n    Log.d(\"Payment\", \"Card transaction data: $preAuthData\")\n    \n    // Return transaction initiation data with risk screening\n    // Note: TransactionInitiationData only supports psd2Data and riskScreeningData\n    TransactionInitiationData(\n        psd2Data = null, // Set to Psd2Data(...) if needed\n        riskScreeningData = RiskScreeningData(\n            performRiskScreening = true,\n            excludeDeviceData = false,\n            userIp = \"192.168.1.100\",\n            account = RiskScreeningAccount(\n                id = \"user_12345678\",\n                creationDateTime = \"2024-01-15T10:30:00.000Z\"\n            ),\n            items = listOf(\n                RiskScreeningItem(\n                    price = 45.00,\n                    quantity = 1,\n                    category = \"General\"\n                )\n            ),\n            fulfillments = listOf(\n                RiskScreeningFulfillment(\n                    type = FulfillmentType.SHIPPED,\n                    shipping = RiskScreeningShipping(\n                        shippingMethod = ShippingMethod.STANDARD\n                    ),\n                    recipientPerson = RiskScreeningRecipientPerson(\n                        phoneNumber = \"+1234567890\",\n                        email = \"customer@example.com\"\n                    )\n                )\n            )\n        )\n    )\n}\n\n// Helper data classes\ndata class DeviceData(\n    val userAgent: String,\n    val language: String,\n    val screenResolution: String,\n    val timezone: String\n)\n\ndata class SessionData(\n    val sessionId: String,\n    val timestamp: String,\n    val ipAddress: String?\n)\n\ndata class RiskIndicators(\n    val customerType: String,\n    val paymentHistory: String,\n    val velocityCheck: String\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"onpostauthorisation","__idx":22},"children":["onPostAuthorisation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," callback receives the final transaction result (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SubmitResult"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"success","__idx":23},"children":["Success"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the transaction was successful, you'll receive either an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AuthorizedSubmitResult"]}," or a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CapturedSubmitResult"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"AuthorizedSubmitResult(\n    state = \"Authorised\",\n    providerResponse = ProviderResponse(\n        code = \"00\",\n        message = \"Approved\",\n        cardVerificationCodeResult = \"M\",\n        addressVerificationServiceResult = \"Y\"\n    ),\n    fundingData = FundingData(\n        cardVerificationCodeResult = \"Matched\",\n        addressVerificationServiceResult = \"Y\"\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"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":["state"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The final state of the transaction.",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Possible values:",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorised"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Captured"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Refused"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerResponse"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the provider's response."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerResponse.code"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The raw result code returned by the provider that processed the transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerResponse.message"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The raw message associated with the result code from the provider that processed the transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerResponse.cardVerificationCodeResult"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Card Verification Code (CVC) result returned by the provider."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["providerResponse.addressVerificationServiceResult"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Address Verification Service (AVS) result returned by the provider."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fundingData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the payment method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fundingData.cardVerificationCodeResult"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Card Verification Code (CVC) result in human-readable format."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fundingData.addressVerificationServiceResult"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Address Verification Service (AVS) result in human-readable format."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of what to do with this data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"onPostAuthorisation = { result ->\n    Log.d(\"Payment\", \"Non-3DS payment result: $result\")\n    \n    when (result) {\n        is AuthorizedSubmitResult -> {\n            Log.d(\"Payment\", \"Payment successful!\")\n            Log.d(\"Payment\", \"Provider response: ${result.providerResponse.message}\")\n            \n            // Check verification results\n            val fundingData = result.fundingData\n            if (fundingData.cardVerificationCodeResult == \"Matched\") {\n                Log.d(\"Payment\", \"CVC verification passed\")\n            }\n            \n            if (fundingData.addressVerificationServiceResult == \"Y\") {\n                Log.d(\"Payment\", \"Address verification passed\")\n            }\n            \n            // Store transaction details\n            storeTransactionRecord(TransactionRecord(\n                amount = 99.99,\n                currency = \"USD\",\n                cardType = \"VISA\",\n                processingType = \"non-3ds\",\n                timestamp = Instant.now().toString()\n            ))\n            \n            // Navigate to success screen\n            navigateToSuccessScreen()\n        }\n        is CapturedSubmitResult -> {\n            Log.d(\"Payment\", \"Payment captured successfully!\")\n            Log.d(\"Payment\", \"Provider response: ${result.providerResponse.message}\")\n            navigateToSuccessScreen()\n        }\n        is RefusedSubmitResult -> {\n            Log.e(\"Payment\", \"Payment declined: ${result.stateData.message}\")\n            handlePaymentFailure(result)\n        }\n        is FailedSubmitResult -> {\n            Log.e(\"Payment\", \"Payment failed: ${result.errorReason}\")\n            showError(\"Payment failed: ${result.errorReason}\")\n        }\n        else -> {\n            Log.e(\"Payment\", \"Unknown result type: ${result::class.simpleName}\")\n            showError(\"Payment completed with unknown status\")\n        }\n    }\n}\n\ndata class TransactionRecord(\n    val amount: Double,\n    val currency: String,\n    val cardType: String,\n    val processingType: String,\n    val timestamp: String\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"failure-declined","__idx":24},"children":["Failure (Declined)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the bank or issuer declines the transaction, you'll receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RefusedSubmitResult"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"RefusedSubmitResult(\n    state = \"Refused\",\n    stateData = StateData(\n        code = \"05\",\n        message = \"Do not honour\"\n    ),\n    providerResponse = ProviderResponse(\n        code = \"05\",\n        message = \"Do not honour\",\n        merchantAdvice = MerchantAdvice(\n            code = \"01\",\n            message = \"Try another payment method\"\n        ),\n        cardVerificationCodeResult = \"M\",\n        addressVerificationServiceResult = \"Y\"\n    ),\n    fundingData = FundingData(\n        cardVerificationCodeResult = \"Matched\",\n        addressVerificationServiceResult = \"Y\"\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's an example of how to handle failures:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"private fun handlePaymentFailure(result: RefusedSubmitResult) {\n    Log.e(\"Payment\", \"Payment declined: ${result.stateData.message}\")\n    \n    // Check merchant advice for next steps\n    result.providerResponse?.merchantAdvice?.let { advice ->\n        when (advice.code) {\n            \"01\" -> {\n                // Try another payment method\n                showError(\"Payment declined. Please try a different card.\")\n                enableAlternativePaymentMethods()\n            }\n            \"02\" -> {\n                // Retry with different amount\n                showError(\"Transaction amount issue. Please contact support.\")\n            }\n            \"03\" -> {\n                // Contact issuer\n                showError(\"Please contact your bank to authorise this payment.\")\n            }\n            else -> {\n                showError(\"Payment declined: ${advice.message}\")\n            }\n        }\n    } ?: run {\n        // Generic decline message\n        val declineReason = when (result.stateData.code) {\n            \"05\" -> \"Payment declined by your bank\"\n            \"14\" -> \"Invalid card number\"\n            \"54\" -> \"Card has expired\"\n            \"61\" -> \"Amount limit exceeded\"\n            else -> \"Payment was declined\"\n        }\n        showError(declineReason)\n    }\n    \n    // Track decline for analytics\n    trackDeclineEvent(DeclineEvent(\n        declineCode = result.stateData.code,\n        declineReason = result.stateData.message,\n        merchantAdvice = result.providerResponse?.merchantAdvice?.code,\n        timestamp = Instant.now().toString()\n    ))\n}\n\ndata class DeclineEvent(\n    val declineCode: String,\n    val declineReason: String,\n    val merchantAdvice: String?,\n    val timestamp: String\n)\n\nprivate fun enableAlternativePaymentMethods() {\n    // Show alternative payment options\n    Log.d(\"Payment\", \"Enabling alternative payment methods\")\n}\n\nprivate fun trackDeclineEvent(event: DeclineEvent) {\n    // Track decline for fraud prevention and analytics\n    Log.d(\"Analytics\", \"Decline event: $event\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-handling","__idx":25},"children":["Error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For both callbacks, implement comprehensive error handling to ensure a smooth user experience:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"onSubmitError = { error ->\n    Log.e(\"Payment\", \"Submit error: ${error.message}\")\n    \n    when (error.errorCode) {\n        \"NETWORK_ERROR\" -> {\n            showError(\"Network connection issue. Please check your internet and try again.\")\n        }\n        \"VALIDATION_FAILED\" -> {\n            showError(\"Please check all required fields are completed correctly.\")\n        }\n        \"CARD_EXPIRED\" -> {\n            showError(\"Your card has expired. Please use a different card.\")\n        }\n        \"INSUFFICIENT_FUNDS\" -> {\n            showError(\"Insufficient funds. Please try a different card.\")\n        }\n        else -> {\n            showError(\"Payment failed. Please try again or use a different payment method.\")\n        }\n    }\n}\n","lang":"kotlin"},"children":[]}]},"headings":[{"value":"Non-3DS transactions","id":"non-3ds-transactions","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Payment flow","id":"payment-flow","depth":2},{"value":"Step 1: Submission","id":"step-1-submission","depth":3},{"value":"Step 2: Card tokenisation","id":"step-2-card-tokenisation","depth":3},{"value":"Step 3: Evaluation","id":"step-3-evaluation","depth":3},{"value":"Step 4: Authorisation","id":"step-4-authorisation","depth":3},{"value":"Step 5: Capture","id":"step-5-capture","depth":3},{"value":"Step 6: Completion","id":"step-6-completion","depth":3},{"value":"Non-3DS callback details","id":"non-3ds-callback-details","depth":2},{"value":"Core callbacks","id":"core-callbacks","depth":3},{"value":"Additional callbacks","id":"additional-callbacks","depth":3},{"value":"SDK configuration","id":"sdk-configuration","depth":2},{"value":"Step 1: Create components","id":"step-1-create-components","depth":3},{"value":"Step 2: Handle common scenarios","id":"step-2-handle-common-scenarios","depth":3},{"value":"Low-value transactions","id":"low-value-transactions","depth":4},{"value":"Trusted customer transactions","id":"trusted-customer-transactions","depth":4},{"value":"Step 3: Handle errors","id":"step-3-handle-errors","depth":3},{"value":"Complete example","id":"complete-example","depth":2},{"value":"Callback data","id":"callback-data","depth":2},{"value":"onPreAuthorisation","id":"onpreauthorisation","depth":3},{"value":"Pre-authorisation data","id":"pre-authorisation-data","depth":4},{"value":"onPostAuthorisation","id":"onpostauthorisation","depth":3},{"value":"Success","id":"success","depth":4},{"value":"Failure (Declined)","id":"failure-declined","depth":4},{"value":"Error handling","id":"error-handling","depth":3}],"frontmatter":{"seo":{"title":"Non-3DS transactions"}},"lastModified":"2026-06-12T11:56:36.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/card/non-3ds","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}