Test Payments

PayPal provides a sandbox environment for you to test functionality. You can create sandbox accounts, view account notifications, view REST API calls, view webhook events, and simulate IPNs.

The Sandbox API Calls dashboard lists REST API calls that are tied to your sandbox account. The Live API Calls dashboard lists REST API calls in the live environment.

Use the dashboards to view the REST API call history for a specific app or all apps. Both dashboards list the REST API calls made by apps with related details. You can view the request and response messages of some REST API calls.

Integration steps

Important: You cannot run the following sample requests as-is. Replace all call-specific parameter values, such as tokens and IDs, with your own values.

Step Required Description
1. Optional To make calls on behalf of a third party, you must be a partner in the PayPal Partner Program.
2. Required Get an access token.
3. Required Create sandbox accounts.
4. Required Test PayPal payments.

Get an access token

  1. Create a PayPal app. In response, PayPal generates a set of OAuth credentials.

  2. Pass the OAuth credentials in a get access token call. In response, the PayPal authorization server issues an access token that you must use for authentication when you make REST API calls.

Create sandbox accounts

To generate mock transactions to test your app, complete these steps twice. First, create a business account to represent the merchant in a transaction. Then, create a personal account to represent the customer in a transaction.

  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, enter these required fields:

    Field Value
    Account Type Business (Merchant Account) or Personal (Buyer Account).
    Email Address A fake or valid email address. If you use a valid address, you receive email notifications when you run test transactions.
    Password A simple, easy-to-remember password, such as 12345678.
    PayPal Balance A high amount. For example, 5000.

    You can also enter optional fields.

  4. Click Create Account.

For more information, see Create a sandbox account.

Test PayPal payments

To test PayPal payments, you must be able to see transactions from the perspective of the buyer.

  1. Click Log In to log in to your PayPal account.
  2. Create a PayPal payment.
  3. To approve the payment, enter the email address and password for your buyer account.
  4. Execute the payment.
  5. To review the details of the completed payment, log in to your buyer account on the sandbox site.

For more information about PayPal payments, see accept PayPal payments.

Additional information

Feedback