Register webhooks on another PayPal account - paypal

I understand how to register webhooks for all kinds of events within my OWN PayPal account. I need something different: I want my users to authorize me to register a webhook for specific events in THEIR accounts.
The short story is that I want to place a service in the middle between participating users and merchants. So I imagine this could go one of two ways:
USER authorizes me to register webhooks for authorization events on his PayPal acct (typically PayPal Personal). I read the payload to identify transactions related to participating MERCHANTs.
MERCHANT authorizes me to register webhooks for authorization events on his PayPal acct (typically PayPal Pro/Business). I read the payload to identify transactions related to participating USERs.
Thanks in advance for your thoughts!

Do it for the merchant accounts (2).
You'll need them to onboard and provide a REST clientid + secret so you can use those credentials to create transactions for them and register for the webhooks you want.

Related

Paypal API - get all subscriptions by subscriber

There is an API call to find the subscription details etc, but what if I want to check all the subscriptions that a user has purchased? There's no API for that?
There is not. One of your users could have activated subscriptions with different payer accounts -- or a payer account could have been used to activate multiple users. It's not a 1:1 relationship (unless you were to enforce it) so you need to track this information in your own database.

How to send money from one PayPal acount to another through api

I'm creating a rewards app that connect with a PayPal accounts. In this app, I send money from admin site to client (which are send withdrawal request to admin). Parameters only receiver email and amount. How to integrate this with the Laravel API?
This isn't a Laravel question, but the account owner can start by applying for PayPal Payouts, which may or may not be granted for this business use case.

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/

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.

Could I make users config their PayPal account info in my website, so they can receive payments without giving me private info?

I'm building a web application and I would like that each user could configure their necessary information about their PayPal accounts in order to receive payments from the app. Can this be done?
I've seen a website that asks each user to type their PayPal email in order to receive payments, but I don't know what I have to do programmatically in order to use that user's account information so that person receives the payment.
Thanks,
Brian
Yes, it is possible to do this using PayPal Website Payments integration. Essentially your client needs to set their PayPal account up to receive payments, this usually requires them to prove that they're a legitimate business, although charities and some other personal reasons for taking payments such as wedding gifts are allowed as well.
Once setup they will be given a unique vendor id which can be embedded into a form on your website. When a customer wants to purchase something, this vendor id is passed to paypal and they handle the transaction from there. This means you don't have to store any credit card information on your website.
Check out the PayPal Website integration guide here: https://www.paypalobjects.com/en_US/pdf/PP_WebsitePaymentsStandard_IntegrationGuide.pdf