REST APIs
    Get Started with PayPal REST APIs
    Authentication
    Postman Guide
    API requests
    API responses
    Core Resources
    Overview
    API Integration
    Release Notes
    Orders
    Orders sdkV2
    Payments
    Payments sdkV2
    Payment Method Tokens
    Payment Method Tokens sdkV3
    Add Tracking
    Catalog Products
    Disputes
    Identity
    Invoicing
    Partner Referrals
    Payment Experience
    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
    Codespaces
    PayPal for Visual Studio Code
    Negative Testing
      Test Values
      Request Headers
    Go Live
    Production Environment
    PayPal Application Guidelines
    PayPal Security Guidelines
    Rate Limiting Guidelines
    Idempotency
    Troubleshooting
    Not authorized
    Resource not found
    Unprocessable entity
    Validation error
    Reference
    Currency Codes
    Country Codes
    State & Province Codes
    Locale codes
    Deprecated Resources
    Deprecated resources
    Billing Agreements
    Billing Plans
    Invoicing v1
    Orders v1
    Partner Referrals v1
    Payments v1

Simulate negative responses with test values

Note:If you do not use the specific test values, the service returns the actual API responses.

You can use the test values-based method to test these APIs:

  • Disputes
  • Invoicing
  • Payouts
  • Subscriptions

Set up your development environment

Before you can use test values to simulate negative responses, you must set up your development environment. After you get a token that lets you access protected REST API resources, you create sandbox accounts to test your web and mobile apps. For details, see Get started.

Then, return to this page to use test values to simulate negative responses.

Invoke negative testing

1.Set the test values in the request field.
2.Send your request to the endpoint you'd like to test.

Note:Test values are case sensitive.

Example request

To trigger the SENDER_EMAIL_UNCONFIRMED simulation response, set the items[0]/note value to ERRPYO002 in the POST v1/payments/payouts call.
1curl -X POST https://api-m.sandbox.paypal.com/v1/payments/payouts -H "content-type: application/json" -H "Authorization: Bearer <Access-Token>" -d '{
2 "sender_batch_header": {
3 "sender_batch_id": "1524086406556",
4 "email_subject": "This email is related to simulation"
5 },
6 "items": [
7 {
8 "recipient_type": "EMAIL",
9 "receiver": "payouts-simulator-receiver@paypal.com",
10 "note": "ERRPYO002",
11 "sender_item_id": "15240864065560",
12 "amount": {
13 "currency": "USD",
14 "value": "1.00"
15 }
16 }]
17}'

Example response

1{
2 "name": "SENDER_EMAIL_UNCONFIRMED",
3 "message": "Authorization error occurred",
4 "debug_id": "ca787bdf80d7a",
5 "information_link": "/docs/api/payments.payouts-batch/v1/#errors"
6}

For negative case payouts test codes, see test values.

Reference
PayPal.com
Privacy
Support
Legal
Contact