---
title: Install and set up
description: Add the PayPal Mobile SDK to your Android app, configure
  CoreConfig, and register your return links.
badges:
  - type: neutral
    text: Mobile SDK v3
---

# Install and set up (/sdk/android/install-and-setup)



Complete these core setup steps one time, then integrate the payment methods you need.

## Prerequisites [#prerequisites]

You'll need the following before integrating the SDK:

* A PayPal developer account, a client ID, and your merchant ID from the [PayPal Developer Dashboard](/dashboard/).
* A server-side integration that can create and capture orders with the [Orders v2 API](/api/orders/v2/). For vault flows, your server must create setup tokens and payment tokens with the [Payment Method Tokens v3 API](/api/payment-tokens/v3/).
* App Links configured for your return URL before testing HTTPS with domain verification.
* Android Studio targeting Android SDK 23+.

## 1. Add the SDK [#1-add-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:

```groovy
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)
}
```

## 2. Initialize CoreConfig [#2-initialize-coreconfig]

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:

```kotlin
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.

## 3. Register your return links [#3-register-your-return-links]

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:

```xml
<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:

```xml
<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:

```kotlin
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
)
```

### Verification checklist [#verification-checklist]

Before testing, confirm that you configured your App Links correctly so PayPal can return the buyer to your app:

* you set the `android:autoVerify="true"` attribute
* your domain serves a valid `/.well-known/assetlinks.json` with your app's SHA-256 fingerprint
* the buyer has *Open supported links* enabled. If Android cannot verify the App Link, Android opens the return in a browser and checkout still completes through the in-browser path.

> **Info:** Card (ACDC) does not require App Links.

## Next steps [#next-steps]

Integrate a payment method:

* [PayPal Checkout](/sdk/android/add-payment-methods/paypal-checkout): one-time checkout, save payment methods with or without purchase, Pay Later, and PayPal Credit.
* [Card (ACDC)](/sdk/android/add-payment-methods/card): card payments and saving cards.
