Setting up automated payments - paypal

We use PayPal classic APIs.
We have a Linux server with some application/database running on it.
Users pay pages for ocr processing.
We need to offer to our users an option to make automatic payments when some condition is occured.
For example: when the user have left only 100 available pages.
In this case we want to offer to user something as "pay with PayPal 1000 pages everytime when my account have less than 100 pages".
Is this possible to do it with PayPal API?

Asolutely, this is simple to accomplish. If you prefer the Express Checkout API suite, the Reference Transactions product allows you to collect permission to re-bill your customers for additional goods and services when they check out. Then you call the reference transaction API when the event you are interested in (such as the user's inventory of prepaid pages gets low) occurs.
See:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECReferenceTxns/
Other PayPal products support similar behavior in combination with Adaptive Payments, the RESTful APIs, etc etc.

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.

Specifying Sales/Other Tax component with Payflow

We're integrating Payflow Gateway on a ecommerce portal. Considering that customer already has a Payflow account (via Chase), they prefer to go with the same.
After referring to PayPal docs, I'm not sure if tax component can be specified during a Sale (for certain US states and Canada users) and that PayPal displays it as part of Order Summary (Hosted Checkout Pages). Has anyone tried this?
If not, alternately, looks like we can use ExpressCheckout API which internally processes transactions via Payflow and then we can make use of expressive EC api to specify tax details. Any insights on this?
Notes:
In reply to my ticket, PayPal tech support says, hosted checkout pages will not show anything other than total amount. :(
However, I did find references to fields like ALTERNATETAXAMT in their developer guide. I presume, it is processor specific.
Ref: https://developer.paypal.com/docs/classic/payflow/integration-guide/
End Goal (no solution yet):
User should see sub total, tax and grand total during Order Review.

Paypal subscription to different number of projects

I am trying to create a subscription feature on my site. The users can subscribe to a number of projects (from 1 to 30). The price of a projet: 10$.
For subscribing I use a the Subscription button. I validate the payment using the IPN from paypal. All ok.
Now I want to give to users the possibility to change the number of projects they are subscribed for. But the paypal doesn't allow an increasing of payment more than 20%.
How can I change the user's subscription ? Should I remove his profile (not sure if I understant what it is) and create a new one ?
As you saw in the documentation, PayPal Subscriptions product doesn't seem like a good match for your requirements. You could have someone re-subscribe with new (higher) premium, but you probably would be better off with a product that allowed you to simply change the recurring amount billed.
PayPal has several other products that allow you to do that; hopefully one will meet your needs. In particular look at Recurring Payments & Reference Transactions (within PayPal's classic product suite) or Future Payments (within PayPal's RESTful API suite).

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 for amazon like site

I am developing a website where the users can sell their products. Users can then also buy products on the site, obviously, lol. However the problem is that I am currently using Paypals Parallel Payments and it limits the number of items a user can buy to 6 different sellers at a time including the sites fee.
So I was thinking about switching to using PayPals Masspay API instead. It would work like this. The user buys as many products as they want up to the limit of 250 different users using eithier the Masspay api if acceptable for 1-to-1 payments or something else. Once the payment is completed to the sites paypal account, It will start a masspay api call to pay all the differn't users upto 250 users using the funds from the payment to the site once those are completed.
Also I am limited to paypal right now so I can't use any other payment services.
So is this ok to do or is this a bad way to do it maybe for some security reason I do not know about?
It seems like the only good option, on the plus side, it benefits from the lower fees that masspay offers vs the %2.9 + 0.30 Cents.
First, you'd have to get it approved by PayPal to enable MassPay for your account.
Then, you'd need to be careful about chargebacks and dealing with refunds. If somebody submits an order for $1k, for example, and you dispersed that money among 25 different people, and then the buyer submits a dispute with their credit card company to get that $1k back, you'd be stuck trying to collect all those pieces from all the people you distributed to.