Search code examples
paypalpaypal-sandbox

PayPal Payouts Failing


I've been trying to integrate the PayPal Payouts API into my application and have been running into some issues.

Request

{
    "sender_batch_header": {
        "email_subject": "<redacted> Payout Received",
        "email_message": "You have received a payout. Thank you for your service with <redacted>",
        "sender_batch_id": "<redacted-uuid>"
    },
    "items": [{
            "recipient_type": "EMAIL",
            "amount": {
                "value": "100.0",
                "currency": "USD"
            },
            "note": "Thank you for your services",
            "receiver": "<redacted-email>",
            "sender_item_id": "<redacted-uuid>"
        }
    ]
}

Response

{
    "batch_header": {
        "payout_batch_id": "<redacted-id>",
        "batch_status": "PENDING",
        "sender_batch_header": {
            "sender_batch_id": "<redacted-email>",
            "email_subject": "<redacted> Payout Received",
            "email_message": "You have received a payout. Thank you for your service with <redacted>"
        }
    },
    "links": [{
            "href": "https://api.sandbox.paypal.com/v1/payments/payouts/<redacted-id>",
            "rel": "self",
            "method": "GET",
            "encType": "application/json"
        }
    ]
}

Our issue is that the payment isn't actually sent to the request email's PayPal account. The receiver email is a PayPal sandbox account email so that shouldn't be an issue. According to the documentation the batch status is PENDING if the request is successful. Is there something I'm missing here?


Solution

  • Ensure that the receiving sandbox account has a confirmed primary email within its sandbox account interface. If you need to confirm the email from there, the "email" confirmation message will show up in dashboard notifications. The sandbox never sends any real email messages.

    PENDING is the normal initial status when sending payouts. You can check the status later with the corresponding API call. There are also webhooks.