Live data from Hacker News

Implementing API Billing with Stripe

daily.co

31–40 of 84 posts

Re: Implementing API Billing with Stripe

#31
post #27
post #19

I've just finished a Stripe integration[0]. Given Stripe's developer first reputation I thought this would an easy job that wouldn't take more than a couple of days. Boy was I wrong! In the end, it took me about 3 weeks. Small disclaimer here, I was implementing Stripe Billing, not Stripe Payments. The Billing suite is a lot more complicated compared to the Payment suite. Nonetheless I took me a really long time to f…

I'm a Stripe fan, so my perspective on this is that Stripe has done an incredible job making "easy things easy," and a pretty good job making "hard things possible." There are things I'd love to see added to the Stripe Billing APIs (some of which I mentioned in the article), but I have a really healthy respect for the amount of good work that's gone into the design of an API that, as you say, touches just about every…

Yes and no. Some parts of the documentation can be clarified in my opinion.

For example: if you change the default payment method of a Customer, the default payment method of all this customer's Subscriptions is not changed. The documentation is not clear about that.

Also, if you remove a payment method from a customer, the subscriptions seems unaffected. If you're not careful you might still end up charging this customers card when the subscription auto-renews.

I'm still a fan of Stripe though. I have my fair share of experience implementing other PSP's and they were an unbelievable PITA. As far is my experience goes, Stripe is miles ahead of their (european) competitors.

Re: Implementing API Billing with Stripe

#32
post #10
post #7

Earlier quoted context omitted.

How does that match the use case here, with billing per minute? If the user has to confirm each subscription, you can't efficiently create new subscriptions for e.g. each call. You also can't know beforehand how much you'll need to bill. If you're at the end of the month sending a single "here's everything" request, I fail to see how that's different from what's described in the article.

Paypal has APIs that support that. Example: https://developer.paypal.com/docs/classic/express-checkout/e...

Doesn't appear to have a non-deprecated replacement new users could use though?

Re: Implementing API Billing with Stripe

#33
post #27
post #19

I've just finished a Stripe integration[0]. Given Stripe's developer first reputation I thought this would an easy job that wouldn't take more than a couple of days. Boy was I wrong! In the end, it took me about 3 weeks. Small disclaimer here, I was implementing Stripe Billing, not Stripe Payments. The Billing suite is a lot more complicated compared to the Payment suite. Nonetheless I took me a really long time to f…

I'm a Stripe fan, so my perspective on this is that Stripe has done an incredible job making "easy things easy," and a pretty good job making "hard things possible." There are things I'd love to see added to the Stripe Billing APIs (some of which I mentioned in the article), but I have a really healthy respect for the amount of good work that's gone into the design of an API that, as you say, touches just about every…

Stripe's generally consistent, except for three different ways to enter a name:

     name
     account_holder_name
     first_name + last_name
And four different structures for addresses:

     address_line1
     address.line1
     legal_entity.line1 (a personal address, old as of new version)
     legal_entity.personal_address.line1 (personal address when the prior is a business, old as of new version)

Re: Implementing API Billing with Stripe

#34
Stripe was much more complicated than it seemed. At the end i used Chargebee which did a lot of the work.

A lot of things were abstracted away and i got a much better admin panel and can change payment processors anytime.

Re: Implementing API Billing with Stripe

#35
post #20

This was a really interesting article, thanks for writing! At my last startup, we used our DB as the single source of truth. I think using Stripe as the source of truth like you suggest would have alleviated a lot of our issues keeping things in sync. My biggest pain point though was around managing features on the client side. We had a bunch of different plans from lots of iterating (and customers coming from differ…

Yeah, I definitely feel your pain regarding iterating on plans and features. Stripe explicitly makes it hard to modify most aspects of Stripe-level plans after they are created, which definitely is the right call because user expectations about recurring payments need to remain stable. But that means you have to build your own plan->feature mapping to manage a proliferation of plans, if you do any experimenting with…

Agreed, making the plans hard to modify definitely makes sense, but then I feel like I need another abstraction on top of Stripe. Have you come across any good ways for handling this?

Re: Implementing API Billing with Stripe

#36
post #25

And here's your startup idea: Build a complete and configurable front-end to Stripe Billing that does all the hard work behind the scenes and lets existing Stripe users "upgrade" to billing without the implementation pain. I've researched something like this some months ago and couldn't find anything that had the quality and features we needed. I'm sure lots of companies would pay for a solution like this (my company…

I know it's not specific to Stripe, but it seems there are products out there like ChargeBee that cover a lot of the use case.

Re: Implementing API Billing with Stripe

#37
post #25

And here's your startup idea: Build a complete and configurable front-end to Stripe Billing that does all the hard work behind the scenes and lets existing Stripe users "upgrade" to billing without the implementation pain. I've researched something like this some months ago and couldn't find anything that had the quality and features we needed. I'm sure lots of companies would pay for a solution like this (my company…

That sounds a bit like Drew Wilson's Plasso, which was recently acquired by GoDaddy and promptly shut down.

https://web.archive.org/web/20181206180323/https://plasso.co...

Re: Implementing API Billing with Stripe

#38
post #28
post #25

And here's your startup idea: Build a complete and configurable front-end to Stripe Billing that does all the hard work behind the scenes and lets existing Stripe users "upgrade" to billing without the implementation pain. I've researched something like this some months ago and couldn't find anything that had the quality and features we needed. I'm sure lots of companies would pay for a solution like this (my company…

I had a similar impression when I was implementing Stripe for my business. It seems like there's a lot of boilerplate and heavy-lifting that I would have preferred to just abstract away using some existing service instead of spending the hours on getting it working in a way others probably already have. Would you be open to sharing your thoughts on how you'd like something like this to work? I might be interested in…

I have something just about ready to launch that tries to do this. My goal is to make creating web apps as simple as blogging is when you use WordPress.

https://userappstore.com/public/2-powered-by-dashboard.png

https://github.com/userappstore/dashboard

I am putting the finishing polish and fixes on a platform and marketplace using this software, just working on the final integration tests that verify it all works together.

Re: Implementing API Billing with Stripe

#39
post #27
post #19

I've just finished a Stripe integration[0]. Given Stripe's developer first reputation I thought this would an easy job that wouldn't take more than a couple of days. Boy was I wrong! In the end, it took me about 3 weeks. Small disclaimer here, I was implementing Stripe Billing, not Stripe Payments. The Billing suite is a lot more complicated compared to the Payment suite. Nonetheless I took me a really long time to f…

I'm a Stripe fan, so my perspective on this is that Stripe has done an incredible job making "easy things easy," and a pretty good job making "hard things possible." There are things I'd love to see added to the Stripe Billing APIs (some of which I mentioned in the article), but I have a really healthy respect for the amount of good work that's gone into the design of an API that, as you say, touches just about every…

You're right, their documentation is great and the API is nice to work with, but you are forced to do things their way. I was recently working with Billing and ran into a pretty big issue: A customer on a recurring plan upgrades to a more expensive plan. As long as the customer has a valid source on file, the upgrade is processed. Stripe's default is to adjust the payment to be collected and charge it on the next invoice, which comes at the end of the billing period. If you want to charge the difference immediately, you can by manually forcing an invoice. The problem is that the invoice doesn't close for 24 hours and you can't force it to close any faster. If the customer's payment source is declined when the invoice closes, you just gave them 24 hours access to your premium upgrade which you now have to detect and rescind after being alerted via a webhook. There's nothing in the documentation that warns about this or offers a solution, and worse yet, rolling the user back to their previous plan is not an option. For some use cases, it might not be a big deal, but for most businesses that is a nightmare. The easy stuff is indeed easy, but once you start to wander off of The Path, things can get very difficult.

Re: Implementing API Billing with Stripe

#40
Maybe noob questions, but how to do tests with stripe API? For example, how to write a test for plan upgrade? From what I remember there can be set testing env in stripe but the shortest subscription time was 1 day, so how to use it in automatic tests?
Post reply on HN