PayPal Charge User Based on Usage - paypal

What is the way to automatically bill my users based on their usage?
I need to bill the user behind the scenes a variable amount every month without any action from their side.
PayPal's subscription model does not work because the amount changes every month based on usage.
Is this possible with PayPal?

You will need either 'Reference Transactions' on the PayPal business account -- or the Braintree gateway. Contact PayPal at https://www.paypal.com/smarthelp/contact-us or https://www.braintreepayments.com/country-selection about approval for either.
If approved for you, either is its own specialized integration or v2 Vault API they should give you some guidance on.
(The PayPal v1 Vault API will not help you)

Related

Pay as you go with Paypal

I want to implement a pay as you go with Paypal, as I read the subscriptions API we need to create a plan and product, and as I understand it, it works based on the regular payments which obviously we don't want that we want if the user's budget is below a certain amount we recharge the user by a fixed amount again, can anybody guide me how to approach and implement pay as go using Paypal?
You are correct, subscriptions bill on a regular schedule whereas what you are describing is the ability to bill an arbitrary amount at any time.
That feature is called "reference transactions", or sometimes "billing agreements". It is not enabled for PayPal business accounts by default. To request the feature, the owner of the PayPal account should contact PayPal's general business support (note: not technical support) and explain the business need for this reference transactions feature.
If it's approved for the account, PayPal can then guide you on which API integration to use; potentially something like the newest v2/vault.

PayPal Metered Billing / Billing Agreement

I've been looking for a solution everywhere after I saw PayPal mentioned Metered Billing on their developer page.
I would like to use PayPal for my SaaS, implementing a metered billing solution for billing my customers on a monthly basis a variable amount depending on their usage rate of the service.
I do remember an option for authorizing PayPal to give some software permission to execute payments without any further action from the side of the customer. Unfortunately, I cannot find any valid documentation, and not sure if is possible at all right now.
Is metered billing an option using the PayPal API?
Thank you so much!
What you are looking for is a "Reference Transactions" solution, which use PayPal Billing Agreements. 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 is for classic APIs: https://developer.paypal.com/docs/classic/express-checkout/ec-set-up-reference-transactions/ . Any newer API or vault solution isn't publicly documented currently, though I have seen some links surface about a v2 vault solution.
So, you can always contact PayPal's support and ask if there's something they'd rather you implement than classic APIs. The first hurdle is the business approval for the feature mentioned earlier.

Saving a paypal account for a user to my web application

I have a web application that allows users to purchase products online. I would like a user to add a paypal account to his or her account such that the next time, he or she needs to checkout, the paypal on file shall be used.
I do not want to store the payal details on my server instead i am looking for a service like paypal credit card vault.
An advantage for saving the paypal on vault is a user shall not be needed to enter email and password all over again.
Does paypal have a service like the one i describe?.
Yes, you can do this. It's done by creating a Billing Agreement and then processing future Reference Transactions based on that billing agreement.
This gives you a lot of power to process any amount at any time without further approval from the buyer. As such, this requires heavy vetting from PayPal.
They will only approve you for it if you're doing very high volume (millions of dollars per year) in most cases. But yes, it can be done.
Keep in mind that PayPal itself provides a "One Touch" feature so people can quickly checkout without entering credentials in the future. So they've basically built what you're wanting to do directly into the Express Checkout experience.

automatic payment by paypal vault and store the credit card

i understand we can store our client credit card information by paypay restful api by vault.
My questions are:
I tried this solution already in my paypal sandbox and it looks fine. But before executing this payment, it seems no approval is needed from my client. Is it normal?
Can I store this card id and charge my client in the future? Can I schedule some scripts to charge my client on weekly basis without their approval by vault method?
It is like recurring billing?
From this link
https://developer.paypal.com/webapps/developer/docs/integration/direct/rest_api_payment_country_currency_support/#direct-credit-card-payments
paypal said Direct Credit Card Payments is only available in US and UK.
I am not in UK neither US.
Can I use vault to charge my client?
Thanks.
That is normal, you should get the approval when you are storing the card, explaining to the user what they are consenting to. Within the valid_until range as in https://developer.paypal.com/webapps/developer/docs/integration/direct/store-a-credit-card/ , you should not need additional approval for charges.
You can store the card token and charge client in the future, in effect achieving something similar to recurring billing. https://github.com/paypal/rest-api-sdk-nodejs/issues/3#issuecomment-37940026
That is correct, you can only use direct credit card payments (which includes Vault) only in the US and UK for now.

Recurring Payments in PayPal

I am trying to use the Recurring payment API offered by PayPal.
I have a scenario which I am not able to address directly. It goes like this.
We have a website where we sell some services. Now the services are charged per user license. A user can buy/cancel user license in between. We want to offer the customer a recurring billing option. We have to notice here that the amount may vary each billing cycle based on the number of user licenses the customer uses during that cycle.
Is there any way I can achieve this using PayPal recurring Payment API's.
I realize this is a very old post, but it still shows up for Google searches, so I thought I'd add:
Paypal does allow you to do this now, using their new adaptive payments api.
Authorize.net also has a service that might work called Customer Information Manager.
The recurring payment option is a fixed amount that the customer pre-agrees to pay each month (or period). To do what you're trying to do, a customer would have to pre-agree to pay whatever amount you decide to charge at a later time. This means pre-authorizing an unknown payment amount, which will not be allowed by any payment service.
Your only options are:
Bill the variable amount each month (i.e. no subscription).
Set up a subscription where the monthly amount is the maximum that could potentially be billed, and then refund the difference each month.
Good luck with #2 - I would never agree to such a thing as a customer, personally.
What you're looking for is covered in the UK by the Direct Debit system, however given the potential for abuse it's very tightly controlled and there are a lot of restrictions and regulations governing it.
I'd strongly suggest you just set up a monthly invoicing system that just bills the client each month.
I don't know its meaning full or not as it is a very old post.
Instead of creating recurring profile on PayPal Server, You can store the customer's credit card on the PayPal using REST API: https://developer.paypal.com/docs/api/#vault then every month you can fetch it and charge it like recurring Payment Or When client is no longer with the services then just remove its card from PayPal.
I suppose Authorize.net SIM method also does the same.
Hope this make sense.