PayPal Developer Logo
  • Docs
    OnlineIn-PersonMultiparty3rd-PartyPayoutsDisputesReportsIdentityDocs Archive
  • APIs & SDKs
    REST APIsJavaScript SDKNVP/SOAP APIsDonate SDKBraintree GraphQL API
  • Tools
    Integration BuilderSandbox Testing GuideAPI ExecutorDemo PortalCredit Card GeneratorAPI Status
  • Support
Log in to Dashboard
    Log in to Dashboard
    REST APIs
    Get Started
    Authentication
    Postman Guide
    Requests
    Responses
    Core Resources
    Overview
    Add Tracking
    Catalog Products
    Disputes
    Identity
    Invoicing
    Orders
    Partner Referrals
    Payment Experience
    Payment Method Tokens
    Payments
    Payouts
    Referenced Payouts
    Subscriptions
    Transaction Search
    Webhooks Management
    Webhooks
    Overview
    Webhook event names
    Webhooks Events dashboard
    Webhooks simulator
    Integration
    Sandbox
    Overview
    Accounts
    Bulk Accounts
    Card testing
    Negative Testing
      Test Values
      Request Headers
    Go Live
    Production Environment
    PayPal Application Guidelines
    PayPal Security Guidelines
    Rate Limiting Guidelines
    Idempotency
    Reference
    Currency Codes
    Country Codes
    State & Province Codes
    Locale codes
    Deprecated Resources
    Overview
    Billing Agreements
    Billing Plans
    Invoicing v1
    Orders v1
    Partner Referrals v1
    Payments v1

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:

  • Test values
  • Request headers
Reference
PayPal.com
Privacy
Support
Legal
Contact