{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading"]},"type":"markdown"},"seo":{"title":"Troubleshooting","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":"troubleshooting","__idx":0},"children":["Troubleshooting"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Debug common issues with PayPal payouts in your Android app."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide helps you diagnose and resolve common issues when implementing PayPal payouts in your Android application."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-issues","__idx":2},"children":["Common issues"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sdk-initialisation-errors","__idx":3},"children":["SDK initialisation errors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"issue-sdk-fails-to-initialise","__idx":4},"children":["Issue: SDK fails to initialise"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Symptoms:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Exception thrown during ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpCheckout.builder().build()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["App crashes on initialisation."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Causes:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Missing or invalid session data."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Invalid environment configuration."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Missing required transaction data."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solutions:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"try {\n    val pxpCheckout = PxpCheckout.builder()\n        .withConfig(\n            PxpSdkConfig(\n                environment = Environment.TEST, // Ensure valid environment\n                session = sessionData,          // Verify session data is not null\n                ownerId = \"Unity\",\n                ownerType = \"MerchantGroup\",\n                clientId = \"your-client-id\",\n                transactionData = TransactionData(\n                    amount = 100.0,             // Must be > 0\n                    currency = \"USD\",           // Must be valid ISO code\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                    )\n                )\n            )\n        )\n        .withContext(context)  // Ensure context is valid\n        .build()\n} catch (e: Exception) {\n    Log.e(\"Payout\", \"SDK initialisation failed\", e)\n    showError(\"Failed to initialise payout SDK: ${e.message}\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"component-creation-errors","__idx":5},"children":["Component creation errors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"issue-component-creation-fails","__idx":6},"children":["Issue: Component creation fails"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Symptoms:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Exception when calling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Component not rendering."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Causes:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Incorrect component type."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Invalid configuration."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SDK not properly initialised."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solutions:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Verify component type\nval component = try {\n    pxpCheckout.createComponent(\n        type = ComponentType.PAYOUT_AMOUNT,  // Ensure correct enum value\n        config = PayoutAmountComponentConfig(\n            label = \"Withdrawal Amount\"\n        )\n    )\n} catch (e: Exception) {\n    Log.e(\"Payout\", \"Component creation failed\", e)\n    null\n}\n\nif (component == null) {\n    showError(\"Failed to create payout component\")\n    return\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"payout-submission-errors","__idx":7},"children":["Payout submission errors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"po04-invalid-recipient-information","__idx":8},"children":["PO04: Invalid recipient information"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause:"]}," PayPal wallet email or payer ID not provided or invalid for withdrawal flow."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Ensure both email and payerId are provided\npaypalConfig = PaypalConfig(\n    payout = PayoutConfig(\n        proceedPayoutWithSdk = true,\n        paypalWallet = PayPalPayOutWalletConfig(\n            email = \"customer@example.com\",  // Required\n            payerId = \"PAYER_ID_XXX\"         // Required\n        )\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"po02po03po07-invalid-transaction-data","__idx":9},"children":["PO02/PO03/PO07: Invalid transaction data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Causes:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Amount is invalid (PO02)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Currency is invalid (PO03)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Transaction date is invalid (PO07)."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Validate amount before initialisation\nfun validateAmount(amount: Double?): Boolean {\n    return when {\n        amount == null -> {\n            showError(\"Amount is required\")\n            false\n        }\n        amount <= 0 -> {\n            showError(\"Amount must be greater than zero\")\n            false\n        }\n        amount.isNaN() || amount.isInfinite() -> {\n            showError(\"Amount must be a valid number\")\n            false\n        }\n        else -> true\n    }\n}\n\nif (!validateAmount(payoutAmount)) {\n    return  // Don't proceed with invalid amount\n}\n\ntransactionData = TransactionData(\n    amount = payoutAmount,  // Validated amount\n    // ... other properties\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"network-errors","__idx":10},"children":["Network errors"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"issue-network-timeout-or-connection-error","__idx":11},"children":["Issue: Network timeout or connection error"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Symptoms:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Payout fails with network-related error."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Long delay before error callback."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solutions:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check internet connectivity"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"fun isNetworkAvailable(context: Context): Boolean {\n    val connectivityManager = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager\n    val network = connectivityManager.activeNetwork ?: return false\n    val capabilities = connectivityManager.getNetworkCapabilities(network) ?: return false\n    return capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)\n}\n\n// Check before payout\nif (!isNetworkAvailable(context)) {\n    showError(\"No internet connection. Please check your network and try again.\")\n    return\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Implement retry logic"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"var retryCount = 0\nval MAX_RETRIES = 3\n\nonError = { error ->\n    val isNetworkError = error.errorCode == \"NETWORK_ERROR\" || \n                         error.errorReason?.contains(\"network\", ignoreCase = true) == true\n    \n    if (isNetworkError && retryCount < MAX_RETRIES) {\n        retryCount++\n        Handler(Looper.getMainLooper()).postDelayed({\n            showMessage(\"Retrying... (Attempt $retryCount of $MAX_RETRIES)\")\n        }, 2000L * retryCount)\n    } else {\n        retryCount = 0\n        showError(\"Network error. Please try again later.\")\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ui-rendering-issues","__idx":12},"children":["UI rendering issues"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"issue-component-not-visible","__idx":13},"children":["Issue: Component not visible"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Causes:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Component not properly rendered in Compose."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Modifier constraints hiding component."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Component not created successfully."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solutions:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verify component creation"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val component = remember {\n    pxpCheckout.createComponent(type, config)\n}\n\n// Check if component is not null\nif (component != null) {\n    pxpCheckout.buildComponentView(\n        component = component,\n        modifier = Modifier.fillMaxWidth()\n    )\n} else {\n    Text(\"Failed to load component\")\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check Compose hierarchy"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"@Composable\nfun PayoutScreen() {\n    Surface(modifier = Modifier.fillMaxSize()) {  // Ensure parent has size\n        Column(\n            modifier = Modifier\n                .fillMaxWidth()\n                .padding(16.dp)\n        ) {\n            pxpCheckout.buildComponentView(\n                component = component,\n                modifier = Modifier\n                    .fillMaxWidth()\n                    .wrapContentHeight()  // Allow component to determine height\n            )\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Debug with visibility logging"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"DisposableEffect(component) {\n    Log.d(\"Payout\", \"Component mounted: ${component.componentType}\")\n    onDispose {\n        Log.d(\"Payout\", \"Component disposed: ${component.componentType}\")\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"callback-not-triggered","__idx":14},"children":["Callback not triggered"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"issue-callbacks-not-being-called","__idx":15},"children":["Issue: Callbacks not being called"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Causes:"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Callback not properly defined in config."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Component not properly initialised."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Error occurred before callback could be triggered."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solutions:"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verify callback syntax"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Correct callback syntax\nval config = PayoutSubmissionComponentConfig(\n    recipientWallet = \"Paypal\",\n    onPrePayoutSubmit = {  // Lambda with no parameters\n        PrePayoutSubmitResult(isApproved = true)\n    },\n    onPostPayout = { result ->  // Lambda with parameter\n        handleSuccess(result)\n    }\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add logging to all callbacks"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = PayoutSubmissionComponentConfig(\n    recipientWallet = \"Paypal\",\n    \n    onClick = {\n        Log.d(\"Payout\", \"onClick triggered\")\n    },\n    \n    onPrePayoutSubmit = {\n        Log.d(\"Payout\", \"onPrePayoutSubmit triggered\")\n        PrePayoutSubmitResult(isApproved = true)\n    },\n    \n    onPostPayout = { result ->\n        Log.d(\"Payout\", \"onPostPayout triggered: ${result.merchantTransactionId}\")\n    },\n    \n    onError = { error ->\n        Log.e(\"Payout\", \"onError triggered: ${error.errorCode}\")\n    }\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"debugging-tips","__idx":16},"children":["Debugging tips"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"enable-verbose-logging","__idx":17},"children":["Enable verbose logging"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Add logging throughout your payout flow\nclass PayoutActivity : ComponentActivity() {\n    \n    private val TAG = \"PayoutDebug\"\n    \n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        Log.d(TAG, \"Activity created\")\n        \n        try {\n            Log.d(TAG, \"Initialising SDK\")\n            val pxpCheckout = initializeSDK()\n            Log.d(TAG, \"SDK initialised successfully\")\n            \n            Log.d(TAG, \"Creating components\")\n            val components = createComponents(pxpCheckout)\n            Log.d(TAG, \"Components created: ${components.size}\")\n            \n            setContent {\n                MaterialTheme {\n                    PayoutScreen(components)\n                }\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error during initialisation\", e)\n            showError(\"Initialisation failed: ${e.message}\")\n        }\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"inspect-error-details","__idx":18},"children":["Inspect error details"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"onError = { error ->\n    // Log all available error information\n    Log.e(\"Payout\", \"\"\"\n        ====== Payout Error ======\n        Error Code: ${error.errorCode}\n        Error Reason: ${error.errorReason}\n        HTTP Status: ${error.httpStatusCode}\n        Correlation ID: ${error.correlationId}\n        Details: ${error.details}\n        Stack Trace: ${Log.getStackTraceString(Exception())}\n        ==========================\n    \"\"\".trimIndent())\n    \n    // Send to crash reporting service\n    reportError(error)\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"test-with-different-scenarios","__idx":19},"children":["Test with different scenarios"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// Test with various amounts\ntestPayouts(\n    amounts = listOf(0.01, 1.0, 100.0, 9999.99),\n    currencies = listOf(\"USD\", \"EUR\", \"GBP\")\n)\n\n// Test error scenarios\ntestErrorScenarios(\n    scenarios = listOf(\n        \"zero_amount\",\n        \"invalid_currency\",\n        \"missing_wallet\",\n        \"network_failure\"\n    )\n)\n","lang":"kotlin"},"children":[]}]},"headings":[{"value":"Troubleshooting","id":"troubleshooting","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Common issues","id":"common-issues","depth":2},{"value":"SDK initialisation errors","id":"sdk-initialisation-errors","depth":3},{"value":"Issue: SDK fails to initialise","id":"issue-sdk-fails-to-initialise","depth":4},{"value":"Component creation errors","id":"component-creation-errors","depth":3},{"value":"Issue: Component creation fails","id":"issue-component-creation-fails","depth":4},{"value":"Payout submission errors","id":"payout-submission-errors","depth":3},{"value":"PO04: Invalid recipient information","id":"po04-invalid-recipient-information","depth":4},{"value":"PO02/PO03/PO07: Invalid transaction data","id":"po02po03po07-invalid-transaction-data","depth":4},{"value":"Network errors","id":"network-errors","depth":3},{"value":"Issue: Network timeout or connection error","id":"issue-network-timeout-or-connection-error","depth":4},{"value":"UI rendering issues","id":"ui-rendering-issues","depth":3},{"value":"Issue: Component not visible","id":"issue-component-not-visible","depth":4},{"value":"Callback not triggered","id":"callback-not-triggered","depth":3},{"value":"Issue: Callbacks not being called","id":"issue-callbacks-not-being-called","depth":4},{"value":"Debugging tips","id":"debugging-tips","depth":2},{"value":"Enable verbose logging","id":"enable-verbose-logging","depth":3},{"value":"Inspect error details","id":"inspect-error-details","depth":3},{"value":"Test with different scenarios","id":"test-with-different-scenarios","depth":3}],"frontmatter":{"seo":{"title":"Troubleshooting"}},"lastModified":"2026-02-26T12:14:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/paypal/payouts/troubleshooting","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}