checkout

Checkout Prerequisites

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

1. Make your first call

To make REST API calls, create a PayPal REST app and get an access token:

1. Create a PayPal app.
When you create an app, PayPal generates a set of OAuth credentials.
2. Get an access token.
Pass the OAuth credentials in a get access token call.
In response, the PayPal authorization server issues an access token.
3. Make REST API calls.
Use the access token for authentication when you make REST API calls.

2. Create sandbox accounts

Create sandbox accounts:

  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:

    1. Set Account Type to Business (Merchant Account).

    2. Enter an email address.

      Tip: You can use a fake or valid email address. If you use a valid address, you receive email notifications when you run test transactions.
    3. Enter a simple, easy-to-remember password, such as 12345678.

    4. Under PayPal Balance, enter a high amount. For example, 5000.

    5. Click Create Account.

  4. To create your customer sandbox account, repeat these steps but in step 3a, set Account Type to Personal (Buyer 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