{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition","tabs","tab","br","details","required"]},"type":"markdown"},"seo":{"title":"Installation","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"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"installation","__idx":0},"children":["Installation"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install the Android SDK library and start using PayPal payout components in your project."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"before-you-start","__idx":1},"children":["Before you start"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure you meet the system requirements:"]},{"$$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":"Requirement"},"children":["Requirement"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Minimum or notes"},"children":["Minimum or notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["24"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compileSdk"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["37 or higher"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kotlin"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2.x"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Jetpack Compose"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required (SDK UI is Compose-based)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Java desugaring"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Recommended for Java 8+ APIs"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Android Studio"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Latest stable version (Hedgehog or later recommended)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Java Development Kit (JDK)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["17 (matches the SDK ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sourceCompatibility"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jvmTarget"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom Tabs browser"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Chrome or another Custom Tabs-compatible browser (used for PayPal browser flows)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," 24, Kotlin 2.x, Jetpack Compose, JDK 17, and core library desugaring. Set your app ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["compileSdk"]}," to 37 or higher."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK pulls transitive dependencies (Compose, Retrofit, OkHttp, Gson, Koin, and others) via its POM. Some transitive dependencies are hosted on JitPack rather than Maven Central — your project must declare the JitPack repository so Gradle can download them when resolving the SDK."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-1-install-the-android-sdk-library","__idx":2},"children":["Step 1: Install the Android SDK library"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the latest PXP Android Components SDK from ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://central.sonatype.com/artifact/io.pxp/android-components-sdk/overview","target":"_blank"},"children":["Maven Central"]}," in your Android app. Browse published versions, dependencies, and the POM on the artifact page."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-repositories","__idx":3},"children":["Configure repositories"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mavenCentral()"]}," and the JitPack repository in your project-level ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["build.gradle"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settings.gradle"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dependencyResolutionManagement"]}," block:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Groovy)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"repositories {\n    google()\n    mavenCentral()\n    maven { url = 'https://jitpack.io' }  // Required for some SDK transitive dependencies hosted on JitPack\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Kotlin DSL)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"repositories {\n    google()\n    mavenCentral()\n    maven(url = \"https://jitpack.io\")\n}\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"apply-the-kotlin-compose-plugin","__idx":4},"children":["Apply the Kotlin Compose plugin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK UI is Compose-based. Apply the Kotlin Compose plugin in your root and app module build files."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Root ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["build.gradle"]},":"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Groovy)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"buildscript {\n    ext.kotlin_version = \"<kotlin-version>\"\n    dependencies {\n        classpath \"com.android.tools.build:gradle:<agp-version>\"\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        classpath \"org.jetbrains.kotlin:compose-compiler-gradle-plugin:$kotlin_version\"\n    }\n}\n\nplugins {\n    id 'org.jetbrains.kotlin.plugin.compose' version '<kotlin-version>' apply false\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Kotlin DSL)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"plugins {\n    id(\"org.jetbrains.kotlin.plugin.compose\") version \"<kotlin-version>\" apply false\n}\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["App module plugins:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Groovy)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"plugins {\n    id 'com.android.application'\n    id 'org.jetbrains.kotlin.plugin.compose'\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Kotlin DSL)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"plugins {\n    id(\"com.android.application\")\n    id(\"org.jetbrains.kotlin.plugin.compose\")\n}\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"add-the-sdk-dependency","__idx":5},"children":["Add the SDK dependency"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Configure your app module and add the Maven Central dependency:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Groovy)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"plugins {\n    id 'com.android.application'\n    id 'org.jetbrains.kotlin.plugin.compose'\n}\n\nandroid {\n    compileSdk = 37\n\n    defaultConfig {\n        minSdk = 24\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n        coreLibraryDesugaringEnabled = true\n    }\n\n    buildFeatures {\n        compose = true\n    }\n}\n\ndependencies {\n    coreLibraryDesugaring \"com.android.tools:desugar_jdk_libs:2.1.5\"\n\n    implementation \"io.pxp:android-components-sdk:{versionNumber}\"\n\n    // Your app Compose dependencies (example)\n    implementation platform(\"androidx.compose:compose-bom:{composeBomVersion}\")\n    implementation \"androidx.compose.ui:ui\"\n    implementation \"androidx.compose.material3:material3\"\n    implementation \"androidx.activity:activity-compose:1.8.2\"\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Kotlin DSL)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"plugins {\n    id(\"com.android.application\")\n    id(\"org.jetbrains.kotlin.plugin.compose\")\n}\n\nandroid {\n    compileSdk = 37\n\n    defaultConfig {\n        minSdk = 24\n    }\n\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_17\n        targetCompatibility = JavaVersion.VERSION_17\n        isCoreLibraryDesugaringEnabled = true\n    }\n\n    buildFeatures {\n        compose = true\n    }\n}\n\ndependencies {\n    coreLibraryDesugaring(\"com.android.tools:desugar_jdk_libs:2.1.5\")\n    implementation(\"io.pxp:android-components-sdk:{versionNumber}\")\n\n    // Your app Compose dependencies (example)\n    implementation(platform(\"androidx.compose:compose-bom:{composeBomVersion}\"))\n    implementation(\"androidx.compose.ui:ui\")\n    implementation(\"androidx.compose.material3:material3\")\n    implementation(\"androidx.activity:activity-compose:1.8.2\")\n}\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Version catalog (libs.versions.toml)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"toml","header":{"controls":{"copy":{}}},"source":"[versions]\npxp-android-sdk = \"{versionNumber}\"\n\n[libraries]\npxp-android-sdk = { group = \"io.pxp\", name = \"android-components-sdk\", version.ref = \"pxp-android-sdk\" }\n","lang":"toml"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"// app/build.gradle.kts\ndependencies {\n    implementation(libs.pxp.android.sdk)\n}\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sync Gradle. Android Studio downloads the AAR from Maven Central."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"check-the-latest-published-version","__idx":6},"children":["Check the latest published version"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://central.sonatype.com/artifact/io.pxp/android-components-sdk/overview","target":"_blank"},"children":["Maven Central artifact page"]}," and select the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Versions"]}," tab, or query metadata directly:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -s https://repo.maven.apache.org/maven2/io/pxp/android-components-sdk/maven-metadata.xml\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<release>"]}," value (or the version shown on Sonatype) in your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["implementation"]}," line."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verify-dependency-resolution","__idx":7},"children":["Verify dependency resolution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm the SDK resolves on your compile classpath:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"./gradlew :app:dependencies --configuration debugCompileClasspath | grep io.pxp\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Expected output includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["io.pxp:android-components-sdk:<version>"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-2-add-the-required-permissions","__idx":8},"children":["Step 2: Add the required permissions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK automatically merges the required permissions from its manifest, including:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INTERNET"]},": required for API communication"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ACCESS_NETWORK_STATE"]},": required for network state checking"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SYSTEM_ALERT_WINDOW"]},": merged by the SDK for challenge overlays"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK also merges a Custom Tabs ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<queries>"]}," entry so the SDK can detect a Custom Tabs-compatible browser."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No manual manifest configuration is required. These entries are merged automatically when you add the SDK dependency."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-get-your-api-credentials","__idx":9},"children":["Step 3: Get your API credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To initialise the SDK, you'll need to send authenticated requests to the PXP API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get your credentials:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io","target":"_blank"},"children":["Unity Portal"]},", go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant setup > Merchant groups"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select a merchant group."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Inbound calls"]}," tab."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Client ID"]}," in the top-right corner."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New token"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Choose a number of days before token expiry. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]}," to confirm. Your token is now created."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy the token ID and token value. Make sure to keep these confidential to protect the integrity of your authentication process."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As best practice, we recommend regularly generating and implementing new tokens."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-4-get-the-session-data","__idx":10},"children":["Step 4: Get the session data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that you have your credentials, you're ready to send an API request to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessions"]}," endpoint. This allows you to retrieve the transaction session data from the back-end, so you can supply it when you initialise the SDK."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Our platform uses HMAC (Hash-based Message Authentication Code) with SHA256 for authentication to ensure secure communication and data integrity. This method involves creating a signature by hashing your request data with a secret key, which must then be included in the HTTP headers of your API request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create the HMAC signature, you need to prepare a string that includes four parts:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A timestamp, in ",{"$$mdtype":"Tag","name":"a","attributes":{"target":"_blank","href":"https://en.wikipedia.org/wiki/Unix_time"},"children":["Unix format"]},". For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1754701373"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A unique request ID, in GUID format. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ce244054-b372-42c2-9102-f0d976db69f6"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The request path, which is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api/v1/sessions"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The request body. For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n   \"merchant\": \"MERCHANT-1\",\n   \"site\": \"SITE-1\",\n   \"sessionTimeout\": 120,\n   \"merchantTransactionId\": \"0ce72cfd-014d-4256-a006-a56601b2ffc4\",\n   \"transactionMethod\": {\n     \"intent\": {\n       \"paypal\": \"Payout\"\n     }\n   },\n   \"amounts\": {\n     \"currencyCode\": \"USD\",\n     \"transactionValue\": 100\n   },\n   \"allowTransaction\": true\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Put these four parts together as one concatenated string with no separators: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{timestamp}{requestId}{requestPath}{requestBody}"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{requestBody}"]}," must be the exact JSON bytes you send in the POST body (typically minified, no extra whitespace). For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"1754701373ce244054-b372-42c2-9102-f0d976db69f6api/v1/sessions{\"merchant\":\"MERCHANT-1\",\"site\":\"SITE-1\",\"sessionTimeout\":120,\"merchantTransactionId\":\"0ce72cfd-014d-4256-a006-a56601b2ffc4\",\"transactionMethod\":{\"intent\":{\"paypal\":\"Payout\"}},\"amounts\":{\"currencyCode\":\"USD\",\"transactionValue\":100},\"allowTransaction\":true}\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use your token value (secret) to HMAC-SHA256 this string. You can find your token ID in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io","target":"_blank"},"children":["Unity Portal"]},". Here's an example of an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacSignature"]}," after you've signed the data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can now put together your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," header. It follows this format: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PXP-UST1 {tokenId}:{timestamp}:{hmacSignature}"]},". For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"PXP-UST1 9aac6071-38d0-4545-9d2f-15b936af6d7f:1754701373:1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lastly, send your request to the Sessions API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a full example of what your request might look like:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the production host ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api-services.pxp.io/api/v1"]}," or the sandbox host ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api-services.test.pxp.io/api/v1"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X POST \\\n  'https://api-services.test.pxp.io/api/v1/sessions' \\\n  -H 'Authorization: PXP-UST1 9aac6071-38d0-4545-9d2f-15b936af6d7f:1754701373:1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"merchant\": \"MERCHANT-1\",\n  \"site\": \"SITE-1\",\n  \"sessionTimeout\": 120,\n  \"merchantTransactionId\": \"0ce72cfd-014d-4256-a006-a56601b2ffc4\",\n  \"transactionMethod\": {\n    \"intent\": {\n      \"paypal\": \"Payout\"\n    }\n  },\n  \"amounts\": {\n    \"currencyCode\": \"USD\",\n    \"transactionValue\": 100\n  },\n  \"allowTransaction\": true\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"body-parameters","__idx":11},"children":["Body parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use these fields in the Sessions API request body. Required fields are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchant"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod"]},"."]},{"$$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":["merchant"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 20 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your unique merchant identifier, as assigned by PXP. You can find it in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io","target":"_blank"},"children":["Unity Portal"]},", by going to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant setup > Merchants"]}," and checking the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Merchant ID"]}," column or by clicking on a merchant and checking the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["General information"]}," section."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["site"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 20 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your unique site identifier, as assigned by PXP. You can find it in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io","target":"_blank"},"children":["Unity Portal"]},", by going to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant setup > Sites"]}," and checking the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Site ID"]}," column or by clicking on a site and checking the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["General information"]}," section."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantTransactionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 50 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A unique identifier for this transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionTimeout"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["integer (≥ 1)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The duration of the session, in minutes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the transaction method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod.intent"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the intent for different payment methods."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod.intent.paypal"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent for PayPal. For PayPal payouts, set this to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]},". Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorisation"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the transaction amount."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts.currencyCode"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (3 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The currency code associated with the transaction, in ISO 4217 format. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/how-it-works#supported-currencies"},"children":["Supported currencies"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts.transactionValue"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["number (≥ 0)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction amount. The numbers after the decimal will be zero padded if they are less than the expected ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currencyCode"]}," exponent. For example, GBP 1.1 = GBP 1.10, EUR 1 = EUR 1.00, or BHD 1.3 = 1.300. The transaction will be rejected if numbers after the decimal are greater than the expected ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currencyCode"]}," exponent (e.g., GBP 1.234), or if a decimal is supplied when the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["currencyCode"]}," of the exponent does not require it (e.g., JPY 1.0)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowTransaction"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["boolean or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the transaction is allowed to proceed. If not provided, defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," (no decision made yet)."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your request is successful, you'll receive a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}," response containing the session data."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"sessionId\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n  \"hmacKey\": \"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6\",\n  \"encryptionKey\": \"k8l9m0n1o2p3q4r5s6t7u8v9w0x1y2z\",\n  \"sessionExpiry\": \"2025-05-19T13:39:20.3843454Z\",\n  \"allowedFundingTypes\": {\n    \"wallets\": {\n      \"paypal\": {\n        \"allowedFundingOptions\": [\n          \"paypal\"\n        ],\n        \"merchantId\": \"PayPalMerchant123\"\n      }\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-parameters","__idx":12},"children":["Response parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Map these response fields into your SDK session configuration. The Sessions API response always includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacKey"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionExpiry"]},"."]},{"$$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":["sessionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (UUID)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unique identifier for the created session. Required for SDK initialisation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacKey"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The HMAC key generated for securing session communications. Required for SDK initialisation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A key used for encrypting sensitive session data during communication. Required for SDK initialisation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionExpiry"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (date-time)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The timestamp indicating when the session will expire, in ISO 8601 format. The Android SDK's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," model does not include this field."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional session data payload from the Sessions API. The Android ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," model still requires a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," string when you build the config. If the API omits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},", pass an empty string (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"\""]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the funding types allowed for this session."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the wallets allowed for this session. Map this to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig.allowedFundingTypes.wallets"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets.paypal"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The PayPal configuration settings. Maps to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["WalletsConfig.paypal"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets.paypal.allowedFundingOptions"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["array of strings"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The list of allowed funding options for PayPal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets.paypal.merchantId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The PayPal merchant identifier."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5-initialise-the-sdk","__idx":13},"children":["Step 5: Initialise the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To initialise the SDK, you need to pass the session data from Step 4 back to your Android application."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You'll also need to provide your client ID, details about the environment, your owner ID and type, the transaction data with a PayPal payout intent, and a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalConfig"]}," for payout behaviour."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-proguard-or-r8","__idx":14},"children":["Configure ProGuard or R8"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK release AAR is minified at publish time and ships consumer ProGuard rules as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proguard.txt"]}," inside the AAR. Gradle merges them automatically."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enable minify in your app release build:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Groovy)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"android {\n    buildTypes {\n        release {\n            minifyEnabled true\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"TabItemFragment","attributes":{"label":"Gradle (Kotlin DSL)","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"android {\n    buildTypes {\n        release {\n            isMinifyEnabled = true\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n}\n","lang":"kotlin"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"initialise-the-sdk-in-your-application","__idx":15},"children":["Initialise the SDK in your application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a complete example showing how to initialise the SDK and create PayPal payout components for a returning customer:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import android.content.Context\nimport androidx.compose.foundation.layout.Arrangement\nimport androidx.compose.foundation.layout.Column\nimport androidx.compose.foundation.layout.fillMaxWidth\nimport androidx.compose.foundation.layout.padding\nimport androidx.compose.runtime.Composable\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.unit.dp\nimport com.pxp.PxpCheckout\nimport com.pxp.checkout.components.payoutamount.PayoutAmountComponent\nimport com.pxp.checkout.components.payoutamount.PayoutAmountComponentConfig\nimport com.pxp.checkout.components.paypalpayoutreceiver.PaypalPayoutReceiverComponent\nimport com.pxp.checkout.components.paypalpayoutreceiver.PaypalPayoutReceiverComponentConfig\nimport com.pxp.checkout.components.payoutsubmission.PayoutSubmissionComponent\nimport com.pxp.checkout.components.payoutsubmission.PayoutSubmissionComponentConfig\nimport com.pxp.checkout.models.*\nimport com.pxp.checkout.models.payout.PrePayoutSubmitResult\nimport com.pxp.checkout.types.ComponentType\nimport java.time.Instant\nimport java.util.UUID\n\nfun initialisePayoutSdk(context: Context, session: SessionConfig): PxpCheckout {\n    return PxpCheckout.builder()\n        .withConfig(\n            PxpSdkConfig(\n                environment = Environment.TEST,\n                locale = \"en-US\",\n                session = session,\n                clientId = \"your-client-id-from-unity-portal\",\n                ownerId = \"your-merchant-group-id\",\n                ownerType = \"MerchantGroup\",\n                transactionData = TransactionData(\n                    amount = 100.00,\n                    currency = \"USD\",\n                    entryType = EntryType.Ecom,\n                    intent = TransactionIntentData(\n                        paypal = PayPalIntentType.Payout\n                    ),\n                    merchant = \"your-merchant-id\",\n                    merchantTransactionId = UUID.randomUUID().toString(),\n                    merchantTransactionDate = { Instant.now().toString() }\n                ),\n                paypalConfig = PaypalConfig(\n                    payout = PayoutConfig(\n                        proceedPayoutWithSdk = true,\n                        paypalWallet = PayPalPayOutWalletConfig(\n                            email = \"customer@example.com\",\n                            payerId = \"PAYER_ID_XXX\"\n                        )\n                    )\n                )\n            )\n        )\n        .withContext(context.applicationContext)\n        .build()\n}\n\nfun createPayoutComponents(pxpCheckout: PxpCheckout): Triple<\n    PayoutAmountComponent,\n    PaypalPayoutReceiverComponent,\n    PayoutSubmissionComponent\n> {\n    val amountComponent = pxpCheckout.createComponent<PayoutAmountComponent>(\n        type = ComponentType.PAYOUT_AMOUNT,\n        config = PayoutAmountComponentConfig(\n            label = \"Withdrawal Amount\"\n        )\n    )\n\n    val receiverComponent = pxpCheckout.createComponent<PaypalPayoutReceiverComponent>(\n        type = ComponentType.PAYPAL_PAYOUT_RECEIVER,\n        config = PaypalPayoutReceiverComponentConfig(\n            label = \"PayPal Account\",\n            showMaskToggle = true,\n            applyMask = true\n        )\n    )\n\n    val submitComponent = pxpCheckout.createComponent<PayoutSubmissionComponent>(\n        type = ComponentType.PAYOUT_SUBMISSION,\n        config = PayoutSubmissionComponentConfig(\n            recipientWallet = \"Paypal\",\n            onPrePayoutSubmit = {\n                PrePayoutSubmitResult(isApproved = true)\n            },\n            onPostPayout = { result ->\n                // Handle successful payout\n            },\n            onError = { error ->\n                // PayOutError: error.errorCode and error.errorReason\n                showErrorDialog(error.errorReason ?: error.errorCode)\n            }\n        )\n    )\n\n    return Triple(amountComponent, receiverComponent, submitComponent)\n}\n\n@Composable\nfun PayoutScreen(\n    amountComponent: PayoutAmountComponent,\n    receiverComponent: PaypalPayoutReceiverComponent,\n    submitComponent: PayoutSubmissionComponent\n) {\n    Column(\n        modifier = Modifier\n            .fillMaxWidth()\n            .padding(16.dp),\n        verticalArrangement = Arrangement.spacedBy(16.dp)\n    ) {\n        amountComponent.Content(Modifier.fillMaxWidth())\n        receiverComponent.Content(Modifier.fillMaxWidth())\n        submitComponent.Content(Modifier.fillMaxWidth())\n    }\n}\n\n// Fetch session from your backend\nsuspend fun fetchSessionFromBackend(): SessionConfig {\n    // Make an API call to your backend to get session data.\n    // Your backend should call the PXP Sessions API with intent.paypal set to \"Payout\".\n    // See Step 4 for details on the Sessions API.\n\n    return SessionConfig(\n        sessionId = \"session-id-from-backend\",\n        hmacKey = \"hmac-key-from-backend\",\n        data = \"session-data-from-backend\", // Required on SessionConfig; use \"\" if the API omits data\n        encryptionKey = \"encryption-key-from-backend\",\n        locale = \"en-US\",\n        allowedFundingTypes = AllowedFundingTypes(\n            wallets = WalletsConfig(\n                paypal = PayPalWalletConfig(\n                    allowedFundingOptions = listOf(\"paypal\"),\n                    merchantId = \"paypal-merchant-123\"\n                )\n            )\n        )\n    )\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Providing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalWallet"]}," supplies the stored PayPal email and payer ID for the withdrawal components. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/android/paypal/how-it-works"},"children":["How it works"]}," and ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/android/paypal/withdrawal-flow"},"children":["Withdrawal flow"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration-parameters","__idx":16},"children":["Configuration parameters"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass these values when you build ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]},":"]},{"$$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":["environment"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Environment"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The environment type enum.",{"$$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":["Environment.TEST"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.LIVE"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["session"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["SessionConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the payout session. Map ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacKey"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]},", and optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes"]}," from the Sessions API response (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#step-4-get-the-session-data"},"children":["Step 4"]},"). The Android ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," model also requires ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]},". If the Sessions API omits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},", pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"\""]},".",{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionExpiry"]}," is returned by the API but is not a field on the Android ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," model."]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your client ID from the Unity Portal. Get this from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant setup > Merchant groups > Inbound calls"]}," in the Unity Portal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The identifier of the owner related to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerType"]},". Get this from the Unity Portal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The type of owner. Always set this to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"MerchantGroup\""]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["TransactionData"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Details about the payout."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.amount"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Double"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The payout amount as a Double (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["100.00"]},")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.currency"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String (3 characters)"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The currency code associated with the payout, in ISO 4217 format (e.g., \"USD\", \"GBP\", \"EUR\")."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.merchant"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your unique merchant identifier, as assigned by PXP. Get this from the Unity Portal."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.merchantTransactionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A unique identifier for this payout. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["UUID.randomUUID().toString()"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.merchantTransactionDate"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> String"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A callback function that returns the transaction date as an ISO 8601 formatted string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.entryType"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["EntryType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The entry type for the payout. For PayPal payouts, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EntryType.Ecom"]},". The payout request the SDK builds uses an e-commerce entry type."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.intent"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["TransactionIntentData"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction intents. For PayPal payouts, set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypal"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalIntentType.Payout"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.intent.paypal"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PayPalIntentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent for PayPal.",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},"For payouts, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalIntentType.Payout"]},".",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},"Other 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":["PayPalIntentType.Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PayPalIntentType.Purchase"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalConfig"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PaypalConfig"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The PayPal configuration for payout operations. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payout"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proceedPayoutWithSdk"]}," and, for returning customers, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalWallet"]},". See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/android/paypal/how-it-works"},"children":["How it works"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalConfig.payout"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PayoutConfig"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The payout-specific settings."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalConfig.payout.proceedPayoutWithSdk"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", the SDK executes the payout after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]}," approves it. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", the SDK calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onClick"]}," (if configured) and does not run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPrePayoutSubmit"]}," or execute the payout — your backend must call the payout API. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paypalConfig.payout.paypalWallet"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["PayPalPayOutWalletConfig"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The stored PayPal wallet details for the withdrawal flow (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payerId"]},"). On Android, email and payer ID each have a maximum length of 127 characters."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kountDisabled"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether to disable the Kount fraud detection service. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," (fraud detection enabled)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional locale for UI localisation on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"en-US\""]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"es-ES\""]},"). Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"en-US\""]}," if omitted. Set this on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]},", not only on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig.locale"]}," must still be supplied when you build ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," manually, but component UI text follows ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig.locale"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["localisation"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["LocalisationConfig?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LocalisationConfig"]}," object of string overrides for component text. For example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LocalisationConfig(paypalPayoutReceiverLabel = \"PayPal account\")"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["analyticsEvent"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["(BaseAnalyticsEvent) -> Unit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional callback function to receive analytics events from the SDK. Use this to forward events to your analytics platform."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["merchantId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional merchant identifier override. Typically not needed as the SDK uses ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.merchant"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> Shopper?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional callback function to provide shopper data dynamically. Returns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Shopper"]}," object with shopper information including ID, email, name, and contact details."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting-installation","__idx":17},"children":["Troubleshooting installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this table when Gradle sync, minify, or Compose setup fails:"]},{"$$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":"Issue"},"children":["Issue"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Cause"},"children":["Cause"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fix"},"children":["Fix"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Could not find ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["io.pxp:android-components-sdk:<version>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Version not on Maven Central yet"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm the version string; wait for Central sync or contact PXP support"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transitive dependency resolution fails (artifact hosted on JitPack)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing JitPack repository"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maven { url = 'https://jitpack.io' }"]}," to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["repositories"]}," block"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unresolved SDK symbols at compile time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["SDK version mismatch or stale cache"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm the Maven Central version matches this guide; run Gradle sync or a clean build"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Duplicate classes or version conflicts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compose or OkHttp version clash"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Align with SDK POM versions or use a current Compose BOM (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{composeBomVersion}"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," error"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["App ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk"]}," < 24"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["minSdk = 24"]}," or higher"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["R8 or missing class at runtime"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["App release minify misconfiguration, or SDK older than 1.1.2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use SDK 1.1.2 or newer so consumer rules include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-keep class com.pxp.PxpCheckout$* { *; }"]},". On 1.1.1 or earlier, upgrade or add that keep rule manually. Use the published release AAR; rules are bundled as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["proguard.txt"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["App crashes after ProGuard obfuscation"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ProGuard rules aren't properly configured"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use SDK 1.1.2+ so consumer rules merge automatically from the AAR, or add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-keep class com.pxp.PxpCheckout$* { *; }"]}," for older versions."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"Class not found\" errors for SDK classes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The SDK dependency isn't properly synced or included"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify the Maven Central dependency is in your app module; sync Gradle; clean and rebuild"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compose compiler version mismatch"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Kotlin version doesn't match Compose compiler requirements"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use Kotlin 2.x with the Kotlin Compose Compiler Gradle plugin (see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#step-1-install-the-android-sdk-library"},"children":["Step 1"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That's it for SDK installation. Next, follow the guide for ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/android/paypal/how-it-works"},"children":["PayPal payouts"]},", and see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/payout/components/android/paypal/error-handling"},"children":["Error handling"]}," for payout error codes and callbacks."]}]}]},"headings":[{"value":"Installation","id":"installation","depth":1},{"value":"Before you start","id":"before-you-start","depth":2},{"value":"Step 1: Install the Android SDK library","id":"step-1-install-the-android-sdk-library","depth":2},{"value":"Configure repositories","id":"configure-repositories","depth":3},{"value":"Apply the Kotlin Compose plugin","id":"apply-the-kotlin-compose-plugin","depth":3},{"value":"Add the SDK dependency","id":"add-the-sdk-dependency","depth":3},{"value":"Check the latest published version","id":"check-the-latest-published-version","depth":3},{"value":"Verify dependency resolution","id":"verify-dependency-resolution","depth":3},{"value":"Step 2: Add the required permissions","id":"step-2-add-the-required-permissions","depth":2},{"value":"Step 3: Get your API credentials","id":"step-3-get-your-api-credentials","depth":2},{"value":"Step 4: Get the session data","id":"step-4-get-the-session-data","depth":2},{"value":"Body parameters","id":"body-parameters","depth":3},{"value":"Response parameters","id":"response-parameters","depth":3},{"value":"Step 5: Initialise the SDK","id":"step-5-initialise-the-sdk","depth":2},{"value":"Configure ProGuard or R8","id":"configure-proguard-or-r8","depth":3},{"value":"Initialise the SDK in your application","id":"initialise-the-sdk-in-your-application","depth":3},{"value":"Configuration parameters","id":"configuration-parameters","depth":3},{"value":"Troubleshooting installation","id":"troubleshooting-installation","depth":2}],"frontmatter":{"seo":{"title":"Installation"}},"lastModified":"2026-11-17T10:10:31.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/payout/components/android/installation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}