checkout

Checkout Prerequisites

Before you begin your Checkout integration, make sure you complete the following tasks:

1. Make your first call

  1. Create a PayPal app. In response, PayPal generates a set of OAuth credentials.

  2. Pass the OAuth credentials in a get access token call. In response, the PayPal authorization server issues an access token that you must use for authentication when you make REST API calls.

2. Create sandbox accounts

To generate mock transactions to test your app, complete these steps twice. First, create a business account to represent the merchant in a transaction. Then, create a personal account to represent the customer in a transaction.

  1. From the Developer Portal, click Log into Dashboard and enter your PayPal business account email and password.

    Note: If you do not have a business account, click Sign Up.
  2. Under Sandbox, click Accounts. Then, click Create Account.

  3. In the dialog box, enter these required fields:

    Field Value
    Account Type Business (Merchant Account) or Personal (Buyer Account).
    Email Address A fake or valid email address. If you use a valid address, you receive email notifications when you run test transactions.
    Password A simple, easy-to-remember password, such as 12345678.
    PayPal Balance A high amount. For example, 5000.

    You can also enter optional fields.

  4. Click Create Account.

For more information, see Create a sandbox account.

3. Get REST API sandbox credentials

How to create a REST application to integrate PayPal Checkout

To authenticate with PayPal, you must create REST API credentials and add them to your script. For testing purposes, you'll add your sandbox credentials. Later, when you're ready to go live, you'll add your live credentials.

  1. From the Developer Portal Dashboard, click My Apps & Credentials.

  2. Scroll down to REST API apps, then click Create App.

  3. In the App Name box, enter a name for your app.

  4. Under Sandbox developer account, select the sandbox merchant account you created earlier to associate with your app.

    1. Click Create App to generate credentials for both the sandbox and live environments.
    2. Click the Sandbox tab, then copy your sandbox client ID.
  5. In the // Configure environment section of the script:

    1. Set env to sandbox. (The default is production.)

    2. Enter the sandbox client ID that you copied earlier.

      // Configure environment
      env: 'sandbox',
      client: {
        sandbox: 'SANDBOX_CLIENT_ID' //Enter your sandbox client ID here
      }
      

Next

Create a PayPal Checkout button with only a few lines of code.

Feedback