Create Payments, PHP - paypal

I'm using paypal to make my users able to payout their credits, which they can earn on my site. So i am actually buying my users efforts. As i have up to 200 payments per month, i would like to know, is there a possibility to send payments to my users via paypal api?
If yes, which methods should i use and what should i take care of? I possible i would also take a ready to go implementation in php.
I tried to check the documentation of the paypal api, but it was to complex, so i did not find any solution.

If you'll be submitting payments to 200+ people at the same time, the MassPay API would work nicely for you, but you'll need to call PayPal to request it and get it specifically approved on your account.
If the users will be doing this on their own, one at a time, then you'll want to look at the Pay API, which is part of the Adaptive Payments platform.
You can use my PHP class library for PayPal to make the API calls very quick and easy for you regardless of which method you end up using.

Related

Recurring payment on PayPal Express Checkout

Im trying set up recurring payment on my site by using Paypal Express Checkout. I did read through the official docs and I couldnt find anything useful related to recurring payment.
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/add-paypal-button/
Im just wondering does Express Checkout support recurring payment? If so, how can I achieve that or Where can I get some good example to start with?
Thank you for your help in advance. Much appreciated
Cheers
We have a similar issue before. You might wanted to take a look at this thread.
I'm trying to understand the use case here. When you say recurring payment for express checkout,it has to be something a customer is buying regularly like restocking an item, in that case it's not an express checkout, it's a recurring purchase by a returning customer. They must have opted to restock at a regular interval like every 30 days, 2 months etc. They also must be registered users on your website.
So your logic must include — Checking all the customers who have set up an automatic purchase for an item.
—Check their frequency of purchase and charge them for the amount of the item at that frequency.
—For this purpose PayPal has a REST API :
This is the accurate place to look for to implement PayPal recurring payments:
https://developer.paypal.com/docs/api/payments/#payment_create
In case they also allow you to authorize payments through the following API
https://developer.paypal.com/docs/api/payments/#authorization
you could use it as well.
But at least this narrows down your choices in terms of regular payment authorization.
This API will allow you to request PayPal services to authorize payment on a regular basis for that customer. You will still have to have your own logic to check the 'subscription' for your products and the intervals.
—The CreateRecurringPaymentsProfile API Operation (NVP) at the link below looks to be for personal payments. For example something an Inventory Management System will do.
https://developer.paypal.com/docs/classic/api/merchant/CreateRecurringPaymentsProfile_API_Operation_NVP/
It's an API specific to adding recurring payments functionality.
Since you're a developer, PayPal Developers' Resources will answer any queries you have regarding the API functionality and usage. You will have to just know what to ask for. You are their B2B customer trying to understand their API system. You can also file a bug on their Developer portal if you're not getting proper answers.

Paypal Rest API vs Classic Sdk

I am working with paypal first time.
I have a product and I want to integrate paypal with it.
I want to achieve the following tasks :
Client comes to my website and select a plan,which is a monthly recurring plan.
Then client is redirected to Paypal for payment.
Client makes payment.
Return backs to home page.
I have gone through the documentation of paypal and I have the following questions.
What should I use REST API or Classic Sdk, as I want to create Recurring Profile,Work with EXPRESS-CHECKOUT and REFERENCE TRANSACTIONS.
I have customers all over globe and it is stated in the documentation that, for the customers in Germany and China , I have to use REFERENCE TRANSACTION.
Some where in the documentation of Merchant SDK it is stated that the classic API's will be deprecated, so is it a good approach to use Classic SDK
I also wanted to track the transactions(payment) made by user, so that I can show him the amount that is deducted in each month in his profile details.
Please suggest a feasible solution to my problem.
Thanks in advance.
Here's what I use. I went to Web Payments Standard and created a Subscription button. (I like the unencrypted variety, but you can encrypt if you want.) In there, you set the terms of the subscription, as well as where to post the IPN message. When the IPN message comes back, you deal with it. You'll get a subscr_signup at the start along with a subscr_payment. Then, on renewals, you'll get a subscr_payment again. What I like to do is store every verified IPN message in the database for my customer.
For handling the management of those subscriptions for things like tracking info, refunds, subscription cancellations, and voids, you'll need to use NVP API, which is a very simple API. If you stored in a database every IPN message with all those fields, then you should be able to pass certain fields of those to the NVP API in order to get what you need done.
If you're worried about longevity of the APIs, then don't. All they do when they deprecate APIs is stop giving you good docs on them. They still let those older versions run. If they didn't, there would be major upheaval on the web with web commerce products breaking all over the place. However, that said, if you want to prepare for the future, then get on the Braintree Payments API because PayPal bought Braintree and that's the future of their API.

paypal one time login during paypal payment

I need a help regarding paypal.
That is. Once I have logged in with paypal and made payment, Then for another payment no login will be asked, Direct payment will be done using paypal. Please comment your suggestions. Thanks in Advance.
You have a couple of options for this.
First, you could take a look at Preapproval, which is part of the Adaptive Payments platform. It allows users to create a Preapproval profile that your application can then use to trigger payments at any time without further approval as long as the payment fits within the guidelines of the preapproval profile.
Another option would be to look into Express Checkout with Reference Transactions. This would give you a little bit more flexibility and would be more in line what you're asking for, I think. Users would agree during their first payment with you to allow you to auto-charge this same account in the future. Then you would use DoReferenceTransaction to trigger future payments based on that "billing agreement" which is what it would be called that way.
I would recommend going with Express Checkout, and you might want to look at Digital Goods, too, which just adds some more functionality with quicker PayPal checkout in various ways.
It's all handled through a few simple API calls, so don't let all the info scare you.
My PHP class library for PayPal will make all of the API calls very simple for you regardless of which method you choose. Again, though, I'd recommend Express Checkout.

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 MassPay API - How does it work exactly?

I have gone through the Paypal website, looked at their dozens of FAQS and documents, and still don't have a great idea as to how to integrate the Paypal Masspay API. I was hoping I'd have better luck on here :).
I have an app that gives users prizes, with an oracle SQL database that populates whenever a user redeems a prize.
Would I need to download the SDK onto my app, include the PayPal IPN, and call the MassPay API each time a user redeems a prize?
I have attempted to contact Paypal multiple times to no avail.
Not sure which aspect of your question is most problematic for you. I assume that you've looked at the concept diagram at
https://www.paypal.com/webapps/mpp/mass-payments
where the Excel worksheet is roughly analogous to a table's (or query's) worth of payees.
You would normally provide scripting code on your server/website that would submit that payee/amount list through the MassPay API calls against the PayPal website. If you only have one or two payees at a time, this is not the usual way to make a payment to your users (one-offs are generally Adaptive Payments API). It's not a downloadable app, though.
So is your app something the users download and interact with your site? If so, the correct place to put the code that faces PayPal (and actually transfers money around) is on your site's server. Not on the handset.
I finally reached a capable support member of the PayPal Team. The answer I got:
No SDK needed. All I need to do is set up an API call from my server to their server each time I want to reference a payment.