Negative Test REST APIs

Note: Negative testing is available in the sandbox. You cannot force or simulate error conditions in the live PayPal environment.

Important: Negative testing in the sandbox is in beta and might have bugs or issues.

To ensure that you handle error scenarios correctly, negative testing lets you force flows through specific error conditions.

Testing methods

The PayPal sandbox environment enables you to pass inputs in your request to trigger simulated error scenarios and positive scenarios. You can handle these responses in your own code to manage your customer's experience. The simulated responses mimic the actual API responses without calling downstream services.

Currently, you can use two methods to trigger simulated negative responses in the sandbox.


Have feedback?

Let us know.