Migrate old subscriptions to stripe - api

We have an existing saas app where we used to handle payments for subscriptions offline in a manual way. (They pay us directly to our accounts and we update their subscription data in our database manually).
Now we are moving over to stripe so that customers can automatically add/renew their subscriptions on our platform (via stripe).
Since our app queries stripe to fetch the customers current subscription, we will have to somehow move all old subscriptions to stripe but I am not sure how to proceed with that.
What I expect at the end:
Add a subscription for all old customers to stripe WITHOUT charging the customers anything (as they have already paid to us outside of stripe).
Then when the subscription ends, let stripe proceed with its flow of auto-charging the customer.
I don't really care if the interval of the new subscription in stripe is from today to today+365days even though the customer purchased our services 3 months back (we don't mind giving him an extra 3 months for free)
What i tried and didn't work:
Create a subscription manually for the customer (via the api/dashboard) but stripe throws an error saying no payment method set for the customer which leads me to believe that stripe will want to charge for this subscription.
Approaches that I am evaluating:
Create a coupon with a 100% discount while creating a subscription for the old customers. But I am not really sure if this is the right way to approach this (what happens to stripe fees here?)
I would really appreciate it if someone can shed some light on what approach to take here?
Thanks!

I believe you can create a Subscription with a trial period. Ie. If your customer purchased your services 3 months back, you can create a Subscription with trial period = 9 months, or even 1 year if you don't mind giving them 3 months free until today + 365 days.
When a subscription is created with a trial period, it won't ask for a Payment Method. When its billing cycle is approaching, Stripe will send a trial_will_end webhook event for you to start collecting your customer payment method.
There is also a Stripe's official doc for trial Subscription.

Related

How to set trial period in shopify app?

I have created shopify app and setting up billing Api. In the App, I want to apply trial period of 20 days. I have created the charge during the app installation and send customers to confirmation url so that they can accept or decline the charge.. So I want to know that if customer decline the payment charge, then can he uses the app featurs till trial period?
If a customer declines the subscription, you still get the confirmation URL callback. Examine the charge. The status will say declined. At this point you can kill off their DB token and destroy their session. This will ensure they cannot use your App as they declined the terms.
It is one bad aspect of the whole billing scenario. I have lots of customers that are faced with a question they don't read. So they assume the trial you offer for free is activated by declining the subscription. Silly customers... still cannot operate the Internet :)

Paypal Pro API for monthly payment with variable amount each month

I need suggestion for paypal pro API which allow me to pass variable amount each month. For some months,it can be zero too.
I tried with UpdateRecurringPaymentsProfile but it gives me error of 11592 (Subscription profiles are not supported for recurring payments).
Please someone help me with easiest solution.
Based on the error you mentioned it sounds like you're using a PayPal Standard Subscription button, not Pro. If that's the case, then as the error says, you cannot update standard subscriptions with the APIs. You would have to use the recurring payments API to create the profile in order to then update it.
That said, you won't be able to do variable amounts with recurring payments profiles. you can only raise them by 10% every 120 days, so that typically doesn't work with what you're trying to do.
Instead, you'll need to use reference transactions. So if you're using Payments Pro that will be real simple. You just pass in the transaction ID of an original authorization or sale transaction along with a new amount you need to charge. PayPal uses the card details on file to process the new amount.
If you're using DoDirectPayment then you'll use DoReferenceTransaction for the future payments. If you're using PayFlow you would use the PayFlow API, of course, and change the parameters to match a reference transaction request.
You can also do the same thing with PayPal Express Checkout, but in that case you'll need to include billing agreement parameters in the SetExpressCheckout request, and then you'd use the billing agreement ID you get back from that in the DoReferenceTransaction request.
In any case you'll need to build your own script to run everyday, pull profiles that need to be charged, and charge them accordingly.

variable monthly charges to users

I have a situation where I am to bill the site users monthly. But the invoice amount that is raised depends on the the leads that our site generates for his business. For example if the user gets 5 leads from my site and I charge him $10 per lead, at the end of month he will be charged $50. similarly leads might vary each month so will the amount.
Now I cant store his cc/ paypal credentials on my site for security reasons nor can I pre bill him or ask him to take credits and then use it. Please let me know the way to handle this situation. How can I handle this using paypal?
There are a few different ways to handle this, but I would recommend Preapproved Payments, which are part of the Adaptive Payments API.
With this method your users would create a profile with you (using the Preapproval API) when they first create their account on your site. That will give you a preapproval key that you can store with your user account. Then in the future when you need to bill them you can use the Pay API with the preapproval key to process funds immediately without further approval.
If you're working with PHP my class library for PayPal will make these calls very simple for you. You would just use the Preapproval.php template to setup the profiles for people, and then use PayWithOptions.php to process payments using the preapproval key(s) accordingly.
If you end up using it and need more help you can contact me directly for support.

Track magazine subscriptions with shopify

My client sells magazines. However, for cash-flow purposes they only take a payment once for one- and two-year subscriptions.
e.g. You buy "one year" at checkout, and for the next 12 months, the warehouse sends you magazines.
I've seen recurring order plugins for Shopify, but nothing that fits the bill. The ideal workflow would go something like:
Customer buys 1-year subscription
Customer's magazine shows on a pick-list every month for the next 12 months (the end of the subscription period)
Cancelling a subscription triggers a partial refund
Is there anything in Shopify that does this, or will we need custom development?
Shopify will handle the payment and refund scenarios. In addition you will need to keep track of subscribers. You can create a simple App that maintains a database with the ability to query current subscribers, using webhooks to track purchases and refunds.

subscription payment processing

Looking for some advice on which service to use to implement the following on my site:
I would like to sell 4 levels of subscriptions each to be billed on a monthly basis
The customer should be able to cancel their subscription at any time
The customer should be able to upgrade and downgrade their subscription at any time
I would like to keep the cost down until I have enough subscribers.
I have looked at Paypal but could not figure out how I can do requirements #3. Posting to their community forums yielded no response.
I am also located in Canada which seems to limit the options available to me.
I am currently looking at www.preedly.com and www.chargify.com but they seem to require a merchant account so I'd end up paying 2 service providers.
My site is written in PHP so a PHP-friendly solution is needed.
One last thing, I could not find a way to get Paypal to tell me the new subscription expiry date (following the successful processing of a transation) in order for me to update my customer table and lock out those who have not paid.
You may want to look into gettings a US based merchant account (I used to work for a merchant account provider and we were able to successfully establish merchant account for Canadian businesses. IIRC it required some hoops to be jumped through, though). If you can get a US merchant account you then can use Authorize.Net's Automated Recurring Billg (ARB) API. It allows you to create subscriptions and modify them accordingly (upadting and deleting).