Live data from Hacker News

Implementing API Billing with Stripe

daily.co

71–80 of 84 posts

Re: Implementing API Billing with Stripe

#71
post #8

A good first question to ask about a data model is, "where does the data live?" In general, we think it's a good idea to make Stripe the "one true source" for as much of your customer and billing data as possible. Our company went the opposite way, we have our own model and we abstract stripe as a payment option supported. Recently with the same model we were able to add Paypal and other country specific payment meth…

I've done it both ways. My last company processed >$100MM/yr of tshirts, split between Stripe and PayPal. Stripe was wonderful; PayPal was hell. It required a lot of engineering effort to build and maintain the system, even as simple purchases (no subscriptions). But if you're selling impulse buys online, PayPal is required. Current company is B2B SaaS, smaller team, and I said "no freaking way" to PayPal. Built the…

Why though? I am using Braintree for cards and paypal and it's a breeze.

Re: Implementing API Billing with Stripe

#72
post #69

Stripe's "getting started" documentation, as well as this article, show us how easy it is to get started with Stripe - if you ignore the existence of taxation. The article is completely missing any mention of tax, be it sales tax or VAT. This is my biggest complaint of Stripe. For a lot of us, we live in countries where we simply _have_ to start collecting and remitting tax from the very first customer.

That's what I'm stuck with as well. Paddle.com has this covered really well, but they have a long way to go in terms of API quality and breadth. Stripe has indicated that they're working on it, but no timeline yet: https://www.indiehackers.com/forum/stripe-onboarding-integra...

Couldn't agree more, cool to see they indicate that they're working on it but then as I'm sure you're aware of there is so much more needed than just the dealing of tax, how do you deal with the likes of managing your chargebacks? Support? - This post expands on how Paddle helps here: http://bit.ly/2Us1OWM

Re: Implementing API Billing with Stripe

#73

Stripe's "getting started" documentation, as well as this article, show us how easy it is to get started with Stripe - if you ignore the existence of taxation. The article is completely missing any mention of tax, be it sales tax or VAT. This is my biggest complaint of Stripe. For a lot of us, we live in countries where we simply _have_ to start collecting and remitting tax from the very first customer.

I've seen way too many "just copy these 5 lines" and you are good to go. With payments this is never that simple.

Makes sense - I guess it's just an unclear emphasis on their offering which essentially is taking that work off your hands. What would you prefer to see?

Re: Implementing API Billing with Stripe

#74
post #8

A good first question to ask about a data model is, "where does the data live?" In general, we think it's a good idea to make Stripe the "one true source" for as much of your customer and billing data as possible. Our company went the opposite way, we have our own model and we abstract stripe as a payment option supported. Recently with the same model we were able to add Paypal and other country specific payment meth…

I've done it both ways. My last company processed >$100MM/yr of tshirts, split between Stripe and PayPal. Stripe was wonderful; PayPal was hell. It required a lot of engineering effort to build and maintain the system, even as simple purchases (no subscriptions). But if you're selling impulse buys online, PayPal is required. Current company is B2B SaaS, smaller team, and I said "no freaking way" to PayPal. Built the…

Out of interest, why did you go down the avenue of hacking together your own system to handle subscriptions? Surely you've limited yourself like you've said you have to build out every time you want to attach another payment method like paypal - Is this not more expensive than looking into a Merchant of Record handling these complexities for you?

Re: Implementing API Billing with Stripe

#75

Stripe's "getting started" documentation, as well as this article, show us how easy it is to get started with Stripe - if you ignore the existence of taxation. The article is completely missing any mention of tax, be it sales tax or VAT. This is my biggest complaint of Stripe. For a lot of us, we live in countries where we simply _have_ to start collecting and remitting tax from the very first customer.

I've seen way too many "just copy these 5 lines" and you are good to go. With payments this is never that simple.

Agreed. It's much more like "just handle these 50 edge cases and you're good to go."

Re: Implementing API Billing with Stripe

#76
post #8

A good first question to ask about a data model is, "where does the data live?" In general, we think it's a good idea to make Stripe the "one true source" for as much of your customer and billing data as possible. Our company went the opposite way, we have our own model and we abstract stripe as a payment option supported. Recently with the same model we were able to add Paypal and other country specific payment meth…

I've done it both ways. My last company processed >$100MM/yr of tshirts, split between Stripe and PayPal. Stripe was wonderful; PayPal was hell. It required a lot of engineering effort to build and maintain the system, even as simple purchases (no subscriptions). But if you're selling impulse buys online, PayPal is required. Current company is B2B SaaS, smaller team, and I said "no freaking way" to PayPal. Built the…

How did you go about implementing a referral program in Stripe?

Re: Implementing API Billing with Stripe

#77
> Usage data needs to be sent to Stripe continuously. There's no way to submit usage data to Stripe after the end of a billing period.

I don't understand how this is supposed to work when you're sending in aggregated data. How can you know before the period has ended?

Re: Implementing API Billing with Stripe

#78
post #8

A good first question to ask about a data model is, "where does the data live?" In general, we think it's a good idea to make Stripe the "one true source" for as much of your customer and billing data as possible. Our company went the opposite way, we have our own model and we abstract stripe as a payment option supported. Recently with the same model we were able to add Paypal and other country specific payment meth…

There is a very nice implementation of this called KillBill: it's a self-hosted invoicing system that can connect to many payment providers like Stripe/Paypal/...

It's really nice to be in control of the invoicing, without having to implement it ourselves, and of course not depend on only one provider. It also has support for taxes with plugins.

Re: Implementing API Billing with Stripe

#79
post #73

Earlier quoted context omitted.

I've seen way too many "just copy these 5 lines" and you are good to go. With payments this is never that simple.

Makes sense - I guess it's just an unclear emphasis on their offering which essentially is taking that work off your hands. What would you prefer to see?

A checklist of cases that I might not thought of. I would group example code around different use case and not around API endpoints.

For example Braintree is good in that sense: https://developers.braintreepayments.com/guides/recurring-bi...

I know it's not a payment gateway's responsibility, but some further handholding on tax and VAT, invoicing issues would be handy.

Re: Implementing API Billing with Stripe

#80

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?

You should never write tests against a live API. Always mock APIs and handle what happens when e.g. they send a 501 response, etc. Stripe has testing libraries in Ruby and other languages which are very easy to use.
Post reply on HN