Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API Payout Feature - Authorization Error

Tags:

paypal

We are using the python package for Paypal.

The sandbox key is working fine, but when we switch to the live key, only the payout feature stops working:

Error message:

{"name":"AUTHORIZATION_ERROR","message":"Authorization error occurred","debug_id":"87fe36dc5d7a7","information_link":""}

I'm assuming it is because this feature is disabled on live accounts and we can request it, we need this feature for our site to work.

heres the code we're using:

payout = Payout({
    "sender_batch_header": {
        "sender_batch_id": sender_batch_id,
        "email_subject": "Payment Sent"
    },
    "items": [
        {
            "recipient_type": "EMAIL",
            "amount": {
                "value": '{:.2f}'.format(payout),
                "currency": "GBP"
            },
            "receiver": payee_paypal,
            # "note": "Thank you.",
        },
    ]
})

if payout.create():
    payout_sent.send(promise, payment_id=payout.batch_header.payout_batch_id)
else:
    payment_error.send(promise, reason=payout.error)
like image 422
Paolo Memoli Avatar asked Nov 20 '25 06:11

Paolo Memoli


1 Answers

You need to have Mass Payments enabled on your PayPal account. Easiest way to check to see if you do indeed do have Mass Payments enabled is to visit 'my account' area at https://developer.paypal.com/webapps/developer/applications/myapps

If you do have a green check next to Payouts, then you are enabled. For both RESTful Payouts and Mass Payments. If you do not, then click through the Enable link. You kick off an application if you have a US PayPal account. If not, you'll have to contact your local Customer Support team.

like image 169
Rolf Avatar answered Nov 23 '25 05:11

Rolf