{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition"]},"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 modes, checkout flows, and error scenarios. 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 UAT environment before deploying to production. Use test credentials and the Paze UAT SDK 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":"typescript","header":{"controls":{"copy":{}}},"source":"import { PxpCheckout, IntentType } from '@pxpio/web-components-sdk';\n\nconst pxpSdk = PxpCheckout.initialize({\n  environment: 'test', // Use 'test' for UAT\n  session: sessionData, // From your backend\n  ownerId: 'your-owner-id',\n  ownerType: 'MerchantGroup',\n  clientName: 'Your Merchant',\n  siteName: 'Your Store',\n  kountDisabled: true, // Disable Kount during initial testing\n  transactionData: {\n    currency: 'USD',\n    amount: 10.00,\n    merchantTransactionId: crypto.randomUUID(),\n    merchantTransactionDate: () => new Date().toISOString(),\n    entryType: 'Ecom',\n    intent: {\n      card: IntentType.Authorisation\n    }\n  },\n  onGetShopper: () => Promise.resolve({\n    id: 'test-shopper-1',\n    email: 'test@example.com',\n    firstName: 'Test',\n    lastName: 'Shopper'\n  })\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-options","__idx":4},"children":["Environment options"]},{"$$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":"Paze SDK URL"},"children":["Paze SDK URL"]},{"$$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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout.wallet.uat.earlywarning.io"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Development and UAT testing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["live"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout.paze.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production payments"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Never use production Paze credentials in development. UAT and live environments use separate client IDs and SDK endpoints."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"paze-uat-wallets-and-eligibility","__idx":5},"children":["Paze UAT wallets and eligibility"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dynamic presentment (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buttonRenderMode: \"dynamic\""]},") calls Paze ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canCheckout()"]}," with the shopper's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["emailAddress"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]},". The button stays hidden when Paze reports no eligible wallet (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved(false)"]},")."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To test dynamic mode 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 the UAT Paze SDK URL (loaded automatically when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test"]},")."]},{"$$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. Paze provides eligible test identities during merchant onboarding — 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":["Match identity at checkout:"]}," If both email and phone are set, only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phoneNumber"]}," is sent to Paze ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout()"]},". Use the same phone number Paze registered for the test wallet."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Start with static mode:"]}," Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buttonRenderMode: 'static'"]}," while validating session, decrypt, and transaction flows before testing eligibility gating."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Static mode does not call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canCheckout()"]},". It shows the button after successful SDK initialisation, which is useful for testing checkout and payment flows before you have UAT-eligible shopper identities."]}]},{"$$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":"typescript","header":{"controls":{"copy":{}}},"source":"const TEST_CONFIG = {\n  environment: 'test' as const,\n  emailAddress: 'test.shopper@example.com',\n  phoneNumber: '15551234567',\n  amount: 10.00,\n  currency: 'USD'\n};\n\nconst pazeButton = pxpSdk.create('paze-button', {\n  buttonRenderMode: 'static',\n  emailAddress: TEST_CONFIG.emailAddress,\n  phoneNumber: TEST_CONFIG.phoneNumber,\n  style: {\n    color: 'pazeblue',\n    shape: 'pill',\n    label: 'check out with'\n  },\n\n  onInit: () => console.log('TEST: Paze initialised'),\n  onPresentmentResolved: (isVisible) => console.log('TEST: Button visible:', isVisible),\n  onPazeButtonClicked: () => console.log('TEST: Button clicked'),\n  onCheckoutComplete: async (result) => {\n    console.log('TEST: Checkout complete:', result);\n    return true; // Approve to continue\n  },\n  onComplete: async (result) => {\n    // Fires after Paze complete() decodes the response, before decryption\n    console.log('TEST: Complete result:', result.completeDecodedResponse?.payloadId);\n  },\n  onPostDecryption: async (payload) => {\n    console.log('TEST: Decrypted token:', payload.fundingData?.cardNetwork);\n  },\n  onPostAuthorisation: async (data) => {\n    console.log('TEST: Authorisation result:', data.systemTransactionId);\n  },\n  onError: (error) => {\n    console.error('TEST: Error:', error.ErrorCode, error.message);\n  }\n});\n\npazeButton.mount('paze-button-container');\n","lang":"typescript"},"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":"Heading","attributes":{"level":4,"id":"static-presentment","__idx":10},"children":["Static presentment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["static"]}," mode, the button renders after successful initialisation and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved(true)"]}," fires. This does not call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canCheckout()"]}," to verify wallet eligibility:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const pazeButton = pxpSdk.create('paze-button', {\n  buttonRenderMode: 'static',\n  onPresentmentResolved: (isVisible) => {\n    console.log('Static presentment resolved:', isVisible);\n    // true after successful init and render; not called when initialisation fails (check onError)\n  }\n});\n\npazeButton.mount('paze-button-container');\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"dynamic-presentment","__idx":11},"children":["Dynamic presentment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dynamic"]}," mode, the SDK calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canCheckout()"]}," and hides the button when the shopper has no eligible Paze wallet:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const pazeButton = pxpSdk.create('paze-button', {\n  buttonRenderMode: 'dynamic',\n  emailAddress: 'eligible.shopper@example.com',\n  phoneNumber: '15551234567',\n  onPresentmentResolved: (isVisible) => {\n    console.log('Dynamic presentment result:', isVisible);\n    // isVisible is false when canCheckout() reports no eligible wallet\n  }\n});\n\npazeButton.mount('paze-button-container');\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout-flow-testing","__idx":12},"children":["Checkout flow testing"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"approve-checkout","__idx":13},"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 through ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["complete()"]},", decryption, and authorisation:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onCheckoutComplete: async (result) => {\n  console.log('Checkout data:', {\n    sessionId: result.checkoutDecodedResponse?.sessionId,\n    consumerEmail: result.checkoutDecodedResponse?.consumer?.emailAddress,\n    cardNetwork: result.checkoutDecodedResponse?.maskedCard?.paymentCardNetwork,\n    panLastFour: result.checkoutDecodedResponse?.maskedCard?.panLastFour\n  });\n  return true;\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"reject-checkout","__idx":14},"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":"typescript","header":{"controls":{"copy":{}}},"source":"onCheckoutComplete: async (result) => {\n  console.log('Rejecting checkout for testing');\n  return false;\n},\nonCheckoutIncomplete: async (result) => {\n  console.log('Expected incomplete result:', result.reason);\n  // Merchant rejection: \"Merchant validation rejected completion.\"\n}\n","lang":"typescript"},"children":[]},{"$$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":"typescript","header":{"controls":{"copy":{}}},"source":"onPreDecryption: async () => {\n  console.log('SDK will decrypt automatically');\n  return true; // or omit callback entirely\n},\nonPostDecryption: async (payload) => {\n  console.log('Decrypted network token present:', !!payload.fundingData?.networkToken);\n  console.log('Card network:', payload.fundingData?.cardNetwork);\n}\n","lang":"typescript"},"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 — see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/web/paze/implementation#backend-decryption"},"children":["Backend decryption"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"onPreDecryption: async () => false,\nonComplete: async (result) => {\n  const securedPayload = result.completeDecodedResponse?.securedPayload;\n  console.log('Secured payload received:', !!securedPayload);\n\n  // Send to your test backend\n  const response = await fetch('/api/paze/decrypt', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({ securedPayload })\n  });\n  console.log('Backend decryption result:', await response.json());\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-scenario-testing","__idx":18},"children":["Error scenario testing"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Mount or initialise components to trigger validation errors and confirm the expected SDK error codes:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"// Test invalid currency (fails when the component initialises)\nconst invalidSdk = PxpCheckout.initialize({\n  ...config,\n  transactionData: { ...config.transactionData, currency: 'GBP' }\n});\nconst invalidCurrencyButton = invalidSdk.create('paze-button', { buttonRenderMode: 'static' });\ninvalidCurrencyButton.mount('paze-button-container');\n// Expected: SDK1213 via onError\n\n// Test missing identity for dynamic mode\nconst dynamicButton = pxpSdk.create('paze-button', {\n  buttonRenderMode: 'dynamic',\n  emailAddress: 'test@example.com'\n  // Missing phoneNumber — expected: SDK1208 on mount\n});\ndynamicButton.mount('paze-button-container');\n\n// Test invalid phone format\nconst invalidPhone = pxpSdk.create('paze-button', {\n  buttonRenderMode: 'static',\n  phoneNumber: '+15551234567' // Expected: SDK1212 on mount\n});\ninvalidPhone.mount('paze-button-container');\n","lang":"typescript"},"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":["Wrap component callbacks to trace the payment flow during manual or automated testing:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const callbacks = [\n  'onInit', 'onPresentmentResolved', 'onCustomValidation', 'onPazeButtonClicked',\n  'onCheckoutComplete', 'onCheckoutIncomplete', 'onComplete',\n  'onPreDecryption', 'onPostDecryption',\n  'onPreAuthorisation', 'onPostAuthorisation', 'onSubmitError', 'onError'\n];\n\nconst logConfig = Object.fromEntries(\n  callbacks.map(name => [name, (...args: unknown[]) => {\n    console.log(`[Paze] ${name}:`, ...args);\n  }])\n);\n\nconst pazeButton = pxpSdk.create('paze-button', {\n  ...logConfig,\n  onCheckoutComplete: async (result) => {\n    console.log('[Paze] onCheckoutComplete:', result);\n    return true;\n  }\n});\n\npazeButton.mount('paze-button-container');\n","lang":"typescript"},"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":["PxpCheckout.initialize()"]}," to verify the payment funnel. For the full event list, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/web/paze/analytics"},"children":["Analytics"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"const pxpSdk = PxpCheckout.initialize({\n  ...config,\n  analyticsEvent: (event) => {\n    console.log('Analytics:', event.eventName, event);\n  }\n});\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Key events to verify during testing:"]},{"$$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":{"align":"left","data-label":"Event"},"children":["Event"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","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":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeButtonRendered"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The Paze button became visible"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeButtonClicked"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The shopper clicked the button"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazePopupLaunched"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The Paze checkout popup opened"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeCheckoutCompleted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Checkout returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["COMPLETE"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeCheckoutAbandoned"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Checkout incomplete, popup closed, or merchant rejected checkout"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeDecryptionInitiated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["SDK decryption started"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeDecryptionCompleted"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["SDK decryption succeeded"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeDecryptionFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["SDK decryption failed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeTransactionInitiated"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Transaction submission to PXP started (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType: 'PazeButton'"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PreAuthorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," is configured and the flow proceeds (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType: 'Paze'"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PostAuthorisation"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is configured and submission succeeds (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["componentType: 'Paze'"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PazeAuthorisationFailed"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Transaction submission failed"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Wallet visibility is not an analytics event. Track it with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved"]}," instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-diagnostics","__idx":22},"children":["Environment diagnostics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run these checks in the browser console when the button does not appear:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"function diagnosePaze() {\n  const config = pxpSdk.getConfig();\n  const session = config.session;\n\n  console.group('Paze Diagnostics');\n  console.log('Environment:', config.environment);\n  console.log('Currency:', config.transactionData.currency);\n  console.log('Amount:', config.transactionData.amount);\n  console.log('Client ID:', session.allowedFundingTypes?.wallets?.paze?.clientId ? 'Present' : 'Missing');\n  console.log('HTTPS:', location.protocol === 'https:' || location.hostname === 'localhost');\n  console.log('Paze SDK loaded:', !!window.DIGITAL_WALLET_SDK);\n  console.groupEnd();\n}\n","lang":"typescript"},"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:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration","__idx":24},"children":["Configuration"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Session includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets.paze.clientId"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Currency is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USD"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Amount is greater than 0"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," returns valid shopper data"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," HTTPS is enabled (or localhost for development)"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"presentment","__idx":25},"children":["Presentment"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Static mode renders the button after successful initialisation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Dynamic mode shows the button for eligible shoppers"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Dynamic mode hides the button when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["canCheckout()"]}," reports no wallet"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPresentmentResolved"]}," fires with the expected visibility"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checkout","__idx":26},"children":["Checkout"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Button click opens the Paze checkout popup"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Successful checkout triggers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutComplete"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Returning ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutComplete"]}," triggers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Merchant validation rejected completion.\""]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Shopper closing the popup triggers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCheckoutIncomplete"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"decryption-and-authorisation","__idx":27},"children":["Decryption and authorisation"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," SDK-managed decryption returns token data in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostDecryption"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Manual decryption receives ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["securedPayload"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onComplete"]}," (before ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreDecryption"]}," runs)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," returning ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," cancels authorisation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is configured and fires for successful HTTP responses (including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Declined"]}," states)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," HTTP submission failures fire ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"error-handling","__idx":28},"children":["Error handling"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Invalid configuration surfaces errors via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Network errors are handled gracefully"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Session expiry is handled with user guidance"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pre-launch-checklist","__idx":29},"children":["Pre-launch checklist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before going live with Paze, ensure your implementation meets these requirements:"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"technical-setup","__idx":30},"children":["Technical setup"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," HTTPS enabled on all checkout pages (localhost exempt for development)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Paze client ID configured in Unity Portal for the correct site."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["environment: 'live'"]}," with production Paze credentials."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Transaction currency set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USD"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Tested on Chrome, Safari, Firefox, and Edge."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Comprehensive error handling for all payment scenarios."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"button-and-branding","__idx":31},"children":["Button and branding"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Uses official ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<paze-button>"]}," element with approved style values."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Paze button has equal prominence with other payment methods."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Button renders correctly on desktop and mobile viewports."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Dynamic presentment hides the button when shopper is ineligible."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"security","__idx":32},"children":["Security"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Valid SSL certificate from a recognised authority."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," No storage of sensitive payment data in browser storage."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Backend verification of all successful transactions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," HMAC credentials stored securely on the server only."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Privacy policy covers payment and identity data usage."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"user-experience","__idx":33},"children":["User experience"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Clear error messages when Paze is unavailable."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Graceful fallback to other payment methods."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Loading indicators during checkout and processing."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Session refresh handling for expired sessions."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"go-live-testing","__idx":34},"children":["Go-live testing"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," End-to-end payment testing in UAT environment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Tested static and dynamic presentment modes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Tested checkout approval and rejection flows."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Tested SDK-managed and manual decryption paths."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"input","attributes":{"checked":false,"type":"checkbox","readOnly":true},"children":[]}," Tested transaction failure and retry scenarios."]}]}]},"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 and eligibility","id":"paze-uat-wallets-and-eligibility","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":"Static presentment","id":"static-presentment","depth":4},{"value":"Dynamic presentment","id":"dynamic-presentment","depth":4},{"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":"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},{"value":"Configuration","id":"configuration","depth":3},{"value":"Presentment","id":"presentment","depth":3},{"value":"Checkout","id":"checkout","depth":3},{"value":"Decryption and authorisation","id":"decryption-and-authorisation","depth":3},{"value":"Error handling","id":"error-handling","depth":3},{"value":"Pre-launch checklist","id":"pre-launch-checklist","depth":2},{"value":"Technical setup","id":"technical-setup","depth":3},{"value":"Button and branding","id":"button-and-branding","depth":3},{"value":"Security","id":"security","depth":3},{"value":"User experience","id":"user-experience","depth":3},{"value":"Go-live testing","id":"go-live-testing","depth":3}],"frontmatter":{"seo":{"title":"Testing"}},"lastModified":"2026-06-22T14:49:35.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/web/paze/testing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}