---
title: Install and set up
description: Add the PayPal Mobile SDK for iOS, initialize CoreConfig, and
  register your return links.
badges:
  - type: neutral
    text: Mobile SDK v3
---

# Install and set up (/sdk/ios/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/).
* Universal Links configured for your return URL before testing.
* Xcode 15+, iOS 16+, Swift 5.9+.

## 1. Add the SDK [#1-add-the-sdk]

The SDK ships as per-feature products. Add only what you use. Add `FraudProtection`, which provides device data used to reduce declines, plus the product for each payment method you integrate. With CocoaPods:

```ruby
# Podfile
pod 'PayPal/CorePayments'
pod 'PayPal/FraudProtection'      # device data (risk signals)

# Add the product(s) for the method(s) you integrate:
pod 'PayPal/PayPalPayments'       # PayPal Checkout + Vault
pod 'PayPal/PaymentButtons'       # PayPal buttons
# pod 'PayPal/CardPayments'       # Card (ACDC)
```

Or add the `paypal-ios` Swift Package and include the matching products.

## 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:

```swift
let config = CoreConfig(
    clientID:    "<YOUR_CLIENT_ID>",
    environment: .sandbox,               // .live for production
    merchantID:  "<YOUR_MERCHANT_ID>",   // Required, encrypted merchant account ID
    bnCode:      nil                     // Partner integrations only
)
```

Reuse this `config` across every method client. Switch `.sandbox` to `.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 a Universal Link. In **App Target › Signing & Capabilities › Associated Domains**, add `applinks:example.com` and serve your AASA file at `https://example.com/.well-known/apple-app-site-association`. One domain covers both your return and cancel URLs.

Register the custom-scheme fallback under `CFBundleURLTypes`, and declare the PayPal app scheme under `LSApplicationQueriesSchemes` so the SDK can detect it. `fallbackSchemeURL` is optional on `PayPalURLConfig`, but set it regardless. Without it, a buyer whose Universal Link fails to open your app has no way back to checkout:

```xml
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array><string>merchantapp</string></array>
    </dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>paypal</string>
</array>
```

Define the matching URL config one time to pass to each method's session or checkout call:

```swift
let urlConfig = PayPalURLConfig(
    returnAppURL:      URL(string: "https://example.com/merchant-app/return")!,
    cancelAppURL:      URL(string: "https://example.com/merchant-app/cancel")!,
    fallbackSchemeURL: URL(string: "merchantapp://return")   // Optional; see note above
)
```

> **Info:** Card (ACDC) does not require Associated Domains or custom-scheme registration.

## Next steps [#next-steps]

Integrate a payment method:

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