Express Checkout - Braintree SDK

Get Started

availability

Express Checkout via Braintree SDK is available to merchants domiciled in more than 85 countries across the world. Check if your country is supported.

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 method details
  • 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 token

A client token is a signed data blob that includes configuration and authorization information required by the Braintree client SDK. These should not be reused; a new client token should be generated for each request that's sent to Braintree. For security, we will revoke client tokens if they are reused excessively within a short time period.

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. If this succeeds, the client will generate a payment method nonce.

Payment method nonce

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 method details that were 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.

note

Payment method nonces expire after 3 hours.

How it works

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 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 Braintree functions.

Credentials

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.
availability

You will only be able to link sandbox business test accounts in certain countries. Check if your country is supported for sandbox testing.

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

Next: Set Up Your Client →

Still Have Questions?

Browse our support options or submit a question to our technical support team.