PayPal Checkout - can we send funds to another person? - paypal

We have been using the PayPal Checkout (v4) for a little while now, and really like the way it integrates. This is the system I'm talking about:
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/checkout-flow/
We are using this plugin to do the magic:
https://github.com/paypal/paypal-checkout
Anyway, as I said we have this all working fine when someone is sending US the money. However, we also have a tool on our site where "customers" can send money to sellers. For this, we currently have the Adaptive Payments system.
My question: How can we use the PayPal Checkout tool to let people send to a given email address, while still getting the callback for the order? (so we can enter it into our system, to track it)
At first I thought this wouldn't be possible - but I've seen this exact same logic on eBay:
Is this something that is publicly available? Or is it just a "PayPal-Ebay" thing? (as they are effectively the same company, so maybe have access to different tools than the general public do)
Thanks!

Here's another option -- the payee option in PayPal's REST api:
https://devblog.paypal.com/setting-payee/
Using this, you can set the money to be moved to whichever paypal account you like with just the email address.

The PayPal Express Checkout v4 is based on PayPal Rest API which does not support spliting or sending payment to a given PayPal account that is not the API caller. Adaptive payment is the right to do so in PayPal. The PayPal checkout on eBay is only for eBay, the checkout experience may look similar but it's using different product than the Express Checkout v4.

The basic integration lets you set up a button for a merchant using only their client id:
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/basic-integration/
So if you can collect the merchant's client id, you can set up a button to make payments to that merchant.
Hope that helps!

Related

Will old PayPal buttons continue to work after switching to PayPal Express?

I'm using the same PayPal merchant account on multiple websites. Currently I'm using old-style PayPal links () with IPN notification.
Now I'd like to start using the PayPal Express API. But at least for a while I would have the old links still online on some sites.
The switch to PayPal Express seems to be per account. Will the old links and IPN continue to work ?
when you implement PayPal express checkout that will not hinder your PayPal links on whatever site you have them on. You can have PayPal Express Checkout with non-hosted button code on the site at the same time; no problem, at least while you're done with your testing, etc.
PayPal Express Checkout can be used across multiple sites; however APIs are only one per account. What this means is that if you want the funds to go to separate accounts for each site then you'll need a new PayPal account per site as you'll have to use different APIs with Express Checkout. That is the UserName/Password/Signature.
However you will have one IPN listener field for each account; so if you don't mind getting pinged for each site using the same IPN listener then you're fine.
You can just create specific prefix # for each site with the products themselves. Like store # 1 = 001Product# | Store # 2 002Product | etc. This will help differentiate IPN pings for each store and help you catalog it better. This is if you decide to use the same APIs for Express Checkout with the same IPN of the account. If so, you will have the PayPal button purchases along with the Express Checkout purchases you all the same data IPN wise and all funds will roll into the same account.
I hope I hit your mark on your question, but let me know if you need additional clarity as I'm happy to help. Have a good one.

Verifying paypal account

I am building website which requires customer to update paypal account.
Is there anyway to check the reality of customer's account?
When my customer fill out their paypal account in my site, I want them to be directed to paypal login page to login and paypal will return the result.
Does paypal api support this situation?
Pretty much any implementation of PayPal you choose would follow the flow you mentioned.
Payments Standard would allow you to create basic buttons or create an HTML form and POST directly to PayPal to process. It would send the user to PayPal for login and approval to complete the payment. The transaction details would include the payer status (verified or unverified) as well as the address status (confirmed or unconfirmed) and lots of other details about the order.
Express Checkout is basically the API version of Standard, but it's much more advanced and open to integrate in the way that works best for your site or application. In this case, some of buyer/transaction data is available during the process within your app through API requests and responses, and then you can also get to it via transaction details after the fact just like payments standard provides.
Another option would be to use Adaptive Payments, but if you're doing a general payment of any kind you probably don't need that. That's what you would use if/when you start wanting to split payments among multiple receivers within the same transaction, setup preapproval profiles, etc.
If you happen to be working with PHP my class library for PayPal will make the API calls very simple for you.
You could do what PayPal itself does when you register. Send them a few cents and have them tell you how many when they get it. The payment itself will fail if the account doesn't exist, and telling you how many cents proves that they own the account.

Paypal ExpressCheckout + chained Payment

I developed a Web Application that accepts payments via the ExpressCheckout API, for users to become a members.
Everything works fine.
I now want to extend my Web Application Services and offer my users with the possibility to buy items which are sold by third parties (my members).
The principle I would like to implement is quite simple: for each order, let the user pay for the item they choose and then transfer a part of the amount I received to the item provider, and keep some money for me. I would like to automate this process so that once I received the payment notification, I compute the amount of money to transfer to the item provider who might or not have a Paypal account (in other words, this means that I could maybe need to transfer the money to a bank account, using the IBAN/SWIFT data) and then proceed with the money transfer.
I tried to find a solution reading your documentation and came across the "chained payment" but the latter does not seem to be used within the ExpressCheckout workflow.
Also, since my implementation of the ExpressCheckout flow works, I would not like to have to find a totally different solution but rather extend it... if possible.
Could you please tell me which is the best solution for me?
In advance, many thanks for your help.
You could do 1 of 2 things. You could use Express Checkout with parallel payments. This means you could split the transaction up between different accounts at the time of purchase. The other option would be to just receive all of the funds into your account, and then when you are wanting to send money to the other accounts you could either use the Adaptive Payments (Pay) API or the MassPayments API to send money to the other accounts. Keep in mind you would have to send it to their PayPal accounts, you would not be able to send it directly to a bank account with either one of these API's.
I had the same issue and I got an answer from PayPal that it is not allowed to use Express Checkout to transfer money to your PayPal account and - at a later point in time - transfer the amount minus your service fee (which stays on your PayPal account) via Adapative Payments API to the seller's PayPal account. PayPal suggested to use Chained Payments API instead. All works fine in the sandbox, but once you need a Live APP ID from PayPal they will review your business case and deny it. At least that what happened to me.
I know that is old question, but anyway, I tried to find solution and was enable to perform the simillar thing like described in question. So, then I asked paypal about this, and they gave me advice to use SellerDetailsType Fields that 's called PayPalAccountID, description for this field is Unique identifier for the merchant. For parallel payments, this field is required and must contain the Payer Id or the email address of the merchant. It wasn't clear for me to use this field for solving my problem. Here is link https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_SOAP/ I described field for soap request, for NVP it's called PAYMENTREQUEST_n_SELLERPAYPALACCOUNTID, but the idea is the same. I hope it will help someone.

PayPal PayFlow Hosted Checkout

I can't understand Hosted Checkout. I think this is because I can't let go of Payflow Link. So I'm going to reduce this to what I want to do and if somebody could tell me if this is possible with Hosted Checkout I would greatly appreciate it.
With PayflowLink I was able to collect some information (Name, Address, Email, etc) + some app specific information that was used to calculate an AMOUNT and send it off to payflow.paypal.com and the user could happily check out before being returned to my website.
With Hosted Checkout the documentation seems to imply that I now collect the credit card info and grab a Secure Token to submit it to payflow.
You'll say why not use Paypal Payment Standard but the user has their own Merchant Account.
Am I missing something?
If you're using a 3rd party merchant other than PayPal you would actually still use PayFlow Link (or Pro) the same way you did before. Payments Advanced (hosted PayPal) is only for when you're using PayPal as the merchant account.
Yes you can.
The documentation makes no reference to this use case but you can.
It appears you can even continue to use the legacy PayflowLink parameters (again not documented).
The real kicker is the confusing error message regarding "Express Checkout" generated by the lack of the Sandbox account when trying to run a test form submission.
For those who follow me... you have to have the sandbox account if you are in test. You enter your sandbox email about halfway down the Hosted Checkout Setup form

Dispatch a Paypal checkout to multiple account automatically

My website allows user to buy stuffs, and the payments will be splitted between a few people (generally 1/4 people).
So far, the processus I use is to receive the payment into one account, and then use the Paypal Adaptive Payment API to send this received payment to all the people, based on their percentage.
The problem with this solution is that the "reception paypal account" will have a lot of input/output money and will be the Achille's talon of my e-commerce (if this account is suspended, my commerce is down).
My question is quite simple: is there a way to do this automatically?
I found that if the buyer have a Paypal account, then I could directly use the Paypal API to dispatch it's payment (based on his paypal email) to the people, and that is perfect, but the problem is : what happens if the buyer doesn't have a paypal account and want to pay with, say, a credit card?
Thanks for your help!
Ok, the solution is quite simple in fact but need a complete change :
I had to forget about Web checkout and use Paypal API, do a PAY request with a Chained Payment (defining multiple receivers, with one (me) setted at primary: true). In that request, set the ipnNotificationUrl to be notified of the evolution of payments and that's it!
The response from paypal, if correct, will contain a paykey.
Then, you have to redirect the buyer to :
https://www.paypal.com/webscr?cmd=_ap-payment&paykey={PAYKEY_HERE}
or
https://www.sandbox.paypal.com/webscr?cmd=_ap-payment&paykey={PAYKEY_HERE}
Then, to be kept updated, all you have to do is send a request to Paypal containing the paykey to know the paymentdetails !
That's it !
I'll answer my question on that, looking into the Paypal Adaptive Payment API, we can see a dedicated section "Guest Payments".
It seems it's possible, but it requires all the people that will receive the money to have a Business Account or Premium account!
Well I'll add a second answer because it's more complete and slightly different from the first one.
The best way to do it quite simply is to use the Express Checkout API (SetExpressCheckout, GetExpressCheckoutDetails, DoExpressCheckoutPayment).
By using it instead of the basic "checkout" bouton with an IPN behind, it is possible to define more than one recipient that will receive the money : the parallel payment.
It's that easy!
(Now I have to rewrite all my code to implement it, yayh!)