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.
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. 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.
3. Create sandbox accounts
To create sandbox accounts:
- Navigate to the PayPal Developer Dashboard and log in with your PayPal account.
- Under Sandbox, click Accounts.
- Create these sandbox accounts:
- A merchant, or business, account.
- A customer, or personal, account.