{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","br","details","admonition"]},"type":"markdown"},"seo":{"title":"Query and script parameters","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":"query-and-script-parameters","__idx":0},"children":["Query and script parameters"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass additional data to PayPal to further configure your Android integration."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can include the optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams"]}," options in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalComponentConfig"]}," to personalise your setup and help PayPal determine which funding sources and buttons to display to your shoppers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Query parameters help define specific content or actions based on the data being passed, while script parameters allow you to provide information you need for your integration to work, a single-use token, or information you'd like to capture for analytics reasons."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"query-parameters","__idx":2},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paypal.types.PayPalQueryParams\n\nqueryParams = PayPalQueryParams(\n    buyerCountry = \"US\",\n    debug = false,\n    integrationDate = \"2025-07-01\",\n    merchantId = \"ABC123\"\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration-parameters","__idx":3},"children":["Configuration parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PayPalQueryParams?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the optional query parameters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams.buyerCountry"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The country code for the buyer's country, in ISO-3166-1 alpha-2 format. This determines the eligible funding sources for a given buyer. Any country that you can pass as a locale is a valid buyer country. Defaults to the buyer's IP geolocation.",{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["buyerCountry"]}," is only used in the sandbox. Don't pass this query parameter in production."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams.debug"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether to use debug mode. Debug mode is recommended only for testing and debugging, because it increases the size of the script and negatively impacts performance. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},".",{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":["Always set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["debug = false"]}," for release builds. Debug mode increases script size and impacts performance."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams.integrationDate"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The date when your PayPal client ID was created (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YYYY-MM-DD"]},"). This helps the PayPal script automatically apply any backward-compatible updates introduced after that date."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["queryParams.merchantId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The merchant ID of the merchant for whom you're facilitating a transaction. Use this parameter only for partner, marketplaces, and cart solutions when you are acting on behalf of another merchant to facilitate their PayPal transactions."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"debug-mode-for-android","__idx":4},"children":["Debug mode for Android"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enable debug mode during development to get detailed logs. You can configure this automatically based on your build type:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val paypalConfig = PayPalComponentConfig(\n    queryParams = PayPalQueryParams(\n        debug = BuildConfig.DEBUG // Automatically use debug mode for debug builds\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can filter debug logs in logcat:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Filter PayPal debug logs\nadb logcat | grep -E \"(PayPal|PxpCheckout)\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"environment-based-configuration","__idx":5},"children":["Environment-based configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure query parameters based on your build environment:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val paypalConfig = PayPalComponentConfig(\n    queryParams = PayPalQueryParams(\n        debug = BuildConfig.DEBUG,\n        integrationDate = BuildConfig.PAYPAL_INTEGRATION_DATE,\n        merchantId = if (BuildConfig.DEBUG) \"TEST_MERCHANT_ID\" else \"PROD_MERCHANT_ID\"\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"script-parameters","__idx":6},"children":["Script parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Script parameters provide additional context and tokens that PayPal uses to optimise the payment experience, enable advanced features like one-click payments, and ensure secure integration with your Android app."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paypal.types.PayPalScriptParams\n\nscriptParams = PayPalScriptParams(\n    cspNonce = \"YOUR_CSP_NONCE\",\n    clientToken = \"abc123xyz==\",\n    pageType = \"checkout\",\n    userIdToken = \"YOUR_USER_ID_TOKEN\"\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration-parameters-1","__idx":7},"children":["Configuration parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PayPalScriptParams?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the optional script parameters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams.cspNonce"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A single-use Content Security Policy (CSP) token, if you use them in your WebView. This is required if your app implements CSP for WebView security."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams.clientToken"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The client token used to identify your shoppers."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams.pageType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The type of page or screen. Use this to log page type and interactions.",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},"Possible values:",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["product-listing"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["search-results"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["product-details"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mini-cart"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cart"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["checkout"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scriptParams.userIdToken"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your user ID token. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required for one-click payment functionality with vaulting."]}," Obtain this token from the vault status check."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"csp-nonce-for-webview-security","__idx":8},"children":["CSP nonce for WebView security"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your app uses Content Security Policy for WebView security, provide a CSP nonce:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import java.security.SecureRandom\nimport java.util.Base64\n\nfun generateCSPNonce(): String {\n    val random = SecureRandom()\n    val bytes = ByteArray(32)\n    random.nextBytes(bytes)\n    return Base64.getEncoder().encodeToString(bytes)\n}\n\nval paypalConfig = PayPalComponentConfig(\n    scriptParams = PayPalScriptParams(\n        cspNonce = generateCSPNonce()\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"page-type-tracking-in-android","__idx":9},"children":["Page type tracking in Android"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageType"]}," parameter to track user flow through your app. Set different values for different screens:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"@Composable\nfun ProductDetailsPayPal() {\n    val paypalConfig = remember {\n        PayPalComponentConfig(\n            scriptParams = PayPalScriptParams(\n                pageType = \"product-details\"\n            )\n        )\n    }\n    \n    // ... component rendering\n}\n\n@Composable\nfun CheckoutPayPal() {\n    val paypalConfig = remember {\n        PayPalComponentConfig(\n            scriptParams = PayPalScriptParams(\n                pageType = \"checkout\"\n            )\n        )\n    }\n    \n    // ... component rendering\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"one-click-payment-configuration","__idx":10},"children":["One-click payment configuration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For one-click payment functionality, you need to provide a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userIdToken"]}," obtained from the vault status check:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val paypalConfig = PayPalComponentConfig(\n    enableOneClickPayment = true,\n    scriptParams = PayPalScriptParams(\n        userIdToken = getUserIdTokenFromVaultStatus()\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To obtain the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userIdToken"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import kotlinx.coroutines.launch\n\nsuspend fun getUserIdTokenFromVaultStatus(): String? {\n    return try {\n        val vaultStatus = checkPayPalVaultStatus(merchantShopperId)\n        vaultStatus.userIdToken\n    } catch (e: Exception) {\n        Log.e(\"PayPal\", \"Failed to get vault status\", e)\n        null\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":11},"children":["Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"basic-configuration-example","__idx":12},"children":["Basic configuration example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a simple example showing how to use query and script parameters:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paypal.PayPalComponentConfig\nimport com.pxp.checkout.components.paypal.types.*\n\nval paypalConfig = PayPalComponentConfig(\n    renderType = \"standalone\",\n    fundingSources = \"paypal\",\n    queryParams = PayPalQueryParams(\n        buyerCountry = \"US\",\n        debug = false,\n        integrationDate = \"2025-07-01\",\n        merchantId = \"ABC123\"\n    ),\n    scriptParams = PayPalScriptParams(\n        cspNonce = \"YOUR_CSP_NONCE\",\n        clientToken = \"abc123xyz==\",\n        pageType = \"checkout\",\n        userIdToken = \"YOUR_USER_ID_TOKEN\"\n    )\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"complete-android-implementation","__idx":13},"children":["Complete Android implementation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a complete example showing how to configure all parameters in a production Android app:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.components.paypal.PayPalComponentConfig\nimport com.pxp.checkout.components.paypal.types.*\nimport androidx.compose.runtime.Composable\nimport androidx.compose.runtime.remember\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.platform.LocalContext\n\n@Composable\nfun CompletePayPalConfiguration(\n    viewModel: PaymentViewModel\n) {\n    val context = LocalContext.current\n    val isDebugBuild = BuildConfig.DEBUG\n    \n    val paypalConfig = remember {\n        PayPalComponentConfig(\n            // Basic configuration\n            renderType = \"standalone\",\n            fundingSources = \"paypal\",\n            payeeEmailAddress = \"merchant@example.com\",\n            paymentDescription = \"Order payment\",\n            shippingPreference = \"NoShipping\",\n            userAction = \"PayNow\",\n            locale = \"en-US\",\n            \n            // Query parameters\n            queryParams = PayPalQueryParams(\n                buyerCountry = if (isDebugBuild) \"US\" else null,\n                debug = isDebugBuild,\n                integrationDate = \"2025-07-01\",\n                merchantId = viewModel.getMerchantId()\n            ),\n            \n            // Script parameters\n            scriptParams = PayPalScriptParams(\n                cspNonce = generateCSPNonce(),\n                clientToken = viewModel.getClientToken(),\n                pageType = \"checkout\",\n                userIdToken = viewModel.getUserIdToken()\n            ),\n            \n            // Enable one-click if user token is available\n            enableOneClickPayment = viewModel.getUserIdToken() != null,\n            \n            // Event callbacks\n            onSuccess = { data -> viewModel.handlePaymentSuccess(data) },\n            onError = { error -> viewModel.handlePaymentError(error) },\n            onCancel = { viewModel.handlePaymentCancel() }\n        )\n    }\n    \n    val paypalComponent = remember(paypalConfig) {\n        pxpCheckout.createComponent(\n            type = ComponentType.PAYPAL,\n            config = paypalConfig\n        )\n    }\n    \n    pxpCheckout.buildComponentView(\n        component = paypalComponent,\n        modifier = Modifier.fillMaxWidth()\n    )\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"best-practices","__idx":14},"children":["Best practices"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"use-buildconfig-for-environment-specific-settings","__idx":15},"children":["Use BuildConfig for environment-specific settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure parameters based on your build variant to ensure debug settings don't leak into production:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"queryParams = PayPalQueryParams(\n    debug = BuildConfig.DEBUG,\n    buyerCountry = if (BuildConfig.DEBUG) \"US\" else null\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"dynamically-set-page-type","__idx":16},"children":["Dynamically set page type"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Track user flow by setting the appropriate ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pageType"]}," for each screen:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"fun getPageTypeForScreen(screenName: String): String {\n    return when (screenName) {\n        \"ProductList\" -> \"product-listing\"\n        \"ProductDetail\" -> \"product-details\"\n        \"Cart\" -> \"cart\"\n        \"Checkout\" -> \"checkout\"\n        else -> \"checkout\"\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"securely-handle-tokens","__idx":17},"children":["Securely handle tokens"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Never hardcode tokens or store them insecurely. Always retrieve them from secure storage or your backend:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"scriptParams = PayPalScriptParams(\n    userIdToken = secureStorage.getUserIdToken(), // From secure storage\n    clientToken = viewModel.fetchClientToken() // From backend\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"log-parameters-in-debug-builds","__idx":18},"children":["Log parameters in debug builds"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add logging to help with debugging during development:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = PayPalComponentConfig(\n    queryParams = PayPalQueryParams(\n        debug = BuildConfig.DEBUG\n    ),\n    scriptParams = PayPalScriptParams(\n        pageType = pageType\n    )\n)\n\nif (BuildConfig.DEBUG) {\n    Log.d(\"PayPal\", \"Config - Debug: ${config.queryParams?.debug}\")\n    Log.d(\"PayPal\", \"Config - PageType: ${config.scriptParams?.pageType}\")\n    Log.d(\"PayPal\", \"Config - UserIdToken available: ${config.scriptParams?.userIdToken != null}\")\n}\n","lang":"kotlin"},"children":[]}]},"headings":[{"value":"Query and script parameters","id":"query-and-script-parameters","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Query parameters","id":"query-parameters","depth":2},{"value":"Configuration parameters","id":"configuration-parameters","depth":3},{"value":"Debug mode for Android","id":"debug-mode-for-android","depth":3},{"value":"Environment-based configuration","id":"environment-based-configuration","depth":3},{"value":"Script parameters","id":"script-parameters","depth":2},{"value":"Configuration parameters","id":"configuration-parameters-1","depth":3},{"value":"CSP nonce for WebView security","id":"csp-nonce-for-webview-security","depth":3},{"value":"Page type tracking in Android","id":"page-type-tracking-in-android","depth":3},{"value":"One-click payment configuration","id":"one-click-payment-configuration","depth":3},{"value":"Examples","id":"examples","depth":2},{"value":"Basic configuration example","id":"basic-configuration-example","depth":3},{"value":"Complete Android implementation","id":"complete-android-implementation","depth":3},{"value":"Best practices","id":"best-practices","depth":2},{"value":"Use BuildConfig for environment-specific settings","id":"use-buildconfig-for-environment-specific-settings","depth":3},{"value":"Dynamically set page type","id":"dynamically-set-page-type","depth":3},{"value":"Securely handle tokens","id":"securely-handle-tokens","depth":3},{"value":"Log parameters in debug builds","id":"log-parameters-in-debug-builds","depth":3}],"frontmatter":{"seo":{"title":"Query and script parameters"}},"lastModified":"2026-02-26T12:14:32.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/paypal/query-script-parameters","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}