Get Startedanchor

Express Checkout offers a streamlined checkout flow that keeps customers on your website throughout the payment authorization process and minimizes the number of steps your customers must complete when they check out. It's designed for merchants who don't have a merchant account for processing credit card payments directly.

Customers can select a shipping address and funding instrument when using Express Checkout. Once they authorize the transaction to be processed by PayPal, the checkout window overlay will disappear, and your site will be brought back up to finalize the order.

XO-w-PP-flow

The Braintree SDKs allow you to accept payments and provide an optimal checkout experience for your customers with one simple developer integration:

  • The client SDKs enable you to collect payment information
  • The server SDKs manage all requests to PayPal

Before we get started, there are two key concepts to introduce: the client token and the payment method nonce.

Client tokenanchor

A client token is a signed JWT that includes configuration and authorization information required by the Braintree client SDK.

Your server is responsible for generating the client token, which contains all of the necessary configuration information to set up the client SDKs. When your server provides a client token to your client, it authenticates the application to communicate directly to Braintree.

Your client is responsible for obtaining the client token from your server and initializing the client SDK.

Client tokens are valid for up to 24 hours. If the client token includes a customer ID and creates an excessive number of payment methods, it will be invalidated.

Payment method nonceanchor

The payment method nonce is a string returned by the client SDK to represent a payment method. This string is a reference to the customer payment information that was provided in your payment form and should be sent to your server where it can be used with the server SDKs to create a new transaction request.

notePayment method nonces expire after 3 hours.

How it worksanchor

Overview of Client / Server interaction

  1. Your app or web front-end requests a client token from your server in order to initialize the client SDK
  2. Your server generates and sends a client token back to your client with the server SDK
  3. Once the client SDK is initialized and the customer has submitted payment information, the SDK communicates that information to Braintree, which returns a payment method nonce
  4. You then send the payment method nonce to your server
  5. Your server code receives the payment method nonce from your client and then uses the server SDK to create a transaction or perform other functions.

Credentialsanchor

Your sandbox credentials can be found on your My Apps & Credentials page in your PayPal Developer Dashboard.

To obtain your Braintree sandbox credentials:

  1. Go to Sandbox Accounts and create a sandbox business test account.
  2. Go to My Apps & Credentials and generate a Braintree sandbox credential and link it to your PayPal sandbox test account.
  3. Repeat these steps for each country you want to test in.

Once you're ready to go live, be sure to switch from your sandbox credentials to production.


Next Page: Set Up Your Client