Important information
Ensure to review the following information before you send payouts.Rate-limiting guideline
PayPal does not have a published rate-limiting policy. To ensure site security and stability for merchants, we might temporarily apply rate limiting if we see unusual or abusive traffic. We hold the rate limit until we know the traffic is safe. For Payouts API, we allow 400 POST requests per minute. If you get an HTTP429 Unprocessable Entity - RATE_LIMIT_REACHED message, you have exceeded the rate limit. If this affects your integration, contact Merchant Technical Support.
You can use webhooks for status updates instead of repeated API calls through polling and reuse OAuth 2.0 access tokens (till their expiry time) to avoid unnecessary requests.
Payouts SDK
You can use the PayPal Payouts SDK as an alternative to direct API integration. The SDK provides methods for authentication, request construction, and error handling in multiple programming languages. For more information, see Payouts SDK.End-to-end workflow
Prerequisites
- Complete all mandatory steps to get started.
- Ensure your PayPal production business account is set up.
- Ensure to fund your business account.
Send payouts
You can use the procedures in this section to send payouts using the Payouts API.1. Generate access token
The access token is a server-side token that helps PayPal to authenticate your app when it accesses PayPal resources. In your server-side code, implement the code to create the access token. In the code, when you call the/v1/oauth2/token endpoint, ensure to include the response_type data parameter and set its value to token. Use the generated access token in all your server-side API calls to authenticate your app.
2. Create payout batch
- Prepare your request by including all required request body parameters in JSON format.
- Add the access token to the
Authorizationheader asBearer <ACCESS-TOKEN>. - Implement idempotency through the
PayPal-Request-Idheader parameter. - Send the POST request to the
/v1/payments/payoutsendpoint with your JSON request body and headers. - Review the API response to confirm the payout batch is created.
Request body parameters
Response parameters
A successful request returns201 Created, along with the batch ID and status. The response includes the following parameters:
3. Track status
After placing the payouts request, you can code your app to track the payout status by polling for updates or using webhooks.Poll for updates
- Send a GET request to
/v1/payments/payouts/{id}. Replace{id}with the payout batch ID. You can customize the request and choose which information to get in the response. See Get specific payouts details. - Review the response parameters for the current status and take subsequent actions.
For the exhaustive list of response parameters, see Show payout batch details.
Use webhooks
Webhook events are external events that your app does not know about unless it receives event notifications. For example, a payout processed or completed is a webhook event. You can subscribe to such events and register a callback (listener) URL. When the event occurs, PayPal sends a notification to the registered callback URL. You can code your app to perform relevant actions based on the event notification it receives. To handle webhook events:- Review the list of webhook events for Payouts and select the events for your app to subscribe.
- Subscribe to the selected webhook events through one of the following means:
- PayPal developer account: Log in to your account, go to App details page > Features > Webhooks, and subscribe to webhook events.
- Webhooks management API.
- In your server-side app code, define a webhook handler that:
- Listens to the webhook event.
- Confirms receipt of the webhook event to PayPal.
- Verifies the source of the event notification.
- Performs further actions based on event data.
4. Handle errors
PayPal uses standard HTTP status codes to indicate the result of an API request:2xx: Success4xx: Incorrect request (for example, missing parameter)5xx: PayPal server error
5. Test
Use the PayPal sandbox environment to ensure your integration works as expected and meets all business and technical requirements before you go live. Testing your Payouts API integration involves:- Testing end-to-end payouts flow to verify money movement from your business account to your personal account (in case of PayPal payouts) or out of your business account (in case of Venmo payouts).
- Testing API calls.
Test API calls: use test values and simulate responses
To simulate Payouts API responses, inject test values in the request payload or as a path parameter in the request URL. These methods allow you to trigger specific error responses without creating actual payouts.Sample to inject test value in the request payload
Sample to specify test value as path parameter
6. Go live
- Set up business production account.
- Set up production webhooks to get real-time notifications about payout events, such as completed or failed payouts.
- Move your app to production.