Per-user / per-quantity recurring billing. What are alternatives to Stripe? - paypal

I am looking for alternatives to stripe's per-user pricing subscription : I need :
to charge my user a recurring payment which depends on the number of user accounts he has
to be able to change the number of users via an API, with customer validation is ok, but ideally without changing a plan nor creating a new type of plan. Check status, cancel, etc. via the API too.
Ideally with no up-front charge = fee + percentage of transaction
I found out that stripe might be a good option (see per-user pricing here https://stripe.com/docs/subscriptions) and unfortunately Paypal does not seem to offer this kind of feature (plans can only be increased by 20% each 180 days or you need to cancel previous profile and create a new one). Or am I mistaking about Paypal ?
What alternatives would exist for such needs?

What you want are Reference Transactions, in which case you run an original authorization or sale transaction, and then in the future you'd run DoReferenceTransaction with the original transaction ID and any new amount you need to process. It will process immediately without any redirection or additional authorization required at that point.
If you use reference transactions with Payments Pro (direct credit cards) then all you need to do is save the original auth or sale transaction ID to your database so that you can pull it out for the user when you need to process a future payment using DoReferenceTransaction.
For PayPal payments you'll use Express Checkout w/ Billing Agreements, which will give you back a billing agreement ID. In that case, the billing agreement ID is what you'd pass into future calls to DoReferenceTransaction.
In either case you'll need to build your own system to lookup payments that need to be processed each day and loop through them making a call to DoReferenceTransaction for each one.

Related

PayPal Express Checkout with a mix of one time purchase and recurring payments through the REST API

I am using the PayPal REST API and would like to create a transaction that includes a combination of recurring and one-time payments in a single transaction.
According to the documentation for the NVP integration, it seems such a transaction is possible. However, I'm not sure how to accomplish the same using the REST API. I have searched the REST API documentation as well as the .NET SDK examples and cannot find an example of a transaction that uses a mix of recurring and one-time payments.
Our use case: We process transactions for downloadable software - most of the products are one-time purchases, but some of the products (such as anti-virus products) have a recurring billing component associated with them. As such, we need to process a single transaction where one of the items is a regular purchase, and the other is a part of a recurring plan. We plan to process these transactions using the "PayPal" payment method (i.e. not direct credit card). Specifically, we'll be using Express Checkout.
Any guidance would be much appreciated. Thank you!
Based on what you're doing about, here's what I think your best course of action might be:
When you have a user checking out that may have some multi-month subscriptions, and some single time subscriptions, you set up a new billing plan with each item to be purchased. For the subscriptions, you set up an entry that is set to multiple months, and for a single payment you set a single month payment (see https://developer.paypal.com/docs/integration/direct/create-billing-plan/ for an example of multiple entries).
Next, you need to execute that plan for the user via a billing agreement (https://developer.paypal.com/docs/integration/direct/create-billing-agreement/). Within the billing agreement you can set the start date to execute immediately, which should complete the checkout process for both billing orders right then.
Let me know if that works out for your scenario.

Which PayPal API for variable billing

I have a site that bills variable monthly amounts based on the subscriber's usage (typically $3 to $60). Currently, the 200 or so subscribers set up a monthly PP subscription that may or may not match their usage. I would probably use IPN to collect that info, but currently do it by hand.
I would like to use an API to request and receive the exact monthly amount. Which API? I have read elsewhere that Adaptive Payments may be the one to use, but is that appropriate/accessible to my business size?
Additionally, where would I post a request for a programmer for such?
You would need to utilize Reference Transactions for that.
Basically, you setup a billing agreement with the user an then you can use the Billing Agreement ID that you get back with the DoReferenceTransaction API any time in the future to process any amount necessary without further approval.
So you'll need to create your own system to automatically process payments on a daily basis as necessary, but this method will allow you to handle variable amounts.
If you're using Payments Pro you can do the same thing, but you don't do a "billing agreement". What you can do instead is run a $0 authorization, and then you would use the transaction ID you get back from that in the DoReferenceTransaction request instead of a Billing Agreement ID.

Do I need to execute my PayPal BillingAgreement one time only or every time the bill is due

I am trying to incorporate a member subscription on my website using the paypalrestsdk with python in a django application. I understand that I need to do the following:
Set up a BillingPlan for each type of subscription (ie. a monthly plan for $10 a month and a yearly plan for $100 a month)
Create a BillingAgreement, which (based on the user choice of billing plan) redirects the user to approve the agreement and which returns the agreement object which will give me the ability to access the plan information in order to update, suspend, reactivate the agreement.
Finally, in order to get started, I need to execute the BillingAgreement. This is the part that confuses me. Do I execute the agreement each month (for my users who have agreed to monthly subscription) or do I execute the agreement one time in order to tell PayPal to automatically process the monthly payment? If the latter case is the answer then how would I know if a payment failed for some reason? (Or do I need to check every time the user logs in by retrieving their BillingAgreement and searching for transactions within a particular date range for that agreement to make sure they are up to date and none of them failed?)
I have looked at the PayPal developer docs as well as GitHub samples. I have also successfully written code to create and execute one-time payments using the sandbox and all seems to be working just fine. I am just confused by how the recurring payments in the REST api work - specifically see #3 above.
You do not need to execute the billing agreement each month but only once to start the agreement i.e. tell PayPal to automatically process the monthly payment.
You can use the search for transactions feature to check that none of the payments of a user failed, but you might only need to do that at the start of every monthly payment cycle for a particular user. As opposed to everytime they log in. In the future, we will try to provide better notification mechanisms to inform the merchant that a payment on a billing agreement has failed/changed status.

Get Transactions associated with a Recurring Payment Profile in Paypal

I have gone through nearly all the question related to Recurring Payment using Paypal and have not found a solution to my problem.
We are implementing a system that is subscription based on a monthly basis (fixed amount). We do not want to store CC details for security reasons, hence we are trying to use Website Payments Pro from Paypal.
Once a user agrees to recurring payments, we are creating a RecurringPaymentProfile for that user and are storing the returned Profile_Id for the user.
Now we need to get information about all the transactions related to this Recurring Profile_Id. This information is available when we login to the Paypal account but this needs to be automated so that the application is aware of all the payments and also of the current subscription of the user.
We have found two methods (possibly) to implement this.
1. IPN (Instant Payment Notification, for this we will have to create a service to listen to notifications, which seems to be cumbersome and is more informational than we require)
2. TransactionSearch (but this returns transactions for the Paypal account and not Profile_Id)
Since we just want to know the transaction history associated with the Recurring Profile and whether this months payment was successful (implying the user is active member), what is the best method to implement this ?
Thanks,
You're looking for the GetRecurringPaymentsProfileDetails API Operation. This operation will allow you to view a majority of the details associated with a recurring payment profile using a valid PROFILEID.
Relevant detail fields you may be interested in:
LASTPAYMENTDATE
The date of the last successful payment received for
this profile, in YYYY-MM-DD format.
LASTPAYMENTAMT
The amount of the last successful payment received for this profile.
FAILEDPAYMENTCOUNT
The total number of failed billing cycles for this profile.
NEXTBILLINGDATE
The next scheduled billing date, in YYYY-MM-DD format.
NUMCYCYLESCOMPLETED
The number of billing cycles completed in the
current active subscription period. A billing cycle is considered
completed when payment is collected or after retry attempts to collect
payment for the current billing cycle have failed.

Changing the Amount of a PayPal Subscription

We are using PayPal subscriptions to automatically make ongoing monthly donations. The user initially creates a subscription with some pre-determined monthly donation amount (e.g., say $50/month). This creates a recurring subscription which we process by way of IPN. All good there. But, our interface allows the user to come in and change their monthly donation amount, say from $50/month to $100/month. I am wondering how I can change the PayPal subscription to reflect this new amount?
There is a method in PayPal's NVP API called "UpdateRecurringPaymentsProfile" which says I can update the subscription amount, but unfortunately it says:
For recurring payments with Express Checkout, the payment amount can be increased by no more than 20% every 180 days (starting when the profile is created).
(reference: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_UpdateRecurringPaymentsProfile)
To be honest, PayPal's API's are quite confusing so I'm not sure if I am using the Express Checkout or not. (We are creating Subscription buttons using the simple Website Payment Standard API).
Will this work? If not, is there an alternative to achieve what we need?
Thanks!
I'm not sure if I am using the Express Checkout or not. (We are creating Subscription buttons using the simple Website Payment Standard API).
I hope rereading the above, you will realize that you answered your own question: You are using Website Payments Standard (WPS) not Express Checkout (EC).
With WPS, you can create a subscription modify button but this is super inflexible and I would not recommend it.
With EC, you can modify subscriptions as well (page 99):
Use the UpdateRecurringPaymentsProfile API to modify a recurring payments profile.
NOTE: You can also modify recurring payments profiles from the PayPal website.
You can only modify the following specific information about an active or suspended profile:
Subscriber name or address
Past due or outstanding amount
Whether to bill the outstanding amount with the next billing cycle
Maximum number of failed payments allowed
Profile description and reference
Number of additional billing cycles
Billing amount, tax amount, or shipping amount
NOTE: You cannot modify the billing frequency or billing period of a profile. You can
modify the number of billing cycles in the profile.
NOTE: For recurring payments with Express Checkout, certain updates, such as billing
amount, are not allowed within 3 days of the scheduled billing date, and an error is
returned.
You can modify the following profile information during the trial period or regular payment
period:
Billing amount (excluding tax and shipping)
Number of billing cycles
With that information out of the way... For the most flexibility:
Look at creating Billing Agreement IDs through Express Checkout. You will need to get Reference Transactions enabled on your PayPal account (talk to merchant support to get this done).
With a BAID, you control when your customers are charged, how much they are charged, and pretty much anything else having to do with the transaction. The drawback is the same as the benefit.. you (see 'have to') control it all.