Integrate API

CURRENTAPI

Last updated: Feb 27th, 8:15am

The Payouts API enables you to send payouts programmatically to your recipients. This page explains everything you need to know about making payouts using the Payouts API.

How it works

When you initiate a payouts request, the Payouts API:

  1. Validates your request and processes the payouts.
  2. Sends you a status report.
  3. Notifies recipients that they have a payment.

Know before you code

Required

Create a payout

The sample request below creates a payout in USD for three recipients: two PayPal recipients and one Venmo recipient using the API endpoint Create batch payout.

    1curl -v -X POST https://api-m.sandbox.paypal.com/v1/payments/payouts \
    2 -H "Content-Type: application/json" \
    3 -H "Authorization: Bearer <Access-Token>" \
    4 -d '{
    5 "sender_batch_header": {
    6 "sender_batch_id": "2014021801",
    7 "recipient_type": "EMAIL",
    8 "email_subject": "You have money!",
    9 "email_message": "You received a payment. Thanks for using our service!"
    10 },
    11 "items": [
    12 {
    13 "amount": {
    14 "value": "9.87",
    15 "currency": "USD"
    16 },
    17 "sender_item_id": "201403140001",
    18 "recipient_wallet": "PAYPAL",
    19 "receiver": "<receiver@example.com>"
    20 },
    21 {
    22 "amount": {
    23 "value": "112.34",
    24 "currency": "USD"
    25 },
    26 "sender_item_id": "201403140002",
    27 "recipient_wallet": "PAYPAL",
    28 "receiver": "<receiver2@example.com>"
    29 },
    30 {
    31 "recipient_type": "PHONE",
    32 "amount": {
    33 "value": "5.32",
    34 "currency": "USD"
    35 },
    36 "note": "Thanks for using our service!",
    37 "sender_item_id": "201403140003",
    38 "recipient_wallet": "PAYPAL",
    39 "receiver": "<408-234-1234>"
    40 }
    41 ]
    42}'

    Modify the code

    Copy the code sample above and modify the following values:

    • Change Access-Token to your access token.
    • Change <receiver@example.com> and <receiver2@example.com> to sandbox account email addresses.
    • Change <408-234-1234> to a sandbox account phone number.
    • Optional: To send payments to Venmo recipients, set recipient_wallet to VENMO. Include a U.S. mobile number and a note in the payout item.
    • Optional: To send a payout in a different currency, set the currency parameter to the payment's currency code. You'll need to make a separate API call for each currency type. PayPal can automatically exchange payments for some currencies, even when you don't hold a balance in that currency.

    Step result

    A successful request returns:

    • A return status code of HTTP 201 Created.
    • A JSON response body with the payout_batch_id. Use the payout_batch_id in the show payout batch details endpoint to get a detailed record of each item in the payout.

    Sample response

      1{
      2 "batch_header": {
      3 "payout_batch_id": "Y4JB5BNLE8Z88",
      4 "batch_status": "PENDING",
      5 "sender_batch_header": {
      6 "sender_batch_id": "2014021801",
      7 "recipient_type": "EMAIL",
      8 "email_subject": "You have money!",
      9 "email_message": "You received a payment. Thanks for using our service!"
      10 }
      11 },
      12 "links": [{
      13 "href": "https://api-m.sandbox.paypal.com/v1/payments/payouts/Y4JB5BNLE8Z88",
      14 "rel": "self",
      15 "method": "GET",
      16 "encType": "application/json"
      17 }]
      18}

      Error messages

      For information on Payouts API error messages, see Payouts Error Messages.

      See also

      If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more