{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading"]},"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":["Test your payout integration end-to-end before going live."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-start","__idx":1},"children":["Before you start"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Complete ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/onboarding"},"children":["PayPal payouts onboarding"]}," for sandbox."]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Implement the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/withdrawal-flow"},"children":["withdrawal flow"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/how-it-works"},"children":["How it works"]}," so you understand flows and payout modes."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-configure-sandbox-environment","__idx":2},"children":["Step 1: Configure sandbox environment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TEST"]}," environment and sandbox credentials for both SDK and backend."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.PxpCheckout\nimport com.pxp.checkout.models.*\nimport java.util.UUID\n\nval pxpCheckout = PxpCheckout.builder()\n    .withConfig(\n        PxpSdkConfig(\n            environment = Environment.TEST,  // Use test environment\n            session = sessionData,\n            ownerId = \"Unity\",\n            ownerType = \"MerchantGroup\",\n            clientId = \"your-client-id\",\n            transactionData = TransactionData(\n                amount = 100.0,\n                currency = \"USD\",\n                merchant = \"your-merchant-id\",\n                entryType = EntryType.Ecom,\n                intent = TransactionIntentData(paypal = IntentType.Payout),\n                merchantTransactionId = UUID.randomUUID().toString(),\n                merchantTransactionDate = { System.currentTimeMillis() }\n            ),\n            paypalConfig = PaypalConfig(\n                payout = PayoutConfig(\n                    proceedPayoutWithSdk = true\n                    // Add paypalWallet for withdrawal flow tests\n                )\n            )\n        )\n    )\n    .withContext(context)\n    .build()\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-test-core-happy-paths","__idx":3},"children":["Step 2: Test core happy paths"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Focus first on the main customer journeys."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"withdrawal-flow-returning-customers","__idx":4},"children":["Withdrawal flow (returning customers)"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Initialise the SDK with a stored PayPal wallet (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalWallet.email"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payerId"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Render ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayoutAmountComponent"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaypalPayoutReceiverComponent"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayoutSubmissionComponent"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Amount and receiver are correctly displayed (including masking behaviour)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tapping ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Withdraw with PayPal"]}," triggers ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Successful approval results in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostPayout"]}," being called and the sandbox recipient balance increasing."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sdk-initiated-vs-merchant-initiated","__idx":5},"children":["SDK-initiated vs merchant-initiated"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proceedPayoutWithSdk = true"]},", confirm the SDK executes the payout after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]}," approves and calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostPayout"]}," with a transaction ID."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["With ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proceedPayoutWithSdk = false"]},", confirm:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SDK validates inputs and calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your backend receives the necessary data and successfully calls the payout API."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"minimal-test-checklist","__idx":6},"children":["Minimal test checklist"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this as a lightweight \"must-have\" list before going live:"]},{"$$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":"Area"},"children":["Area"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What to verify"},"children":["What to verify"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Withdrawal flow"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Returning customer payout"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Stored PayPal wallet is shown (including masking), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostPayout"]}," fire, and sandbox balance increases."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validation & errors"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Invalid amount / email"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," receives the right error code, and the UI shows clear, user-friendly messages."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integration"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK- vs merchant-initiated payouts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proceedPayoutWithSdk"]}," modes behave as expected, and backend payout execution works when SDK is not executing the payout."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-test-validation-and-error-handling","__idx":7},"children":["Step 3: Test validation and error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use targeted negative tests rather than exhaustively covering every error code."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Amounts:"]}," Negative or zero amount → expect amount validation error (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/data-validation"},"children":["Data validation"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["PayPal receiver:"]}," Invalid email format or missing payer ID → expect PayPal receiver errors (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PO04"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuration:"]}," Missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["recipientWallet"]}," or wallet details → expect payout configuration errors."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In each case, verify that:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," is called with the appropriate error code and message."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your UI maps technical errors to clear, user-friendly messages."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val submitConfig = PayoutSubmissionComponentConfig(\n    recipientWallet = \"Paypal\",\n    onError = { error ->\n        Log.e(\"Payout\", \"Error: ${error.errorCode} - ${error.errorReason}\")\n        \n        // Map to user-friendly messages\n        val message = when (error.errorCode) {\n            \"PO02\" -> \"Amount must be greater than zero\"\n            \"PO03\" -> \"Invalid currency code\"\n            \"PO04\" -> \"Invalid PayPal account details\"\n            \"PO07\" -> \"Invalid transaction date\"\n            else -> \"An error occurred. Please try again.\"\n        }\n        \n        showError(message)\n    }\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4-test-ui-and-events","__idx":8},"children":["Step 4: Test UI and events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify that core components render and behave as expected:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayoutAmountComponent"]},": correct amount, currency, and custom label/styling."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PaypalPayoutReceiverComponent"]},": masking toggle, labels, and styles."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayoutSubmissionComponent"]},":",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Button states (default, loading, disabled)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Event callbacks: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onClick"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostPayout"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]},"."]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"test-on-multiple-devices","__idx":9},"children":["Test on multiple devices"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Phone (5-6 inch screen)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Phone (6-7 inch screen)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Tablet (10+ inch screen)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Different Android versions (min SDK to latest)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Different screen orientations (portrait and landscape)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For detailed callback payloads, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/events"},"children":["Events"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5-moving-to-production","__idx":10},"children":["Step 5: Moving to production"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once your sandbox tests pass:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Switch environments"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val pxpCheckout = PxpCheckout.builder()\n    .withConfig(\n        PxpSdkConfig(\n            environment = Environment.LIVE,  // Production environment\n            // ... rest of config\n        )\n    )\n    .build()\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Update backend credentials"]}," to use live PayPal and Unity endpoints and secrets."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Run a small live test"]}," (for example, a $1 payout to your own PayPal account) and confirm funds, reporting, and reconciliation."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enable monitoring"]}," (error tracking, alerts on payout failures, webhook monitoring) and roll out gradually if needed."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you hit issues during testing, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/troubleshooting"},"children":["Troubleshooting"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/data-validation"},"children":["Data validation"]}," for common problems and error codes."]}]},"headings":[{"value":"Testing","id":"testing","depth":1},{"value":"Before you start","id":"before-you-start","depth":2},{"value":"Step 1: Configure sandbox environment","id":"step-1-configure-sandbox-environment","depth":2},{"value":"Step 2: Test core happy paths","id":"step-2-test-core-happy-paths","depth":2},{"value":"Withdrawal flow (returning customers)","id":"withdrawal-flow-returning-customers","depth":3},{"value":"SDK-initiated vs merchant-initiated","id":"sdk-initiated-vs-merchant-initiated","depth":3},{"value":"Minimal test checklist","id":"minimal-test-checklist","depth":3},{"value":"Step 3: Test validation and error handling","id":"step-3-test-validation-and-error-handling","depth":2},{"value":"Step 4: Test UI and events","id":"step-4-test-ui-and-events","depth":2},{"value":"Test on multiple devices","id":"test-on-multiple-devices","depth":3},{"value":"Step 5: Moving to production","id":"step-5-moving-to-production","depth":2}],"frontmatter":{"seo":{"title":"Testing"}},"lastModified":"2026-02-26T12:14:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/paypal/payouts/testing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}