PayPal Permission API - paypal

Im building a store where merchants(sellers) can sale their goods to the customers. Im using PayPal Expresscheckout for the payments. I have tested with my own API credentials, and it works fine.
However, to be able to use the ExpressCheckout API's as a specific merchant, i have to get it's permissions.
Can they give me their permissions directly from their profile?
I dont want to implement some special workflow for getting permissions from them.
Should i then store the credentials for each merchant in my own database?
What type of credentials is it? How/Where can merchant get these and send me ?
I have read some Permission API docs, but im not sure i have understood it really, yet. So would be glad to get direct answer from someone who already have experiense with this.
Thank you!

They would need to either provide you with their API credentials from their account, or they would need to grant 3rd party permissions to your API username to be able to execute API calls on their accounts.

Related

Where would I find a PayPal users PayPal_id?

I am working with the PayPal Node.js SDK and I am trying to payout a user. In order to do that I can use either their email, phone number or encrypted PayPal ID. We would prefer to work with encrypted data as much as possible. Where would we find a users paypal_ID?
If any of our code would help us find this information, we can post it just tell us what you need. Thanks in advance to all.
It should be displayed in the account overview page or in the profile. It typically shows your PayPal account email and merchant account ID.
It can also be obtained via the GetPalDetails API, but that's not REST. I'm not sure if REST has an equivalent API yet or not.

How app can get PayPal user transaction info?

Can I get notification with data at specific url when users who connected PayPal to my app throught Oauth2 will get payment? I know it possible with IPN, but then each user need to add my url in their account settings. Is any another way?
Update: Or can I manually get information about last user transactions(completed outside my app)?
There are a number of ways to accomplish what you're trying to do, I think.
You mentioned IPN, and that would be the best way. You can specify the NotifyURL in your standard button code or API requests (depending on how you're setting up the payments) so that IPNs for those payments will be sent to your IPN URL. That way you don't have to have users set that up in their own account.
Alternatively (or in conjunction with), you could use the Permissions API to allow users to authenticate your app to make API calls on their behalf. Then you can use the TransactionSearch and GetTransactionDetails APIs to pull any info you need about their account transaction history.

PayPal sandbox vs live account

I want to integrate PayPal payments on my client's website.
I logged in my paypal account and created an App to test their REST API. Everything's fine and works good.
Now I have to go live, and here's my question: if I use my API live credentials, when someone makes a purchase the money will be accredited to my paypal account instead of the client's one?
Or do I have to ask my client his paypal credentials to create an App from his account? Or...what else?
Dumb question, I know.
The REST API I'm quite sure only gives you access to accept other peoples credit cards and other peoples paypal-accouts to transfer money to you. So your first question-statement should be correct.
If unsure, or if I might have misunderstood, you can find alot about it on the REST API Reference here.
Well it turns out that I just forgot to do the simplest thing, read the doc:
https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/permissions-outside
Thanks anyway, Marius.

Do I need 3rd party's Paypal API credentials to let them sell on my site using Payments Pro?

I am working on a website in which a facility pays us for membership. Their membership payment is the only money we receive. This payment is done via Paypal Website Payments Pro using the DoDirectPayment API.
These members then rent out their facility to customers by listing available blocks of time on our website. The customer would pay for this time block via credit card, also via DoDirectPayment, but this time the payment goes directly to the member's Paypal account.
I have found a lack of clear direction on what needs to be done to enable this. I know I could require all members to have a Paypal Payments Pro account ($30 per month) and store their API credentials (including passwords and signatures) in our system and those payments could be handled directly. But I am vaguely aware of the Third-Party app authorization option... I just can't find info on how it should be set up.
Is it possible to only store the member's Paypal email address and just ask them to authorize our app in their profile?
Also, I saw someone suggest the thrid-party payment recipient wouldn't even need a Pro account. If that is the case, what do I need to change about the API call (I'm using the NVP method) so that our Pro account is leveraged but payment is given to the member?
First, your members will need their own Pro account. The only way to try and get around that would be to have all of the funds come into your account and then disperse them accordingly. This is frowned upon by PayPal and will result in a suspended account.
You could indeed have users enter their API credentials into your application and store them with your customer's profile so that you can include them in API calls for that particular member. You'll want to make sure to encrypt these values if you end up doing that.
The proper way to handle it (since you're a hosted solution) would be using Permissions. You would use your own API credentials, but then pass an additional parameter to flag what account you're making that call on behalf of. This is where the Permissions come into play. Your members will need to Grant API Permission for your app to make the DoDirectPayment call on their behalf.
This can be done manually from within the PayPal account under API Access, or programatically via the Permissions API.
OK, I discovered the answer. I am sharing the detail here for others looking for this very elusive information:
My account (hosted solution) must be a Pro account.
Members who will be selling to customers on my site must also have Pro accounts. I tested the same code with a regular business account and the error said "This transaction cannot be processed due to an invalid merchant configuration."
Members do not have to give me all their API credentials.
The DoDirectPayment call is the same as if I were doing my own payment (almost). I use my own username, password, and signature. The way to send the money to another account is to include one more parameter called SUBJECT which should be the email address associated with the member's Paypal account (not their API username).
The member must grant my (third-party app) account permission. In my case I only needed the one Paypal labels "Process your customers credit or debit card payments." which should correspond to DIRECT_PAYMENT in API terminology.
Andrew's answer gave me some additional keywords to use in searches, and I appreciate the tip off to the Permission API. It did not directly answer the question, but that will be a nice feature to add to my app instead of making users go through their Paypal profile's to grant permission.

PayPal API credentials for sandbox

I'm trying to implement recurring payments with PayPal in PHP. I found this example, which I'm looking into, but I need some API credentials. I created a PayPal sandbox account, and from there I created a merchant account. I'm trying to get the API credentials for that sandbox merchant account to replace the values in the example, but I can't find where. All the guides I find point to non-existant parts of the sandbox user interface. Does anyone know where I can find the API credential details for sandbox merchant accounts?
Thanks.
I'm beginning to I loathe PayPal. Spent an hour on their site looking for this, only to find it here on SO (works as of Oct-2014):
Live: https://www.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run
Test: https://sandbox.paypal.com/us/cgi-bin/webscr?cmd=_login-api-run
To get API credentials in sandbox you must use the API Credentials menu in sandbox itself, instead of logging into the sandboxed account.