{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition","br","details"]},"type":"markdown"},"seo":{"title":"Testing","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":"testing","__idx":0},"children":["Testing"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn how to test your Paze integration effectively before going live."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Thorough testing is essential to ensure your Paze integration works correctly across presentment, checkout, decryption, and error scenarios on Android. This guide covers test environments, configuration, test scenarios, and debugging techniques."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Always test your integration in the sandbox environment before deploying to production. Use test credentials and Paze UAT wallets to avoid processing real payments during development."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-environments","__idx":2},"children":["Test environments"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"development-environment","__idx":3},"children":["Development environment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initialise the SDK with test environment settings, USD transaction data, and a test shopper callback:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val sessionData = SessionConfig(\n    sessionId = session.sessionId,\n    hmacKey = session.hmacKey,\n    data = session.data,\n    encryptionKey = session.encryptionKey,\n    locale = \"en-US\",\n    allowedFundingTypes = AllowedFundingTypes(\n        wallets = WalletsConfig(\n            paze = PazeWalletConfig(\n                clientId = session.pazeClientId,\n                profileId = session.pazeProfileId,\n                merchantCategoryCode = session.merchantCategoryCode,\n            ),\n        ),\n    ),\n)\n\nval sdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = sessionData,\n    transactionData = TransactionData(\n        amount = 10.00,\n        currency = \"USD\",\n        merchant = \"MERCHANT-1\",\n        intent = TransactionIntentData(card = CardIntentType.Authorisation),\n        merchantTransactionId = \"test-${UUID.randomUUID()}\",\n        merchantTransactionDate = { Instant.now().toString() },\n        entryType = EntryType.Ecom,\n    ),\n    clientName = \"Test Merchant\",\n    siteName = \"Test Store\",\n    ownerType = \"MerchantGroup\",\n    ownerId = \"MERCHANT-1\",\n    kountDisabled = true,\n    onGetShopper = {\n        Shopper(\n            id = \"test-shopper-1\",\n            email = \"test@example.com\",\n            firstName = \"Test\",\n            lastName = \"Shopper\",\n        )\n    },\n)\n\nval checkout = PxpCheckout.builder()\n    .withConfig(sdkConfig)\n    .withContext(context)\n    .build()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-options","__idx":4},"children":["Environment options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.TEST"]}," for UAT and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.LIVE"]}," for production:"]},{"$$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":"SDK setting"},"children":["SDK setting"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Test"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.TEST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Development and UAT testing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.LIVE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Live payments"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Never use production Paze credentials in development. Test and production environments use separate client IDs and API endpoints."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"paze-uat-wallets","__idx":5},"children":["Paze UAT wallets"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To test checkout in UAT:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use UAT credentials end-to-end:"]}," Portal Paze client ID on your site, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.TEST"]}," in the SDK, and sessions created against the UAT API (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api-services.dev.pxp.io"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Register test shoppers with Paze:"]}," Use email and phone combinations that Paze has provisioned for your UAT merchant account. Contact your Paze integration contact if you do not have UAT shopper credentials."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Install Chrome:"]}," Custom Tab checkout requires a Custom Tabs–compatible browser. Chrome is recommended for UAT testing."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Test on a physical device:"]}," Redirect handling and Custom Tab behaviour are most reliable on device."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The button appears after presentment validation succeeds when you render ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]},". Optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emailAddress"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]}," are validated when provided and forwarded to create-session when set."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-configuration","__idx":6},"children":["Test configuration"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"basic-test-setup","__idx":7},"children":["Basic test setup"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a Paze button with logging callbacks on each stage of the payment flow:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = PazeButtonComponentConfig().apply {\n    emailAddress = \"test.shopper@example.com\"\n    phoneNumber = \"15551234567\"\n    style = PazeButtonStyleConfig(\n        color = PazeButtonColor.PAZE_BLUE,\n        shape = PazeButtonShape.PILL,\n        label = PazeButtonLabel.CHECKOUT_WITH,\n    )\n\n    onInit = { Log.d(\"TEST\", \"Paze initialised\") }\n    onPresentmentResolved = { customTabAvailable -> Log.d(\"TEST\", \"Custom Tab available: $customTabAvailable\") }\n    onPazeButtonClicked = { Log.d(\"TEST\", \"Button clicked\") }\n\n    onCheckoutComplete = { result ->\n        Log.d(\"TEST\", \"Checkout complete: $result\")\n        true\n    }\n\n    onComplete = { result ->\n        Log.d(\"TEST\", \"Complete payload ID: ${result.completeDecodedResponse?.payloadId}\")\n    }\n\n    onPostDecryption = { payload ->\n        Log.d(\"TEST\", \"Card network: ${payload.fundingData.cardNetwork}\")\n    }\n\n    onPostAuthorisation = { result ->\n        Log.d(\"TEST\", \"Authorisation: ${result.systemTransactionId}\")\n    }\n\n    onError = { error ->\n        Log.e(\"TEST\", \"Error: ${error.errorCode} ${error.message}\")\n    }\n}\n\nval pazeButton = checkout.createComponent<PazeButtonComponent>(ComponentType.PAZE_BUTTON, config)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Render the component in your test screen. Presentment runs when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]}," is composed:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"pazeButton.Content(modifier = Modifier.fillMaxWidth())\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ensure your host Activity forwards checkout redirects to the component:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paze.payment.deliverPazeCheckoutResult\n\noverride fun onNewIntent(intent: Intent) {\n    super.onNewIntent(intent)\n    setIntent(intent)\n    intent.deliverPazeCheckoutResult(pazeButton)\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-scenarios","__idx":8},"children":["Test scenarios"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"presentment-testing","__idx":9},"children":["Presentment testing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After presentment validation succeeds, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onInit"]}," fires, the button is shown, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved"]}," reports Custom Tab availability. Presentment runs when you render ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log presentment resolution during manual testing:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.onPresentmentResolved = { customTabAvailable ->\n    Log.d(\"TEST\", \"Presentment resolved: customTabAvailable=$customTabAvailable\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test presentment failure by initialising with a non-USD currency:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// transactionData.currency = \"GBP\"\n// Expected: SDK1213 via onError; button hidden\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test invalid identity:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.emailAddress = \"not-an-email\"\n// Expected: SDK1210 via onError at presentment\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout-flow-testing","__idx":10},"children":["Checkout flow testing"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"approve-checkout","__idx":11},"children":["Approve checkout"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutComplete"]}," to exercise the full happy path:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.onCheckoutComplete = { result ->\n    Log.d(\"TEST\", \"Session: ${result.checkoutDecodedResponse?.sessionId}\")\n    Log.d(\"TEST\", \"Card brand: ${result.checkoutDecodedResponse?.maskedCard?.paymentCardBrand}\")\n    true\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"reject-checkout","__idx":12},"children":["Reject checkout"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutComplete"]}," to confirm the SDK treats checkout as incomplete:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.onCheckoutComplete = { _ -> false }\n\nconfig.onCheckoutIncomplete = { result ->\n    Log.d(\"TEST\", \"Expected incomplete: ${result.reason}\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"block-before-custom-tab","__idx":13},"children":["Block before Custom Tab"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Disable the button in your UI until prerequisites are met. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPazeButtonClicked"]}," cannot cancel checkout — use it only for logging or other non-blocking side effects."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"user-cancellation","__idx":14},"children":["User cancellation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Close the Custom Tab without completing checkout. Expect ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}," with a cancellation reason."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Closing the Custom Tab without a redirect (for example, using the back gesture) also triggers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}," when the host Activity resumes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"decryption-testing","__idx":15},"children":["Decryption testing"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"sdk-managed-decryption","__idx":16},"children":["SDK-managed decryption"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreDecryption"]}," (or omit the callback) to test the default SDK decryption path:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.onPreDecryption = { true }\n\nconfig.onPostDecryption = { payload ->\n    Log.d(\"TEST\", \"Network token present: ${payload.fundingData.networkToken.isNotEmpty()}\")\n    Log.d(\"TEST\", \"Card network: ${payload.fundingData.cardNetwork}\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"manual-decryption","__idx":17},"children":["Manual decryption"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreDecryption"]}," and handle ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["securedPayload"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onComplete"]},". Your test backend should call the PXP decrypt-token API. The SDK skips ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostDecryption"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}," on this path. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paze/implementation#backend-decryption"},"children":["Backend decryption"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-scenario-testing","__idx":18},"children":["Error scenario testing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Exercise common validation and configuration failures:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Invalid currency — fails at presentment\n// transactionData.currency = \"GBP\" → SDK1213\n\n// Invalid phone format (contains +)\nconfig.phoneNumber = \"+15551234567\"\n// Expected: SDK1212 at presentment or checkout\n\n// Missing clientId in session\n// Omit paze.clientId from session → SDK1202 at presentment\n\n// Missing merchantCategoryCode in session\n// Omit merchantCategoryCode → SDK1202A at complete\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"debugging-tools","__idx":19},"children":["Debugging tools"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"callback-logging","__idx":20},"children":["Callback logging"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log each callback during manual testing:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"config.onInit = { Log.d(\"Paze\", \"onInit\") }\nconfig.onPresentmentResolved = { Log.d(\"Paze\", \"onPresentmentResolved: $it\") }\nconfig.onPazeButtonClicked = { Log.d(\"Paze\", \"onPazeButtonClicked\") }\nconfig.onCheckoutComplete = { Log.d(\"Paze\", \"onCheckoutComplete: $it\"); true }\nconfig.onCheckoutIncomplete = { Log.d(\"Paze\", \"onCheckoutIncomplete: ${it.reason}\") }\nconfig.onComplete = { Log.d(\"Paze\", \"onComplete\") }\nconfig.onPreDecryption = { Log.d(\"Paze\", \"onPreDecryption\"); true }\nconfig.onPostDecryption = { Log.d(\"Paze\", \"onPostDecryption\") }\nconfig.onPreAuthorisation = { Log.d(\"Paze\", \"onPreAuthorisation\"); PazePreAuthorisationResult.Proceed }\nconfig.onPostAuthorisation = { Log.d(\"Paze\", \"onPostAuthorisation: ${it.systemTransactionId}\") }\nconfig.onSubmitError = { Log.d(\"Paze\", \"onSubmitError: $it\") }\nconfig.onError = { Log.e(\"Paze\", \"onError: ${it.errorCode} ${it.message}\") }\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"analytics-event-tracking","__idx":21},"children":["Analytics event tracking"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Log analytics events from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]},". See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paze/analytics"},"children":["Analytics"]}," for the full ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Paze*"]}," event set:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.analytics.PazeAnalyticsEvent\nimport com.pxp.checkout.analytics.ComponentLifecycleAnalyticsEvent\n\nanalyticsEvent = { event ->\n    Log.d(\"Paze\", \"Analytics: ${event.eventName}\")\n    when (event) {\n        is PazeAnalyticsEvent -> {\n            Log.d(\"Paze\", \"  componentId=${event.componentId} merchantTransactionId=${event.merchantTransactionId}\")\n        }\n        is ComponentLifecycleAnalyticsEvent -> {\n            Log.d(\"Paze\", \"  lifecycle=${event.eventType} componentId=${event.componentId}\")\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Track these events and callbacks during a full payment test:"]},{"$$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":"Event/callback"},"children":["Event/callback"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When it fires"},"children":["When it fires"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentLifecycleAnalyticsEvent"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(MOUNT)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Presentment validation succeeded (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]}," composed). Event name is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ComponentLifecycleEvent"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeButtonRendered"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Presentment succeeded."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom Tab availability resolved."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPazeButtonClicked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["After checkout validation, before the Custom Tab opens."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeButtonClicked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Immediately after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPazeButtonClicked"]},", before the Custom Tab opens."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutComplete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Checkout returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COMPLETE"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Checkout incomplete, cancelled, tab closed without redirect, or merchant rejected."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeCheckoutCompleted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Merchant approved checkout."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostDecryption"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK decryption succeeded."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK received ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["MerchantSubmitResult"]}," (when the callback is registered). Verify the outcome on your backend."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-diagnostics","__idx":22},"children":["Environment diagnostics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run these checks when checkout fails to return to your app:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paze.payment.CustomTabLauncher\n\nfun diagnosePaze(sdkConfig: PxpSdkConfig, config: PazeButtonComponentConfig, context: Context) {\n    Log.d(\"Paze\", \"=== Diagnostics ===\")\n    Log.d(\"Paze\", \"Environment: ${sdkConfig.environment}\")\n    Log.d(\"Paze\", \"Currency: ${sdkConfig.transactionData.currency}\")\n    Log.d(\"Paze\", \"Amount: ${sdkConfig.transactionData.amount}\")\n    Log.d(\"Paze\", \"Client ID: ${sdkConfig.session.allowedFundingTypes?.wallets?.paze?.clientId?.isNotBlank()}\")\n    Log.d(\"Paze\", \"MCC: ${sdkConfig.session.allowedFundingTypes?.wallets?.paze?.merchantCategoryCode ?: \"not set\"}\")\n    Log.d(\"Paze\", \"Email: ${config.emailAddress ?: \"not set\"}\")\n    Log.d(\"Paze\", \"Phone: ${config.phoneNumber ?: \"not set\"}\")\n    Log.d(\"Paze\", \"Custom Tab: ${CustomTabLauncher.canLaunchCustomTab(context)}\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-checklist","__idx":23},"children":["Test checklist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before going live, verify each scenario in UAT:"]},{"$$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":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Expected outcome"},"children":["Expected outcome"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Portal Paze client ID saved"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Session includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets.paze.clientId"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MCC in session"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantCategoryCode"]}," present; missing value throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1202A"]}," at complete."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["USD transaction"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Presentment succeeds; non-USD throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1213"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Static presentment"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Button renders after validation when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]}," is composed; email/phone optional."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom Tab checkout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Paze wallet opens; shopper can complete or cancel."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Redirect handling"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onNewIntent"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deliverPazeCheckoutResult"]}," processes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pxpcheckout://callback"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pxpcheckout://paze"]}," redirects."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approve checkout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Full SDK-managed flow through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostDecryption"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," (when registered)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reject checkout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}," fires."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pre-checkout block"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Button disabled in UI until prerequisites are met (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPazeButtonClicked"]}," cannot cancel checkout)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK decryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostDecryption"]}," receives token data."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Manual decryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["securedPayload"]}," forwarded to backend; your backend completes decryption and authorisation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authorisation failure"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FailedSubmitResult"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Backend verification"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Order fulfilled only after server-side transaction check."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Live credentials"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.LIVE"]}," with production portal settings."]}]}]}]}]}]},"headings":[{"value":"Testing","id":"testing","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Test environments","id":"test-environments","depth":2},{"value":"Development environment","id":"development-environment","depth":3},{"value":"Environment options","id":"environment-options","depth":3},{"value":"Paze UAT wallets","id":"paze-uat-wallets","depth":2},{"value":"Test configuration","id":"test-configuration","depth":2},{"value":"Basic test setup","id":"basic-test-setup","depth":3},{"value":"Test scenarios","id":"test-scenarios","depth":2},{"value":"Presentment testing","id":"presentment-testing","depth":3},{"value":"Checkout flow testing","id":"checkout-flow-testing","depth":3},{"value":"Approve checkout","id":"approve-checkout","depth":4},{"value":"Reject checkout","id":"reject-checkout","depth":4},{"value":"Block before Custom Tab","id":"block-before-custom-tab","depth":4},{"value":"User cancellation","id":"user-cancellation","depth":4},{"value":"Decryption testing","id":"decryption-testing","depth":3},{"value":"SDK-managed decryption","id":"sdk-managed-decryption","depth":4},{"value":"Manual decryption","id":"manual-decryption","depth":4},{"value":"Error scenario testing","id":"error-scenario-testing","depth":3},{"value":"Debugging tools","id":"debugging-tools","depth":2},{"value":"Callback logging","id":"callback-logging","depth":3},{"value":"Analytics event tracking","id":"analytics-event-tracking","depth":3},{"value":"Environment diagnostics","id":"environment-diagnostics","depth":3},{"value":"Test checklist","id":"test-checklist","depth":2}],"frontmatter":{"seo":{"title":"Testing"}},"lastModified":"2026-07-01T14:12:29.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/paze/testing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}