Stripe customer integration - stripe-payments

have some question about Stripe integration.
Recently, I've had a problem with the paymentmethod limit.
One user had already reached the limit of 400 records.
Temporary, there is the solution to delete payment methods for expired records. This approach has to be more automatic.
So, also there are bunch of repeating paymentmethods. By meaning of repeating is now we have same records repeat themselves more then 2 times.
Probably the logic is not right here, to attach payment methods in this way.
For now this is the solution i figured out. Is it correcnt in this way to make it or not?
Also, I've been pondering about making some new customers if the customer has already reached the pm limit. Here is the question, is there any customer limit for the Stripe account?

There is no limit for customers in a Stripe account (though it's best to confirm with Stripe Support), but removing expired PaymentMethod sounds like a better approach than having multiple customers representing the same individual.

Related

I want to deduct payment on the basis of request used in previously subscribed subscription when user upgrades in stripe?

I am working on stripe subscriptions and have 2 packages basic(400 requests)/month and premium(800 requests)/month and charges 10$ and 20$ respectively. when a user upgrades a subscription, I want to charge a user on the basis of request used. but stripe provides prorated approach and without prorated approach. in prorated approach it calculates payment on the basis of time spent in previously subscribed subscription and remaining time in newly subscribed subscription. but I want to calculate amount to be deducted from my own calculation because it might be possible that the user used only 2 requests in the first 15 days and then upgraded the package. however, I can use usage based pricing model but in this case I have to tell stripe each time that the user requested so increment the count and also stripe has rate limiting per second. how can I achieve it? thanks
I have tried to implement it with stripe schedules
Your best bet is the Usage based pricing model indeed. Read its Doc carefully or the Pricing Model Doc. Avoid Proration in your case, and make sure to report usage to Stripe.
Rate limiting is a different problem and you would need to deal with it regardless of APIs you are calling.

Is there a way to bulk process customer data in Stripe?

I have a long list of old customers (>10K) in Stripe for which I would like to give a new trial period. Is there a way to bulk process those or we have to do that manually one by one?
I guess this depends entirely on what exactly you mean by 'new trial'. Do these customers have pre-existing Stripe subscriptions?
There's really no way to do this via the dashboard. However if there are no pre-existing subscriptions, you could programmatically create subscriptions for each customer object accordingly. You can specify the trial period on the price or on a per subscription basis.
As there are no batch endpoints for these operations, please be wary of the rate limiting if working with the API in this way

Best way to handle monthly subscription allowance with Stripe?

What will be the best pratice to compute monthly allowance of our service when using a Stripe monthly subscription?
I can see 2 strategies:
Add usage to a monthly usage hash (ie. {month_1: 342, month_2: 20}). Calculate current month based on the Stripe subscription start date. Kind of ignore variance in Stripe subscription actual renewal dates, and require manual intervention to block a customer if renewal doesn't go through.
Have a monthy_allowance (credit counter still avaiable for the current month) variable that is replenish when Stripe fires the successful subscription renewal web hook. It's more tie to the actual subscription status, but I can see being an issue as it seems harder to test and subject to bugs if the web hook doesn't properly receive the event. Can be an issue if some customers got locked out until we manually allow them back in.
I suppose it doesn't really matter in this question, but we are using Ruby on Rails with MongoDB as backend.
If you're talking about having some kind of 'usage credit' that your users will 'use up', and that is replenished when a Subscription charge is made, I think you could likely handle this by just having a bucket (like, a counter) that you draw down when they use something, and you fill up when the Subscription is successfully paid, and where you block them (or provide a way to buy more) when the bucket hits zero.
Does that make sense?

Looking for some one who has implemented Moneris recurring payments for a website subcription

My client is using moneris as our payment gateway for a new subscription based website that I am working on.
I will be using the language PHP
I've looked through their documentation for PHP api and am comfortable with how it works, it seems very straight forward.
One thing was missing in the documentation for me though. There is mention of how to start a recurring payment, how to update a recurring payment, but no mention of how to query a recurring payment?
Some payment gateways allow you to have a POST back URL of sorts that get updates on recurring billing status. This does not seem to be possible with moneris.
How do I go about automatting the process of tracking recurring payments with Moneris? I'd like for my customers to log in and be able to view their transaction history on my site.
This information will also make it easier for me to know when to close accounts. Ie. when a payment fails to go through, or a credit card expires? I don't want for my cleint(owner of website) to have to keep track of the recurring payments and cancel accounts manually?
I got an answer from Moneris:
Hi David, We currently do not have a reporting API or any way of
posting the information from our recurring payments back to your
server. It is something that has been mentioned previously and is
being looked into. We do not have a current ETA on such a solution.

How to charge credit card AND set up automated recurring billing in one step with Authorize.Net

I’m integrating authorize.net into my web application. I’ve used the direct post method (DPM)to charge the account initially. However, for each transaction I also need to set up automated reoccurring billing. How would I go about doing this without asking for the information again, particularly when after DPM posts the initial transaction, the credit card data is no longer available?
I also would like to get the status of each reoccurring transaction so it can be confirmed and followed up on if necessary.
You can't do that with DPM as it takes the user's credit card information off of your website so you don't have access to it. If you want to make an initial payment and then use ARB to create a subscription you need to use AIM with ARB.
You need to use the ARB interface in order to do recurring transactions but there are a lot of problems with it, like lack of support (send an email and wait a couple of weeks for a non-helpful response for example) and weak documentation.
Documentation for SOAP interface for Authorize.net ARB:
http://www.authorize.net/support/ARB_SOAP_guide.pdf
And for the XMl interface:
http://www.authorize.net/support/ARB_guide.pdf
ARB programming documentation:
http://developer.authorize.net/api/arb/
I just switched off of Authorize.net to USAEPAY. Here are some reasons why:
1. When you use Authorize.net ARB, your customer comes on the site to sign up, and you send the ARB request to create the subscription and you get back a success code so you give the user the subscription. Then later that night they actually try to collect the first payment and a lot of times this fails, so you get a spreadsheet emailed to you the next day about the problem. This is terrible because now you lost the opportunity to say to the customer at sign up time that the card is declined. Goodbye sale!
2. I don't know if they added this recently but they didn't have a way to verify if a customer's credit card is still valid. Imagine 3 months into a subscription the card is over the limit, or cancelled, or expired etc. You don't know so how do you prompt the customer to put in a new card? You just stop getting paid, unless you want to manually open these spreadsheets and start emailing customers. YUCK.
USAEPAY works much better, the API is easier, its much better documented and you get email responses in 1-2 days and its less expensive. For example, you can query USAEPAY to get a list of successful payments, and verify that you shouldn't deactivate the account for non-payment:
http://wiki.usaepay.com/developer/soap-1.4/methods/getcustomerreport
Before you go too far with AuthNet I highly encourage you to save yourself a lot of pain and contact FranchisePaymentNetwork (FPN) to get set up with USAEpay.
They can even POST BACK to your website to let you know if a transaction is successful or not for recurring billing transactions and you can query it to verify that customer payments are getting collected so you know if you should expire an account or not.
I am not affiliated with USAEpay or Franchise Payment Network except as a satisfied paying customer / consumer of their services.

Resources