To make REST API calls, you must create a PayPal REST app and get an access token.
If a third-party developer wants to build an app, the merchant must go through a one-time PayPal login experience to grant the third-party developer permissions.
You can use the PayPal sandbox to complete an end-to-end test of your invoicing integration, including creating, sending, managing, and paying invoices.
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.
Create sandbox accounts:
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.
Under Sandbox, click Accounts.
Then, click Create Account.
In the dialog box:
Set Account Type to Business (Merchant Account).
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.
Enter a simple, easy-to-remember password, such as
Under PayPal Balance, enter a high amount. For example,
Click Create Account.
To create your customer sandbox account, repeat these steps but in step 3a, set Account Type to Personal (Buyer Account).
3. Get third-party-permissions
If a third-party developer wants to build an app, the merchant must go through a one-time PayPal login experience to grant the third-party developer permissions. After that, the developer can call the Invoicing API in apps to create, send, and manage invoices on the merchant's behalf.
To call the Invoicing API on behalf of a merchant, you must get third-party permissions:
Set the access privileges of the access token to the invoicing scope:
scopevalues in a URL encoded, space-separated, case-sensitive list when you integrate with Log In with PayPal.
The merchant uses your app to Log In with PayPal, log in to their software, and grant you third-party permissions.
You can now call the Invoicing API on behalf of the merchant.