Get started


Get started integrating PayPal Commerce Platform by getting your API credentials and sandbox account information.

Get API credentials

Your API credentials are a client ID and secret, which authenticate API requests from your account. While you're developing code, use these credentials when you test API calls in our sandbox environment. You get these credentials from a REST API app in the Developer Dashboard.

To get these credentials:

  1. Log in to the Developer Dashboard with your PayPal account.
  2. Under the DASHBOARD menu, select My Apps & Credentials.
  3. Make sure you're on the Sandbox tab to get the API credentials you'll use while you're developing code. After you test and before you go live, switch to the Live tab to get live credentials.
  4. Under the App Name column, select Default Application, which PayPal creates with a new Developer Dashboard account. Select Create App if you don't see the default app.

Step result

The Default Application page displays your API credentials, including your client ID and secret.

Exchange your API credentials for an access token

Your access token authorizes you to use the PayPal REST API server. To call a REST API in your integration, exchange your client ID and secret for an access token.

You can make the API call in any programming language. The following sections explain how to get your access token using cURL or Postman.


Copy the following code and modify it.

curl -v POST \
  -H "Accept: application/json" \
  -H "Accept-Language: en_US" \
  -d "grant_type=client_credentials"
  1. Change CLIENT_ID to your client ID.
  2. Change SECRET to your secret.


In the Postman app, complete the following:

  1. Set the verb to POST.
  2. Enter as the request URL.
  3. Select the Authorization tab.
  4. From the TYPE list, select Basic Auth.
  5. In the Username field, enter your client ID.
  6. In the Password field, enter your secret.
  7. Select the Body tab.
  8. Select the x-www-form-urlencoded option.
  9. In the KEY field, enter grant_type.
  10. In the VALUE field, enter client_credentials.
  11. Select Send.

Step result

PayPal returns an access token and the number of seconds the access token is valid. When you make calls to a REST API, include the access token in the Authorization header with the designation as Bearer. Reuse the access token until it expires.

When your token expires, call v1/oauth2/token again to request a new token.

Sample response
    "scope": " openid**",
    "access_token": "A21AAFEpH4PsADK7qSS7pSRsgzfENtu-Q1ysgEDVDESseMHBYXVJYE8ovjj68elIDy8nF26AwPhfXTIeWAZHSLIsQkSYz9ifg",
    "token_type": "Bearer",
    "app_id": "APP-80W284485P519543T",
    "expires_in": 31668,
    "nonce": "2020-04-03T15:35:36ZaYZlGvEkV4yVSz8g6bAKFoGSEzuy3CQcz3ljhibkOHg"

Get sandbox credentials

Use sandbox accounts to test purchases without affecting real money. For example, when you initiate a purchase through a sandbox account, PayPal creates a test purchase that simulates a purchase in the production environment.

To get login information:

  1. Log in to the Developer Dashboard with your PayPal account.
  2. In the Developer Dashboard, under SANDBOX, select Accounts.
  3. Under Account Name, find your personal sandbox account.
  4. Under Manage Accounts, select the (...) button for your personal account.
  5. Select View/Edit Account to display your email ID and a system-generated password.
  6. Repeat these steps for the business account.

Once you have this information and you've made API calls that move money in the sandbox environment, log into the sandbox as a merchant or a buyer. You can see money moving from the buyer's account to the merchant account to confirm the API calls are working as you expect.

Next steps

You can now use your API credentials and sandbox account information to start your integration.

Learn how to accept payments and make payments.

See also

  • REST API URLs — Learn more about the sandbox and production URLs of our REST APIs
  • PayPal sandbox — Learn more about using the PayPal sandbox to test API calls and money movement while you're developing.