Test Values

Overview

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 the following Payouts API methods:

Prerequisites

Before you trigger the simulator, you must create a PayPal REST app and get an access token:

1. Create a PayPal app.
When you create an app, PayPal generates a set of OAuth credentials.
2. Get an access token.
Pass the OAuth credentials in a get access token call.
In response, the PayPal authorization server issues an access token.
3. Make REST API calls.
Use the access token for authentication when you make REST API calls.

Invoke negative testing

1. Set the specific 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

At POST v1/payments/payouts, set ERRPYO002 as the value for the items[0]/note field to trigger the SENDER_EMAIL_UNCONFIRMED simulation response.

curl -X POST https://api.sandbox.paypal.com/v1/payments/payouts \
  -H "content-type: application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{
  "sender_batch_header": {
    "sender_batch_id": "1524086406556",
    "email_subject": "This email is related to simulation"
  },
  "items": [
  {
    "recipient_type": "EMAIL",
    "receiver": "payouts-simulator-receiver@paypal.com",
    "note": "ERRPYO002",
    "sender_item_id": "15240864065560",
    "amount": {
      "currency": "USD",
      "value": "1.00"
    }
  }]
}'

Example response

{
  "name": "SENDER_EMAIL_UNCONFIRMED",
  "message": "Authorization error occurred",
  "debug_id": "ca787bdf80d7a",
  "information_link": "https://developer.paypal.com/docs/api/payments.payouts-batch/#errors"
}
Feedback