Get started with mobile payment libraries

Important: Adaptive Payments is not available for new integrations. PayPal provides this documentation to support existing integrations.

Get up and running with this service:

Overview

The PayPal Mobile Payment Libraries (MPL) provide a secure, extensible, and scalable way to add PayPal functionality to your native mobile apps. Using MPL, you place a Pay with PayPal button in your app's payment flow, which lets customers use their PayPal accounts for payment transactions. MPL completely integrates the payment flow into your app, and customers complete their checkouts without needing to open a web view to process the payment.

Key concepts

PayPal provides MPL in native iOS and Android SDKs. Use the following download link and include the library files in your mobile app. You must add only a few lines of code to fully integrate a PayPal pay flow into your mobile app.

Note: For instructions on how to get started with the PayPal NVP/SOAP APIs, use the sandbox for testing, and move your app into production, see Apps 101.

When you call MPL from your app, your app displays a Pay with PayPal button. When clicked, a PayPal login screen launches where your customer logs in to their PayPal account. Because PayPal stores the account billing, shipping, and funding information, customers don't have to re-enter this information to purchase items through your app.

When a customer enters an MPL transaction flow, the library controls the customer's entire checkout experience from your app. Once the customer completes the payment with their PayPal account, they are returned to your mobile app.

MPL is built on PayPal's Adaptive Payments. Because of this, you can perform many of PayPal's Adaptive Payments operations with MPL, such as provide for pre-approved and chained payments in mobile apps.

The following figure outlines the basic call flow showing Android-specific calls. However, the call flow is the same no matter which environment your app supports:

Implementing Mobile Checkout MPL call sequence

In this call flow:

  1. Your application initializes the library.
  2. The library generates a Pay with PayPal button and returns the button code to add to your app.
  3. Your application sets all of the payment parameters, including the amount, currency, recipient, and any other pertinent details.
  4. When the customer clicks Pay with PayPal, the library initiates the PayPal checkout experience. The library displays a window on top of the app's Window object.
  5. After the customer completes the payment, the library returns a callback to your application with the transaction ID and status of the payment. Here, the library is still in control of the UI and has not returned control to your application.
  6. After the library flow is complete, the library returns a callback to your application indicating it is relinquishing control of the UI.

Make your first call

To begin integrating MPL into your app, download the appropriate SDK for your platform (Android or iOS), include the library components in your app, and code the MPL calls using the native language of your platform. The guides listed below detail how to make calls for each of the supported platforms:

Next steps

Learn more about the Mobile Payment Libraries, and other PayPal Mobile solutions, from the following resources: