{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","tabs","tab","admonition","br","details","required"]},"type":"markdown"},"seo":{"title":"Install the Android SDK","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":"install-the-android-sdk","__idx":0},"children":["Install the Android SDK"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Install the Android SDK library and start using 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":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android Studio"]},": Latest stable version (recommended: Android Studio Hedgehog or later)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Java Development Kit (JDK)"]},": Version 17 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android SDK"]},": API level 24 (Android 7.0) or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Target SDK"]},": API level 35 (Android 15)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Kotlin"]},": Version 1.9.0 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Jetpack Compose"]},": Version 1.5.8 or higher"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Play Services"]},": Version 21.0.0 or higher (for Google Pay)"]}]},{"$$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":["To get started, download the latest version of the Android SDK from Maven."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can choose between two installation methods:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["AAR (Android Archive) library installation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Source code integration."]}]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Method 1: AAR library installation (recommended)","disable":false},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Download the AAR files:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"pxpcheckout-debug.aar    (Debug version)\npxpcheckout-release.aar  (Release version)\n"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Copy the AAR file to your project's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["libs"]}," folder:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"your-project/\n├── app/\n│   ├── libs/\n│   │   └── pxpcheckout-release.aar\n│   └── build.gradle\n"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the AAR dependency to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/build.gradle"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"dependencies {\n    implementation files('libs/pxpcheckout-release.aar')\n}\n","lang":"gradle"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Method 2: Source code integration","disable":false},"children":[{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Clone the repository:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"git clone <repository-url>\ncd Pxp.Unity.Components.Android\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":2},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In Android Studio, go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File > New > Import Module"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pxpcheckout"]}," folder."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the module dependency in your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/build.gradle"]},":"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"dependencies {\n    implementation project(':pxpcheckout')\n}\n","lang":"gradle"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-add-the-required-permissions","__idx":3},"children":["Step 2: Add the required permissions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the following permissions to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AndroidManifest.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    \n    <!-- Required permission for 3DS Challenge overlay -->\n    <uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\" />\n    \n    <!-- Required permission for internet access -->\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    \n    <!-- Required permission for network state checking -->\n    <uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n    \n    <!-- Optional: For enhanced security features -->\n    <uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\" />\n    \n    <application>\n        <!-- Your application configuration -->\n    </application>\n</manifest>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-3-get-your-api-credentials","__idx":4},"children":["Step 3: Get your API credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order 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":5},"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       \"card\": \"Authorisation\",\n       \"paypal\": \"Purchase\",\n       \"googlepay\": \"Authorisation\"\n     }\n   },\n   \"amounts\": {\n     \"currencyCode\": \"EUR\",\n     \"transactionValue\": 20\n   },\n   \"authorisation\": true,\n   \"addressVerification\": {\n     \"countryCode\": \"GB\",\n     \"houseNumberOrName\": \"10 Downing Street\",\n     \"postalCode\": \"SW1A 2AA\"\n   },\n   \"identityVerification\": {\n     \"nameVerification\": true\n   },\n   \"threeDSecureData\": {\n     \"threeDSecureVersion\": \"2.2\",\n     \"electronicCommerceIndicator\": \"05\",\n     \"cardHolderAuthenticationVerificationValue\": \"CAVV1234567890\",\n     \"directoryServerTransactionId\": \"550e8400-e29b-41d4-a716-446655440000\",\n     \"threeDSecureTransactionStatus\": \"Y\"\n   }\n}\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Put these four parts together following this format: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"{timestamp}{requestId}{requestPath}{requestBody}\""]},". The result should look something like this:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"1754701373ce244054-b372-42c2-9102-f0d976db69f6api/v1/sessions{\n  \"merchant\": \"MERCHANT-1\",\n  \"site\": \"SITE-1\",\n  \"sessionTimeout\": 120,\n  \"merchantTransactionId\": \"0ce72cfd-014d-4256-a006-a56601b2ffc4\",\n  \"transactionMethod\": {\n    \"intent\": {\n      \"card\": \"Authorisation\",\n      \"paypal\": \"Purchase\",\n      \"googlepay\": \"Authorisation\"\n    }\n  },\n  \"amounts\": {\n    \"currencyCode\": \"EUR\",\n    \"transactionValue\": 20\n  },\n  \"authorisation\": true,\n  \"addressVerification\": {\n    \"countryCode\": \"GB\",\n    \"houseNumberOrName\": \"10 Downing Street\",\n    \"postalCode\": \"SW1A 2AA\"\n  },\n  \"identityVerification\": {\n    \"nameVerification\": true\n  },\n  \"threeDSecureData\": {\n    \"threeDSecureVersion\": \"2.2\",\n    \"electronicCommerceIndicator\": \"05\",\n    \"cardHolderAuthenticationVerificationValue\": \"CAVV1234567890\",\n    \"directoryServerTransactionId\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"threeDSecureTransactionStatus\": \"Y\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use your token ID to encrypt this data structure by SHA256. You can find your token ID in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io"},"children":["Unity Portal"]},". Here's an example of an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacSignature"]}," after you've encrypted the data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6\n","lang":"json"},"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":{"header":{"controls":{"copy":{}}},"source":"\"PXP-UST1 9aac6071-38d0-4545-9d2f-15b936af6d7f:1754701373:1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6\"\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Lastly, send your request to the Sessions API. You'll need to add a request ID of your choice and include your client ID, which you can find in the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://portal.pxp.io"},"children":["Unity Portal"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here's a full example of what your request might look like:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"curl","header":{"controls":{"copy":{}}},"source":"curl -i -X POST \\\n  'https://api-services.pxp.io/api/v1/sessions' \\\n  -H 'Authorization: \"PXP-UST1 9aac6071-38d0-4545-9d2f-15b936af6d7f:1754701373:1DE2DFC390D7CD746A972140F26846AFA81CF85F5A0BAABA95DBC95301795EA6\"' \\\n  -H 'X-Request-Id: \"550e8400-e29b-41d4-a716-446655440000\"' \\\n  -H 'X-Client-Id: \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"' \\\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      \"card\": \"Authorisation\",\n      \"paypal\": \"Purchase\",\n      \"googlepay\": \"Authorisation\"\n    }\n  },\n  \"amounts\": {\n    \"currencyCode\": \"EUR\",\n    \"transactionValue\": 20\n  },\n  \"authorisation\": true,\n  \"addressVerification\": {\n    \"countryCode\": \"GB\",\n    \"houseNumberOrName\": \"10 Downing Street\",\n    \"postalCode\": \"SW1A 2AA\"\n  },\n  \"identityVerification\": {\n    \"nameVerification\": true\n  },\n  \"threeDSecureData\": {\n    \"threeDSecureVersion\": \"2.2\",\n    \"electronicCommerceIndicator\": \"05\",\n    \"cardHolderAuthenticationVerificationValue\": \"CAVV1234567890\",\n    \"directoryServerTransactionId\": \"550e8400-e29b-41d4-a716-446655440000\",\n    \"threeDSecureTransactionStatus\": \"Y\"\n  }\n}'\n","lang":"curl"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"body-parameters","__idx":6},"children":["Body 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":{"align":"left","data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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":{"align":"left"},"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"},"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":{"align":"left"},"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":{"align":"left"},"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"},"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":{"align":"left"},"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":{"align":"left"},"children":["A unique identifier of your choice that represents this transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionTimeout"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["number"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The duration of the session, in minutes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["Details about the transaction method, including the intent for each payment type."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["The transaction intent for each payment method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod.intent.card"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The intent for card transactions.",{"$$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":["Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Verification"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EstimatedAuthorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["The intent for PayPal transactions.",{"$$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":["Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionMethod.intent.googlepay"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The intent for Google Pay transactions.",{"$$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":["Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["Details about the transaction amount."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["The currency code associated with the transaction, in ISO 4217 format. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/supported-currencies"},"children":["Supported payment currencies"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amounts.transactionValue"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["number"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Required","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["authorisation"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Whether or not to proceed with authorisation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addressVerification"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Details about the cardholder's address. These help in the validation and fraud prevention process by matching the provided address with the cardholder's address on file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addressVerification.countryCode"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 2 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The country associated with the cardholder's address, in ISO 3166-1 alpha-2 format."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addressVerification.houseNumberOrName"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 100 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The house number or name associated with the cardholder's address."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["addressVerification.postalCode"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 10 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The postal code of the cardholder's address."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identityVerification"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Details about the cardholder's identity. These help in ensuring that the information provided matches the cardholder's details on file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identityVerification.nameVerification"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Whether the cardholder's name matches the name associated with the registered address on file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Details about the 3D Secure authentication data from an external authentication process."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData.threeDSecureVersion"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 10 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The 3DS protocol version."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData.electronicCommerceIndicator"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 2 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The ECI value indicating the authentication result."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData.cardHolderAuthenticationVerificationValue"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 50 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The CAVV value from 3DS authentication."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData.directoryServerTransactionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 50 characters)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The Directory Server transaction identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["threeDSecureData.threeDSecureTransactionStatus"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (≤ 1 character)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The 3DS transaction status."]}]}]}]}]},{"$$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\": \"c5f0799b-0839-43ce-abc5-5b462a98f250\",\n  \"hmacKey\": \"904bc42395d4af634e2fd48ee8c2c7f52955a1da97a3aa3d82957ff12980a7bb\",\n  \"encryptionKey\": \"20d175a669ad3f8c195c9c283fc86155\",\n  \"sessionExpiry\": \"2025-05-19T13:39:20.3843454Z\",\n  \"allowedFundingTypes\": {\n    \"cards\": [\n      \"Visa\",\n      \"Diners\",\n      \"Mastercard\",\n      \"AmericanExpress\"\n    ],\n    \"wallets\": {\n      \"paypal\": {\n        \"allowedFundingOptions\": [\n          \"venmo\", \n          \"paylater\", \n          \"paypal\"\n        ],\n        \"merchantId\": \"paypal-merchant-123\"\n      },\n      \"googlePay\": {\n        \"merchantId\": \"googlepay-merchant-id\",\n        \"gatewayMerchantId\": \"gateway-merchant-id\",\n        \"merchantName\": \"Your Store Name\"\n      },\n      \"applepay\": {}\n    }\n  },\n  \"restrictions\": {\n    \"card\": {\n      \"ownerTypes\": [\"Consumer\"],\n      \"fundingSources\": [\"Credit\", \"Debit\"]\n    }\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string (UUID)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The unique identifier for the newly-created session."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["The HMAC key generated for securing session communications."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["A key used for encrypting sensitive session data during communication."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionExpiry"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The timestamp indicating when the session will expire, in ISO 8601 format."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"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":{"align":"left"},"children":["Details about the funding types allowed for this session.",{"$$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":["cards"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["wallets"]}]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.cards"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["array of strings or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The list of supported card schemes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes.wallets"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["array of strings or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The list of supported wallets."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["restrictions"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["object or null"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Optional card restrictions for frontend validation returned from the session.",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},"The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["restrictions"]}," object contains:",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.ownerTypes"]},": Array of allowed owner types (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Corporate"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Consumer"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card.fundingSources"]},": Array of allowed funding sources (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Prepaid"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Credit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Debit"]},")"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"step-5-initialise-the-sdk","__idx":7},"children":["Step 5: Initialise the SDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To initialise the SDK, you then need to pass this session data back to your Android application."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You'll also need to provide details about the environment you're using, your owner ID and type, the transaction data, and optionally provide shopper and shipping address data dynamically."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["First, set up your environment configuration in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gradle.properties"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"properties","header":{"controls":{"copy":{}}},"source":"# PXP Checkout Environment Configuration\n# Test Environment URLs\nPXP_BASE_URL_TEST=https://api-services.test.pxp.io\nPXP_BASE_URL_TEST_DEBUG=https://api-services.test.pxp.io\n\n# Live Environment URLs\nPXP_BASE_URL_LIVE=https://api-services.pxp.io\nPXP_BASE_URL_LIVE_DEBUG=https://api-services.pxp.io\n\n# PayPal Configuration (if using PayPal component)\nPXP_PAYPAL_CLIENT_ID_TEST=your-test-paypal-client-id\nPXP_PAYPAL_CLIENT_ID_LIVE=your-live-paypal-client-id\nPXP_PAYPAL_LOGIN_RETURN_URL_TEST=https://your-test-domain.com/oauth/callback\nPXP_PAYPAL_LOGIN_RETURN_URL_LIVE=https://your-production-domain.com/oauth/callback\n","lang":"properties"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PXP_BASE_URL_TEST"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PXP_BASE_URL_LIVE"]}," are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["required"]},". The build will fail if these are not provided. PayPal variables are only required if you're using the PayPal component."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-proguardr8","__idx":8},"children":["Configure ProGuard/R8"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The SDK includes consumer ProGuard rules that are automatically applied to your project. However, for release builds, ensure ProGuard/R8 is enabled in your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/build.gradle"]},":"]},{"$$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":"p","attributes":{},"children":["The SDK automatically preserves all necessary classes. If you encounter issues, you can add these rules to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/proguard-rules.pro"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"proguard","header":{"controls":{"copy":{}}},"source":"# Keep PXP SDK classes\n-keep class com.pxp.checkout.** { *; }\n\n# Keep Google Pay SDK classes\n-keep class com.google.android.gms.wallet.** { *; }\n\n# Keep Kount SDK classes (fraud detection)\n-keep class com.kount.** { *; }\n-dontwarn com.kount.**\n","lang":"proguard"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configure-google-pay-if-using-google-pay-component","__idx":9},"children":["Configure Google Pay (if using Google Pay component)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you're using the Google Pay component, add this meta-data to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AndroidManifest.xml"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<application>\n    <!-- Your application configuration -->\n    \n    <!-- Google Pay API Configuration -->\n    <meta-data\n        android:name=\"com.google.android.gms.wallet.api.enabled\"\n        android:value=\"true\" />\n</application>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then initialise the SDK in your Android application:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.PxpCheckout\nimport com.pxp.checkout.components.cardnumber.CardNumberComponent\nimport com.pxp.checkout.components.cardnumber.CardNumberComponentConfig\nimport com.pxp.checkout.models.*\nimport com.pxp.checkout.services.models.transaction.Shopper\nimport com.pxp.checkout.types.ComponentType\nimport androidx.compose.foundation.layout.*\nimport androidx.compose.runtime.*\nimport androidx.compose.ui.Modifier\nimport androidx.compose.ui.unit.dp\nimport java.util.*\n\n@Composable\nfun PaymentScreen() {\n    var pxpCheckout by remember { mutableStateOf<PxpCheckout?>(null) }\n    var cardNumberComponent by remember { mutableStateOf<CardNumberComponent?>(null) }\n\n    LaunchedEffect(Unit) {\n        // Initialise the SDK\n        pxpCheckout = initializeSDK()\n    }\n\n    LaunchedEffect(pxpCheckout) {\n        pxpCheckout?.let { checkout ->\n            // Create components after SDK is initialised\n            cardNumberComponent = checkout.createComponent(\n                type = ComponentType.CARD_NUMBER,\n                config = CardNumberComponentConfig(isRequired = true)\n            )\n        }\n    }\n\n    Column(\n        modifier = Modifier\n            .fillMaxWidth()\n            .padding(16.dp)\n    ) {\n        // Render the card number component\n        cardNumberComponent?.Content()\n    }\n}\n\nsuspend fun initializeSDK(): PxpCheckout {\n    // 1. Get the session data from your backend\n    val sessionData: SessionConfig = fetchSessionFromBackend()\n\n    // 2. Initialise the SDK using the builder pattern\n    return PxpCheckout.builder()\n        .withConfig(\n            PxpSdkConfig(\n                environment = Environment.TEST,\n                session = sessionData,\n                ownerId = \"your-owner-id\",\n                ownerType = \"MerchantGroup\",\n                transactionData = TransactionData(\n                    amount = 25.00,\n                    currency = \"USD\",\n                    entryType = EntryType.Ecom,\n                    intent = TransactionIntentData(\n                        card = IntentType.Authorisation,\n                        paypal = IntentType.Purchase\n                    ),\n                    merchant = \"your-merchant-id\",\n                    merchantTransactionId = UUID.randomUUID().toString(),\n                    merchantTransactionDate = { \n                        // Return ISO 8601 formatted date string\n                        java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\", java.util.Locale.US)\n                            .apply { timeZone = java.util.TimeZone.getTimeZone(\"UTC\") }\n                            .format(Date())\n                    }\n                ),\n                kountDisabled = false, // OPTIONAL: Set to true to disable Kount fraud detection\n                // OPTIONAL: Provide shopper data dynamically\n                onGetShopper = {\n                    Shopper(\n                        id = \"shopper-123\",\n                        email = \"customer@example.com\",\n                        firstName = \"John\",\n                        lastName = \"Doe\",\n                        phoneNumber = \"+1-555-0123\"\n                    )\n                },\n                // OPTIONAL: Provide shipping address dynamically\n                onGetShippingAddress = {\n                    ShippingAddress(\n                        addressLine1 = \"123 Main Street\",\n                        addressLine2 = \"Apt 4B\",\n                        city = \"New York\",\n                        state = \"NY\",\n                        postalCode = \"10001\",\n                        countryCode = \"US\"\n                    )\n                },\n                // OPTIONAL: Restrict accepted card types for frontend validation\n                restrictions = Restrictions(\n                    card = RestrictionsCard(\n                        ownerTypes = listOf(RestrictionOwnerType.CONSUMER),\n                        fundingSources = listOf(RestrictionFundingSource.CREDIT, RestrictionFundingSource.DEBIT)\n                    )\n                ),\n                // OPTIONAL: PayPal payout configuration (if using PayPal payouts)\n                paypalConfig = PaypalConfig(\n                    payout = PayoutConfig(\n                        paypalWallet = PayPalPayOutWalletConfig(\n                            email = \"recipient@example.com\",\n                            payerId = \"PAYER123\"\n                        ),\n                        venmoWallet = VenmoPayOutWalletConfig(\n                            recipientType = VenmoRecipientType.EMAIL,\n                            receiver = \"recipient@example.com\"\n                        ),\n                        proceedPayoutWithSdk = true\n                    )\n                )\n            )\n        )\n        .withContext(getApplicationContext())\n        .build()\n}\n\n// Fetch session from your backend\nsuspend fun fetchSessionFromBackend(): SessionConfig {\n    // Make API call to your backend to get session data\n    // Your backend should call the PXP Sessions API\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\",\n        encryptionKey = \"encryption-key-from-backend\",\n        locale = \"en-US\",\n        allowedFundingTypes = AllowedFundingTypes(\n            cards = listOf(\"Visa\", \"Mastercard\", \"AmericanExpress\"),\n            wallets = WalletsConfig(\n                paypal = PayPalWalletConfig(\n                    allowedFundingOptions = listOf(\"paypal\", \"paylater\", \"venmo\")\n                ),\n                googlePay = GooglePayWalletConfig()\n            )\n        ),\n        restrictions = Restrictions(\n            card = RestrictionsCard(\n                ownerTypes = listOf(RestrictionOwnerType.CONSUMER),\n                fundingSources = listOf(RestrictionFundingSource.CREDIT, RestrictionFundingSource.DEBIT)\n            )\n        )\n    )\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuration-parameters","__idx":10},"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":["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 checkout session. This is a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SessionConfig"]}," object containing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hmacKey"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionKey"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sessionExpiry"]},", and optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowedFundingTypes"]},". Get this from your backend by calling the Sessions API (see Step 4)."]}]},{"$$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 transaction."]}]},{"$$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 transaction amount as a Double (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["25.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 transaction, 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 transaction. 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 transaction.",{"$$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":["EntryType.Ecom"]}," - E-commerce transactions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EntryType.Moto"]}," - Mail order/telephone order"]}]}]}]},{"$$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 each payment method."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.intent.card"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["IntentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent for card transactions.",{"$$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":["IntentType.Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentType.EstimatedAuthorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentType.Purchase"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentType.Payout"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentType.Verification"]}]}]},"Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/card/how-it-works#supported-transaction-intents"},"children":["card intents"]},"."]}]},{"$$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":["IntentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The intent for PayPal transactions.",{"$$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":["IntentType.Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IntentType.Purchase"]}]}]},"Learn more about ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/how-it-works#supported-transaction-intents"},"children":["PayPal intents"]},"."]}]},{"$$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":["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":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShippingAddress"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["() -> ShippingAddress?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional callback function to provide shipping address data dynamically. Returns a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ShippingAddress"]}," object with current shipping address information."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["restrictions"]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Details","attributes":{},"children":["Restrictions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional card restrictions for frontend validation. Restricts what card types are accepted in the new card component.",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},"The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Restrictions"]}," object contains:",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["card: RestrictionsCard?"]}," - Card-specific restrictions"]}]},"The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionsCard"]}," object contains:",{"$$mdtype":"Tag","name":"Break","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ownerTypes: List<RestrictionOwnerType>?"]}," - Allowed card owner segments. Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionOwnerType.CORPORATE"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionOwnerType.CONSUMER"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fundingSources: List<RestrictionFundingSource>?"]}," - Allowed funding sources. Possible values: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionFundingSource.PREPAID"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionFundingSource.CREDIT"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestrictionFundingSource.DEBIT"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":["If restrictions are specified in both the session (via Sessions API) and the SDK config, they are merged using a union approach: session restrictions come first, followed by SDK-only values. If a restriction axis is empty after merging, it becomes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"."]}]}]},{"$$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":["Optional PayPal configuration for payout operations. Contains wallet configurations for PayPal and Venmo payouts. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/how-it-works"},"children":["PayPal payouts documentation"]}," for details."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting-installation","__idx":11},"children":["Troubleshooting installation"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"build-fails-with-pxp_base_url_test-must-be-provided","__idx":12},"children":["Build fails with \"PXP_BASE_URL_TEST must be provided\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause"]},": Required environment variables are missing from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gradle.properties"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution"]},": Ensure your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gradle.properties"]}," file contains all required variables:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"properties","header":{"controls":{"copy":{}}},"source":"PXP_BASE_URL_TEST=https://api-services.test.pxp.io\nPXP_BASE_URL_LIVE=https://api-services.pxp.io\n","lang":"properties"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"app-crashes-after-proguard-obfuscation","__idx":13},"children":["App crashes after ProGuard obfuscation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause"]},": ProGuard rules are not properly configured."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution"]},": The SDK includes consumer ProGuard rules that should be automatically applied. If issues persist, add the rules manually to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/proguard-rules.pro"]}," (see ProGuard configuration section above)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"class-not-found-errors-for-sdk-classes","__idx":14},"children":["\"Class not found\" errors for SDK classes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause"]},": The AAR file is not properly included, or the module dependency is not configured correctly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For AAR installation: Verify the file is in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/libs/"]}," and the dependency is added to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["build.gradle"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For source code integration: Ensure the module is properly imported and added as a dependency"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sync your Gradle project: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File > Sync Project with Gradle Files"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"compose-compiler-version-mismatch","__idx":15},"children":["Compose compiler version mismatch"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause"]},": Kotlin version doesn't match Compose compiler version."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution"]},": Ensure your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["build.gradle"]}," has:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"composeOptions {\n    kotlinCompilerExtensionVersion '1.5.8'\n}\n","lang":"gradle"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"google-pay-not-working","__idx":16},"children":["Google Pay not working"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Cause"]},": Missing Google Pay meta-data or Google Play Services."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Solution"]},":"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the Google Pay meta-data to your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AndroidManifest.xml"]}," (see configuration section above)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure Google Play Services is installed on the device"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["For testing, use a device with a Google account and at least one payment method configured"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":17},"children":["Next steps"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Now that you've installed and initialised the SDK, you're ready to start integrating payment components:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/card/implementation"},"children":["Card payments"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/google-pay/implementation"},"children":["Google Pay"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/implementation"},"children":["PayPal"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/checkout/components/android/paypal/payouts/how-it-works"},"children":["PayPal Payouts"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That's it! You've successfully installed the PXP Checkout SDK and created your first component. The SDK is now ready to use in your Android application."]}]}]},"headings":[{"value":"Install the Android SDK","id":"install-the-android-sdk","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":"Step 2: Add the required permissions","id":"step-2-add-the-required-permissions","depth":3},{"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":"Step 5: Initialise the SDK","id":"step-5-initialise-the-sdk","depth":2},{"value":"Configure ProGuard/R8","id":"configure-proguardr8","depth":3},{"value":"Configure Google Pay (if using Google Pay component)","id":"configure-google-pay-if-using-google-pay-component","depth":3},{"value":"Configuration parameters","id":"configuration-parameters","depth":3},{"value":"Troubleshooting installation","id":"troubleshooting-installation","depth":2},{"value":"Build fails with \"PXP_BASE_URL_TEST must be provided\"","id":"build-fails-with-pxp_base_url_test-must-be-provided","depth":3},{"value":"App crashes after ProGuard obfuscation","id":"app-crashes-after-proguard-obfuscation","depth":3},{"value":"\"Class not found\" errors for SDK classes","id":"class-not-found-errors-for-sdk-classes","depth":3},{"value":"Compose compiler version mismatch","id":"compose-compiler-version-mismatch","depth":3},{"value":"Google Pay not working","id":"google-pay-not-working","depth":3},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"seo":{"title":"Install the Android SDK"}},"lastModified":"2026-05-19T10:00:02.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/install","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}