Negative test REST APIs
To ensure you handle errors correctly, use negative testing to force flows through specific error conditions.
Negative testing is available in the sandbox. You can't 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.
Test methods
In the PayPal sandbox, you can pass inputs to simulate error scenarios and positive scenarios that mimic the actual API responses without calling downstream services.
You can use these methods to simulate negative responses in the sandbox: