invoicing

Invoicing Prerequisites

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. 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 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:

  1. Set the access privileges of the access token to the invoicing scope:

    scope="openid https://uri.paypal.com/services/invoicing"
  2. Pass the scope values in a URL encoded, space-separated, case-sensitive list when you integrate with Log In with PayPal.

  3. 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.

Next

You can try the Invoicing Quick Start or continue to Create and Send Invoices.

Feedback