Paypal REST API for multiple accounts - paypal

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.

Related

PayPal Auto Payment without logging in

I want to make a payment system in which users can connect their PayPal account to a website. In this step, login required.
When transaction occurs, without having to log in again, users can pay to the site.
This would be quite different from PayPal subscriptions -- just auto payment like upwork client account.
What you are looking seems to be a "Reference Transactions" solution. It can be tested in sandbox, but to use it in live, the business account would need to be approved for this feature by PayPal. To do this the account owner would need to contact their PayPal account manager or PayPal's general customer support (not MTS), and explain the business need for this feature.
As far as implementing the solution, the only public documentation I'm aware of is for classic APIs: https://developer.paypal.com/docs/classic/express-checkout/ec-set-up-reference-transactions/ . Any newer API or vault solution does not appear to be publicly available at this time, but you could always contact PayPal's support and ask if there's something they'd rather you implement than those classic APIs. The more significant hurdle is the business approval for the feature mentioned earlier.

Paypal developer/business account(sandbox)

I'm working on a php project that needs to integrate Paypal API's. I've chosen REST API's. But I've a business account(sandbox). Is it possible to call REST API's using this account type?
You need to log into developer.paypal.com using any live PayPal account, via https://www.paypal.com/signin?returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications
If you don't have a live PayPal account, create one.
Once logged in, the number of REST API apps and corresponding sandbox accounts that you can manage is unlimited.

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.

Paypal Client Website Payment Options

Currently we are using Paypal's REST API to setup a paypal payment process on our client's website.
Our webcontrol sits inside an iframe on their website and it is from this control the the paypal process is started and processed. Currently that works ok.
The issue we have is that this requires each customer of ours to have a business account (which is required any way we go so that bit is ok) but they then need to go the developer portal on their account and setup a an App ClientID and Secret (which is the bit we are hoping to do without to make it as simple as possible for our customers).
I have noticed solutions like wix.com offer paypal integration to their customers and only require the email address of their customer's paypal account and they handle the rest of the setup from there automatically.
I am just looking for some guidance on which product in Paypal's range should I be looking at to implement the same sort of solution setup for our customers?
Your observation is correct: the REST API service does not (currently) support placing API Calls for other users.
Alternatives:
Classic API: You can call the API in the name of a customer (who first needs to grant your API user access to his account) by passing the "SUBJECT=E-Mail Address" Variable. Usually used in conjunction with Express Checkout - see: https://developer.paypal.com/webapps/developer/docs/classic/express-checkout/ht_ec-singleItemPayment-curl-etc/
If you want to go this route, you may want to look into the permission service API under https://developer.paypal.com/docs/classic/products/permissions/ - it allows you to programmatically request the required permissions from a seller.
Adaptive Payments:
Often used by market places, we're dealing with 3 parties within Adaptive Payments:
a. API Caller --> The API caller placing the API calls and receiving all infos
b. The sender --> The person sending money to one or more recipients
c. The receiver(s) --> One or more receivers of the payment. As Adaptive Payments is pretty much using PayPals "Send Money" functionality, no further permissions need to be requested from the receivers.
See: https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/integration-guide/APIntro/
Website Payments Standard: Just add a different e-mail address to the "business" variable and you're done.
See: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/cart_upload/

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).