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 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. Create payout batch
Use a valid access token and make a POST call to the/v1/payments/payouts endpoint.
Include the following parameters:
| Parameter | Action |
|---|---|
sender_batch_headerRequired, object | Use the sender_batch_id within this header to prevent duplicate requests. |
items.amountRequired, object | To pay a recipient in their local currency, set the currency parameter to the local currency code. PayPal converts the payment to the specified currency and applies conversion fees. When you retrieve the payout details, the response shows the funding source, payout amount, fees, and other currency conversion details. For a sample request and response for cross-currency payouts, see Pay in local currency.Review country exclusions and restrictions before sending cross-currency payouts. |
items.receiverRequired, string | Pass the value that identifies the recipient. For example, user@example.com, +15555550123, @venmousername, PAYPALUSERID123 |
items.recipient_typestring | For Venmo payouts, set the recipient type to USER_HANDLE and pass the handle in items.receiver. Possible values: PHONE, EMAIL, USER_HANDLE, PAYPAL_IDDefault value: EMAIL If you set the recipient type in sender_batch_header, all items use that type unless you override it per item. |
items.recipient_walletstring | Set the recipient wallet type. Possible values:
|
201 Created response. The response includes the following parameters:
| Parameter | Description | Further action |
|---|---|---|
batch_header.payout_batch_id | Unique ID for the payout batch. | Use this ID to track or reference the batch in future API calls. |
batch_header.batch_status | Status of the payout batch. Possible values: SUCCESS, PENDING, PROCESSING, DENIED, CANCELED. | PayPal may process the batch immediately or later. If the status is PENDING, check again later. To retry after a server error (such as HTTP 5xx), send the request again with the same sender_batch_id within 30 days. |
batch_header.sender_batch_header | Metadata of the payout batch that the sender originally provided in the payout request. | You can use it to match the response with your original request parameters. |
links | URLs to get batch or item status. | Use these URLs to check the status of the batch or individual items. |
2. 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
Use a valid access token and make a GET call to the/v1/payments/payouts/{ID} endpoint. Path parameter:
ID is the payout_batch_id returned in the Create payout batch response.
200 OK response. The response includes the following parameters:
| Parameter | Description | Action |
|---|---|---|
batch_header.batch_status | Status of the payout batch. Possible values:
| If the status is PENDING or PROCESSING, check again later. If the status is DENIED or CANCELED, review the error message or reason and resubmit if needed. |
batch_header.sender_batch_header | Metadata of the payout batch that the sender originally provided in the payout request. | You can use it to match the response with your original request parameters. |
items | Array of payout items with details for each item. | Use the payout_item_id to track the status of each payout item. |
links | URLs to get batch or item status. | You can use them to poll for updates. |
For information on all parameters, see API reference.
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.
3. 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
4. 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 - test value in request payload
- Sample - test value as path parameter
| Trigger | Test value | Simulated error response |
|---|---|---|
| items[0]/note | ERRPYO002 | SENDER_EMAIL_UNCONFIRMED |
5. Go live
- Set up live account.
- Set up webhooks to get real-time notifications about payout events, such as completed or failed payouts.
- Go live with your app.