API Payout Feature - Authorization Error - 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)

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.

I just spent a few days on this particular problem, and despite everything in all the documentation, none of it is really explicit about what this error means.
The documentation at paypal says that this is an 'Authorization Error' with frustratingly few details.
So, in order to save folks time and frustration and submitting tickets:
Payouts need to be enabled for the live environment. They work in the sandbox but until you actually go to the account status page and click on the link to enable it you will get the AUTHORIZATION_ERROR. It will ask you some questions. Answer them and get ready for them to email you back for a more complete description of how you are going to use their services. This can take a few days.
Do all the steps to verify your account as mentioned here.
After verifying your account. VERIFY YOUR BANK ACCOUNT! Your PayPal account is labelled as verified once you hook up that bank account and put money in, but you will still get a frustrating AUTHORIZATION_ERROR when trying to use Payouts. Because your bank account is not verified. Do the song and dance to verify your bank account. This can also take a few days. (I don't know what this looks like, they don't let me play with real bank accounts.)
Fund your account. Note, you will still get an AUTHORIZATION_ERROR (and not INSUFFICIENT_FUNDS) if your account is insufficiently funded to cover the amount you want to payout plus fees. (At least until you've funded your account the first time, since we've put money in we're getting successes and I've not fully tested all the failure cases in the live environment.)
That's it. But do not be in a hurry, it has been four days since we started trying to test the live environment before we got 'It Worked!' back. Aside from the ticket turn around time. Mind you, you can do a bunch of this in parallel so you might be able to cut it down to two days.

This is Avi from PayPal. I think you are correct in guessing that it is likely an issue with account credentials. Have you tried reaching out to Paypal's Technical Support and filing a ticket? To debug this, account credentials would be necessary and it would not be advisable to put live account credentials in public.

In my case the issue was that my PayPal business account was not 100% verified. I followed this guide (business option) and it worked straight away.
https://www.paypal.com/us/selfhelp/article/how-do-i-verify-my-paypal-account-faq444#business
In a few words, to verify your account simply go to the Profile icon next to "Log out" and complete the steps on your To-do list.

Related

When check out with Paypal the site still lead to sandbox.paypal.com

After I finished configuring the Paypal checkout plugin, I continue to proceed checking out, first time I can check out with my account even though the url that Odoo or Paypal lead to was sandbox.paypal.com, but with the second time I check out it don't work anymore though I can still login my account at Paypal.com, it said "Wrong username, password" times after times after I tried to login with my account at the sandbox.paypal.com url. Someone please help me, thanks in advance!
Edit: I found this but I dont know how to get it to work with Odoo Paypal button.
Testing on the Live System
It is a good idea to test on the live system to make sure the switch to the live system doesn't introduce any problems. Some things to consider when testing on live:
You will need access to a Personal account with a credit card linked and a verified Business account.
Switch from the sandbox URL https://www.sandbox.paypal.com/cgi-bin/webscr to the live site URL https://www.paypal.com/cgi-bin/webscr.
Pre-fund the Personal account to avoid incurring charges on the credit card.
Test transactions can be as little as $0.01 USD.
Payments may be refunded resulting in a full fee credit.
It is good practice to log all IPNs received in a log file or database.
If the redirect URL is sandbox.paypal.com, you need to login it by your sandbox account, not live account.
Refer to https://developer.paypal.com/docs/integration/paypal-here/sandbox-testing/managing-sandbox-accounts/ to create a sandbox account or modify existing sandbox account's password.

Paypal Merchant account for multiple websites

My client having single paypal merchant account. IPN Notify Url sets to one website. But we are using same account for two websites. The problem is after payment process completed, paypal redirects to IPN Notify Url. But, I want to redirect to My website. Means Paypal redirects to their respected websites without considering the IPN. Is it possible? If Yes please suggest me.
thanks in advance
I am in the middle of getting the exact same thing setup currently. PayPal calls this a "Parent/Child Account". Basically what happens is the following:
You setup 1 main account on PayPal which has your bank information stored
You setup a secondary account (with no bank account, however both are business accounts)
Call PayPal and inform them you want the secondary account linked to the main PayPal account so that they both share the same financial information (Parent/Child Accounts). They will make the change in their system so that both of the PayPal accounts look like 100% separate businesses with no information leaking from one to the other, it's as if neither of the two checkout pages know each other.
On the back-end, what happens is you get paid on the 2nd account and the money is transferred to the main account at the end of the day, which you can then transfer to your bank account.
I believe this is a U.S. only feature, however feel free to call them and ask for help in getting it setup. If they give you the run-around, telling you that this is impossible, tell them you need to speak to someone else. I was on the phone with 7, yes SEVEN, different people in one call, and I had to call back and went through 4, yes FOUR, for a total of ELEVEN people, before I finally got to the one person who set it up like I wanted it setup. It is possible. Be persistent and don't let them tell you it isn't (unless their reasoning is you not being in the US).
Good luck!

Paypal accounts funded by credit cards = 10417 error

I've come here in a bid to try and solve what seems like a blackhole that nobody in paypal can help us with.
We've a business account. Paypal Express (digital goods). Verified, restrictions lifted etc...
We've got paypal express integrated fine as our sole payment method. But there's a problem. ANY paypal account funded by a credit card will just flat out fail and give a 10417 error.
Overview
Customer A has an existing paypal balance of $10
Customer B has an existing paypal balance of $0 but has their account
funded by credit card.
Customer A has no problems on our site with any transaction below $10.
Customer B gets an error upon payment. More specifically, a 10417 error.
Now before anyone says it, we have checked with card issuers etc... so we're 100% sure this is not an error with cards or banks (as the 10417 error tends to suggest). We've literally tested this with a dozen verified / clean paypal accounts in different countries with different card types & different issuing banks. All of them fail and sandbox gives us no clues either...
Can anyone throw us a bone here or think of any possible reason this could be happening? It would be much appreciated...
Update: Resolved: Turns out it was a problem with our account and more specifically our category of industry. It would have helped of course had someone told me that the half a dozen or so times I called over the past week - yesterday on the phone i asked an agent if she was 100% certain this was a problem with a customers card, bank or billing address. I knew it wasn't so i wanted just to see if she'd commit to it. Her response - "yes sir, i'm 100% certain". Sums it all up. Hopefully this will help someone else out there... if you're getting 10417 errors, try changing the business category or subcategory in a bid to stop you going insane...
Ran into the exact same issue, paypal support was not very helpful
Turns out the problem was the business URL was set to http instead of https
Our business website redirects from http -> https, but this redirect seems to cause a problem at checkout for paypal
Once we changed the business url, customers were able to proceed with payments
Solution:
Log in to paypal
Navigate to https://www.paypal.com/businessprofile/settings/info/edit
Edit the business profile and make sure "Business URL" is set to https://

Setting up Zencart with Paypal

To begin: I am trying to setup Zencart with Paypal. I have followed all of Paypal and Zencart's instructions:
Putting in Paypal's API username, password and signature code into Zencart's Payment Module section. Checked the "live" environment.
I then tried buying a product on the website and got the following error message:
Zen Cart message: We are sorry for the inconvenience. The PayPal account
authentication settings are not yet set up, or the API security information
is incorrect.
10002
Security error
Security header is not valid
I have tried looking up the answer but everything I see says to make sure the environment is not in sandbox and that everything is typed in correctly. I have tripled checked and the API is typed in correctly and it is set to live.... what else can I do?
Moving on, I have tried to setup the sandbox but am unfamiliar with how to use Paypal's sandbox. So I reconfigured Zencart to "sandbox mode" with the appropriate sandbox API and I set up box a sandbox account for a merchant and private buyer but I don't know how to use them. Should I go back to the Zencart store and register with my new "Paypal sandbox private buyer email"? And will checking out using this email they gave me work as just a test... I don't want to go through with the checkout if I'm going to get billed...
Thank you for any help:)
The best place to get support on Zen Cart issues is directly on the Zen Cart support forum at http://www.zen-cart.com/forum.php
Further, an existing article already explains the basics of the problem you describe: http://www.zen-cart.com/content.php?277-the-paypal-account-in-this-store-is-presently-misconfigured-to-use-mixed-sandbox-and-live-settings-we-are-unable-to-complete-your-transaction-please-notify-the-store-owner-so-they-can-correct-this-problem-10002
It is absolutely critical that the THREE parts of your API settings (username, password, signature) be copied EXACTLY from PayPal's site into your store's admin settings screen.
There's no need to use sandbox unless you're a programmer writing new features for payment processing. So be sure to check the "Live" radio-button. (I realize you already mentioned that. Just adding this for clarity.)
You can also get more details on exactly what is coming back from PayPal by turning on debug logging in the module's settings.
PayPal tech support is available at www.paypal.com/mts - they can look at your actual transmissions and at your account, and sort out a problem if there's something wrong with the API signature details.

PayPal Web Payment Standard: forcing PayPal account creation now?

Had a nice little custom button with a few parameters I was POSTing to PayPal (and getting POSTed back via IPN) a few years ago working fine. Payments were disabled for several years, but now my client wants to resume subscriptions with their new campaign.
I switched back to the sandbox hostname/merchant accounts, did a sandbox transaction with a test Visa card, and all was well.
Switched it to the live hostname/merchant account, went to do another test with a real Visa, but noticed that not only has the real PayPal site been completely rebranded/redesigned, they now seem to be forcing you to create a PayPal account: on the sandbox, there's a blurb with a link that says "continue" which takes you right to the credit card/billing information (this is identical to what the live PayPal site used to look like a few years ago).
NOTE: The merchant account has changed; I'm not sure if that matters or not and/or if there's any settings in there I need to change.
Question: is this the way it is now with PayPal? I can't seem to find any official information that says yes/no. Besides the Express, is there any other IPN method that'll work here or is this a policy thing at PayPal? I'd hate to rewrite my working/tested code, but this isn't going to fly with my client.
Yahel's answer is incorrect: I called PayPal, and they explained that the following conditions must be met in order to accept non-PayPal payments:
The business email address must be confirmed. You can check by going to Profile > Email.
PayPal Account Optional must be checked:
Go to www.paypal.com.au and log in to your Business account.
Click 'Profile icon' near the top right of the page (next to "Log out" button)
Click "Profile & settings"
Click ‘My selling tools.’
Click ‘Update' beside 'Website preferences.’
Select 'On' under 'PayPal Account Optional' near the bottom of the page.
Click 'Save.'
Yes paypal has been forcing users to create an account for a long time now. Before that you could use a credit card up to 10 times and then it would force you to create an account anyway.
The reason you are seeing the old branding in your sandbox is probably because it is you old sandbox on an old paypal server.
Last I tried there was no way around this new policy.
But djechelon is right, they have an excellent customer service, give them a call.
PayPal does force people to create accounts, even when they want to just make a single payment. I was puzzled by this situation too: I was choosing the option to pay without a PayPal account, but still was forced to provide all the private details enough for PayPal to create an account for me against my wishes. Very sneaky of PayPal! Then I found this page and that explained a lot.
This is the message I received in my PayPal Account:
PayPal Account Optional
When this feature is turned on, your customers will go through an optimized checkout experience. This feature is available for Buy Now, Donations, and Shopping Cart buttons, but not for Subscription buttons.
So you cannot provide a regular "Subscribe" experience to non-PayPal customers. I believe you must pay the $19.99 a month "Enhanced Subscription" for this.
PayPal Has a Purchasing Limit of $3,000 for "Guests".
I ran into this issue as well and #gravyface was bang on with setting your account preferences. However, my customers were still having issues paying without a PayPal account.
I called PayPal and it turns out they have a $3,000 (cumulative) purchasing limit for "guests". My customer's invoice was for $7,000 so even though my preferences were set to make the PayPal account optional, it still would not go through.
Hope that helps others.
JP