Checkout with PayPal is a one-time payment checkout experience that gives you more control over the entire checkout process. It offers a streamlined checkout flow that keeps customers local to your website during the payment authorization process.
Unlike the Vault flow, Checkout with PayPal does not provide the ability to store a customer's PayPal account in the Vault. If you want to store a customer’s PayPal account within a Vault during Checkout, view the Checkout with Vault integration guide. However, if you are located in a country that supports PayPal One Touch™, your customer can make repeat purchases without re-entering their user credentials after their initial purchase.
Checkout with PayPal supports the following features:
- Select or add shipping addresses in the PayPal account
- Select or add funding instruments in the PayPal account
- Two factor authentication support (currently only for US, UK, CA, DE, AT, and AU)
Typical use cases for the Checkout With PayPal flow:
- Checkout from Cart/Product pages
- Checkout page replacement
To invoke Express Checkout you must ensure
currency are passed in your client options.
If you are using an Activity and your Activity's launch mode is
singleInstance you will also need to override
onShippingChange function from the PayPal JS SDK setup method to listen for shipping changes that occur within the PayPal pop-up; then, use the
updatePayment , part of the Braintree JS SDK's
paypalCheckoutInstance, to update the PayPal checkout flow with modified order line items or shipping options. Note that
updatePayment replaces use of
paypalCheckoutInstance in the
onApprove function of the PayPal JS SDK setup method to tokenize the PayPal account. After the customer completes the consent flow and the PayPal pop-up closes, successful tokenization will return a payment method nonce.
Send the nonce to your server and use a Braintree server SDK to call
Transaction.sale to create a transaction.
The currency of the transaction is presented to the customer in the Checkout with PayPal flow. We support all currencies that PayPal REST APIs support.
See the server-side section for details on charging a transaction in a specific currency.