On this page
No Headings
Last updated: September 14, 2026
Complete these core setup steps once. Then integrate any payment method, PayPal Checkout or Card, using its guide. Each one starts from the setup here and adds only what is specific to that method.
You'll need the following before integrating 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:
# 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.
Every client (PayPalClient, CardClient) is built from a single CoreConfig. No network calls occur at initialization.
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.
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:
<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 once to pass to each method's session or checkout call:
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
)Card doesn't need return-link registration
Card (ACDC) resolves its 3D Secure challenge in-process through ASWebAuthenticationSession and needs no Associated Domains or custom-scheme registration.
With setup done, integrate a payment method: