Last updated: Sept 24th, 12:48am
Important: Negative testing in the sandbox is in beta.
Negative testing lets you force the flows through specific error conditions that you want to test to ensure you handle errors correctly. Use negative testing to trigger the following types of errors:
DoDirectPayment
operation, which relate to verification and credit card validation errors.You can force two types of API errors: errors related to the transaction amount, and errors not related to the transaction amount.
Negative testing is only available for use with the following:
The sandbox is now in the negative testing state for transactions that include the merchant. Without this configuration, the sandbox does not raise error conditions unless the error occurs through normal transaction processing.
In the PayPal sandbox, you can pass inputs to simulate scenarios that mimic the actual API responses without calling downstream services.
You can use the following methods to conduct negative testing in the sandbox: