One application to interact with multiple paypal accounts - paypal

I have a bunch of customers who would like to create and send invoices directly from my web application (without logging in to theirs paypal account). Is that possible to create paypal api which will manage invoices for different paypal accounts (not mine). Of course my application will hold their account data.
Thanks.

You could have your users manually grant API permissions from their PayPal account for your application to make API calls on their behalf.
Once they've done that, you would include the SUBJECT parameter with their PayPal account ID or email address as the value, and you would continue to use your own API USER, PWD, and SIGNATURE. This way the application calls would be made with your account, but any action that occurs would happen on the 3rd party account.
If you want to make this a little easier on your users (and yourself since you won't have to support them so much) you can use the Permissions API. This allows you to setup a way within your application for users to approve your application to make the calls it needs to make, and then you would be working with OAuth tokens instead of their email/account ID.

Related

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 REST API for multiple accounts

I have a Java application that has just been updated with e-commerce features that use the Paypal REST API (https://developer.paypal.com/docs/api/).
I have multiple customers who run this application, each of them can log in to their own admin panel and manage their store and other features.
The Java client for Paypal REST API is working, I have tested it in the Sandbox of my own Paypal account and also in the live environment.
Question: Will each customer have to go into their Paypal account and activate the REST API to generate their key/secret for use in the Java app or is their a way for me to pay multiple PP acounts from the App/key/secret that is already active for my own PP account?
The only thing the Java app is doing with the PP API is creating and executing a payment.
If each customer has to create their own key/secret is there a quick way for them to do this from their PP admin panel? Currently the only way I know is to go into the developer.paypal.com section of the site, which doesn't seem very intuitive for a non techy.
At this time the PayPal REST API does not support third party payments in that way. The customer would need to use developer.paypal.com as you suggested to get their own PayPal REST credentials.
You can collect money and send it out using your own REST credentials but this would make you the liable receiver for the purchase.
PayPal has solutions outside of the REST API that might work for you here: https://developer.paypal.com/docs/marketplace-split-payments/
The Classic API does have a subject option, the subject is the third party. You do need permissions for some of the API calls; however, the permissions API can ease that process.

I can't find the paypal API?

I'm in third-party applications (like PA), now want to join up ebay, so need to paypal user authorization. Such as user already through paypal give me the authorization of the API (Add New Third Party Permissions), How to through the user's paypal account, I get the user is authorized to me?
PayPal has lots of different APIs depending on what you're after. I would take a look at this for a list of all the Classic APIs, which are what you would use when working with a client who has granted API permissions for you.
For more details about the different PayPal products which utilize the individual APIs you can view the integration guides.

Can you connect to PaylPal's REST API From 3rd Party Apps

I am looking at building a product that integrates with PayPal new REST API. I can't find any information on connecting to other PayPal users accounts to make requests on their behalf. All I can find suggests that all of my users will have to login to developer.paypal.com and create their own App, and plug those credentials into the product I am building.
It seems like their should be a way to authenticate to a user's account and make requests on their behalf. Is there?
PayPal does have a way to authorize a third party to make calls on another party's behalf. There is even an API that can do this. The most straightforward way is for you to provide them your API username and they authorize you to run calls on their behalf and you call with their email address as a parameter (at least in Classic, REST may have a different method)
PayPal has a guide to all this on the Developer page (it's too extensive to excerpt).

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.