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.
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.
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.
|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.|
Create a PayPal app. In response, PayPal generates a set of OAuth credentials.
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.
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, 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
PayPal Balance A high amount. For example,
You can also enter optional fields.
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.
- Click Log In to log in to your PayPal account.
- Create a PayPal payment.
- To approve the payment, enter the email address and password for your buyer account.
- Execute the payment.
- 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.