Obtain PayerID via Login with PayPal

jimmyli
Contributor
Contributor

Hello,

 

I am just starting out developing an app that uses the payout API. I would like to get the payer_id of a user that has logged in with paypal. I am able to successfully call the userinfo endpoint of the identity API, which returns the following:

 

{'verified': 'true', 'email_verified': 'true', 'email': 'NOT_ALLOWED_TO_WRITE_THIS_HERE', 'user_id': 'https://www.paypal.com/webapps/auth/identity/user/xFGpMjjoqS-MClBcVyYQV3D6IzZ-uuKal2HuDhw1_MQ'}

 

According to the reference (https://developer.paypal.com/docs/api/identity/), it seems like it's possible to obtain the payer_id from this endpoint. However, payer_id is clearly not present in the response, and I don't see any checkbox in my app settings that would enable this property.

 

How do I obtain the payer_id of a user that has logged in via paypal?

 

Thanks in advance for your help!

Login to Me Too
18 REPLIES 18

MTS_Andre
Moderator
Moderator

Hi, can you send your full API request? Cover sensitive data eventually.

Login to Me Too

jimmyli
Contributor
Contributor

Hello,

I am using the Python SDK, specifically following this example: https://github.com/paypal/PayPal-Python-SDK/blob/master/samples/openid_connect.py

 

 

My code looks like this:

tokeninfo = PaypalTokeninfo.create(code)
userinfo = tokeninfo.userinfo()

 

userinfo then holds the data I wrote in my earlier post. code is obtained via the Login With Paypal Button.

 

Please let me know if this is the information you are looking for. Thanks.

 

Login to Me Too

MTS_Andre
Moderator
Moderator

Ok, it could be that the payerID is not configured in your scopes. I can double check that but I need your account email, the one who is processing the login-with-paypal and the payments but send me a private message, don't share it here.

 

To enable the Private Message function:

- click on the top right icon of your profile
- click on "Preferences"
- under the "Personal" tab you will find "Private Messenger"
- click on it to turn it on/off

Once enabled you will see next to your profile icon a letter icon, if you click on it you can send a private message

Login to Me Too

jimmyli
Contributor
Contributor

Hi Andre,

 

I searched around for Private Messenger but couldn't find it. Below are some screen shots. I went into Preferences -> Personal like you suggested. I also looked around in the other tabs.

 

p1.pngp0.pngp2.png

Login to Me Too

MTS_Andre
Moderator
Moderator

Hi, try in the tab "preferences", the one next to the tab "personal".

Login to Me Too

jimmyli
Contributor
Contributor

I've searched everywhere but cannot find a private message option. (See below for pictures of Preference tab)

 

Does it matter that I do not yet have a merchant account?

 

p8.pngp9.png

Login to Me Too

MTS_Andre
Moderator
Moderator

What if you click first "Community Settings" and then check "Preferences"? It should be there the option to opt-in to the private messaging.

Login to Me Too

jimmyli
Contributor
Contributor

Clicking community settings takes me to the exact same place as clicking on preferences. By this point I've followed every single link inside the settings area and have used my browser to search for the key word "private" on every page. The option isn't there.

 

Would it be possible for you to find out definitively where that option is? I'll then be able to confirm that the option is indeed missing for me.

 

Login to Me Too

MTS_Andre
Moderator
Moderator

Hi Jimmy, wrote you via email.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.