Last updated: October 14, 2026
Complete these core setup steps one time, then integrate the payment methods you need.
You'll need the following before integrating the SDK:
The SDK ships as per-feature modules. Add only what you use. Every feature module includes CorePayments transitively. Add fraud-protection, which provides device data used to reduce declines, plus the module for each payment method you integrate.
Replace X.Y.Z with the current v3 release:
dependencies {
implementation 'com.paypal.android:fraud-protection:X.Y.Z' // device data (risk signals)
// Add the module(s) for the method(s) you integrate:
implementation 'com.paypal.android:paypal-payments:X.Y.Z' // PayPal Checkout + Vault
implementation 'com.paypal.android:payment-buttons:X.Y.Z' // PayPal buttons
// implementation 'com.paypal.android:card-payments:X.Y.Z' // Card (ACDC)
}You build every client (PayPalClient, CardClient) from a single CoreConfig. No network calls occur at initialization.
Replace <YOUR_CLIENT_ID> and <YOUR_MERCHANT_ID> with your actual values:
val config = CoreConfig(
clientId = "<YOUR_CLIENT_ID>",
merchantId = "<YOUR_MERCHANT_ID>", // Required: encrypted merchant account ID, no default
coreEnvironment = CoreEnvironment.SANDBOX, // CoreEnvironment.LIVE for production
bnCode = null // Partner integrations only
)Reuse this config across every method client. Switch CoreEnvironment.SANDBOX to CoreEnvironment.LIVE for production.
PayPal checkout sends the buyer to the PayPal app, or an in-app browser, and back to your app through an Android App Link. Register the App Link on the activity that handles the return. A single intent filter can handle both the return and cancel URLs when they share the same domain and path prefix:
<activity android:name=".CheckoutActivity" android:exported="true" android:launchMode="singleTop">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="example.com" android:pathPrefix="/merchant-app" />
</intent-filter>
</activity>App Switch also supports a custom URL scheme if the App Link fails. The SDK requires either returnAppUrl or fallbackSchemeUrl. Register both to ensure the buyer can return to your app.
Register the fallback scheme separately:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="merchantapp" />
</intent-filter>Define the matching URL config one time to pass to each method's session or checkout call:
val urlConfig = ReturnToAppUrlConfig(
returnAppUrl = "https://example.com/merchant-app/return",
cancelAppUrl = "https://example.com/merchant-app/cancel",
fallbackSchemeUrl = "merchantapp://return" // Recommended: at least one of returnAppUrl / fallbackSchemeUrl must be non-blank
)Before testing, confirm that you configured your App Links correctly so PayPal can return the buyer to your app:
android:autoVerify="true" attribute/.well-known/assetlinks.json with your app's SHA-256 fingerprintCard (ACDC) does not require App Links.
Integrate a payment method: