TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Implementing API Billing with Stripe

180 点作者 kwindla大约 6 年前

14 条评论

base大约 6 年前
<p><pre><code> A good first question to ask about a data model is, &quot;where does the data live?&quot; In general, we think it&#x27;s a good idea to make Stripe the &quot;one true source&quot; for as much of your customer and billing data as possible. </code></pre> 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 methods.
评论 #19560652 未加载
评论 #19557948 未加载
评论 #19557758 未加载
评论 #19560830 未加载
评论 #19557923 未加载
评论 #19559917 未加载
评论 #19562939 未加载
stevoski大约 6 年前
Stripe&#x27;s &quot;getting started&quot; documentation, as well as this article, show us how easy it is to get started with Stripe - if you ignore the existence of taxation.<p>The article is completely missing any mention of tax, be it sales tax or VAT. This is my biggest complaint of Stripe.<p>For a lot of us, we live in countries where we simply _have_ to start collecting and remitting tax from the very first customer.
评论 #19562038 未加载
评论 #19561960 未加载
LeonM大约 6 年前
I&#x27;ve just finished a Stripe integration[0]. Given Stripe&#x27;s developer first reputation I thought this would an easy job that wouldn&#x27;t take more than a couple of days. Boy was I wrong! In the end, it took me about 3 weeks.<p>Small disclaimer here, I was implementing Stripe Billing, not Stripe Payments. The Billing suite is a lot more complicated compared to the Payment suite.<p>Nonetheless I took me a really long time to figure out all the special cases such as: renewing a card, switching to a different payment method, up&#x2F;downgrading a plan, multiple currencies, etc.<p>At some point you&#x27;ll be almost finished with the integration and only then do you find the need to implement webhooks for certain asynchronous payment methods (especially needed when you are in Europe). Once implemented, webhooks give you endless new workflows to handle, and many race conditions between your frontend and backend. So it constantly feels like one step forward and two steps back.<p>I don&#x27;t think it&#x27;s Stripe&#x27;s fault though that my implementation took so long. Stripe&#x27;s documentation is pretty solid. It&#x27;s just that billing touches just about every part of your stack (frontend, backend, database, testing, tooling, accounting) and it&#x27;s painful if you find out you have a bug that caused you to over&#x2F;undercharge a customer. You need to take your time to get it right.<p>[0] shameless plug: <a href="https:&#x2F;&#x2F;www.mailhardener.com" rel="nofollow">https:&#x2F;&#x2F;www.mailhardener.com</a>
评论 #19558027 未加载
评论 #19557979 未加载
eleclady大约 6 年前
I found Stripe usage quite complicated. It felt like they were handling very complex use cases at the expense of simpler ones (which are probably the majority).<p>It&#x27;s one of those things where once you&#x27;re already &quot;in the know&quot;, the simple use cases are in fact simple to implement. But sifting through the massive and complex API set, with outdated and partial documentation&#x2F;examples all over the internet, it&#x27;s very difficult to get into. Every single example starts with &quot;this is not production ready...&quot; And the official docs are difficult to piece together into an &quot;E2E best practices&quot; setup.<p>Not saying there is a better solution, just that as a competent dev with a simple use case, I found Stripe overly complex.
评论 #19557802 未加载
sbr464大约 6 年前
Thanks for sharing.<p>I’m curious why there is an even number of cents requirement on stripe’s end?<p>I’m also not a fan of the quantity 1 line item rollup, although I understand the workaround. For the customer receiving the invoice, it makes it harder to breakdown the invoice in an automated way, since the detail info is moved to a text block.
评论 #19557650 未加载
servercobra大约 6 年前
This was a really interesting article, thanks for writing!<p>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.<p>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 different sources that had similar but slightly different experiences), so it became hard to decide &quot;should I allow the user to see this feature&#x2F;do this action?&quot;. I haven&#x27;t yet seen a great way to handle that. The plans literal here looks like a great starting point though!
评论 #19557895 未加载
homero大约 6 年前
Stripe was much more complicated than it seemed. At the end i used Chargebee which did a lot of the work.<p>A lot of things were abstracted away and i got a much better admin panel and can change payment processors anytime.
jwr大约 6 年前
I so wish Stripe would stop ignoring a number of countries and make their billing available there (Poland is an example). I am stuck with Braintree and it is not a happy ride.
评论 #19559079 未加载
rsp1984大约 6 年前
And here&#x27;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 &quot;upgrade&quot; to billing without the implementation pain.<p>I&#x27;ve researched something like this some months ago and couldn&#x27;t find anything that had the quality and features we needed. I&#x27;m sure lots of companies would pay for a solution like this (my company included).
评论 #19558055 未加载
评论 #19558397 未加载
评论 #19558492 未加载
Kiro大约 6 年前
&gt; Usage data needs to be sent to Stripe continuously. There&#x27;s no way to submit usage data to Stripe after the end of a billing period.<p>I don&#x27;t understand how this is supposed to work when you&#x27;re sending in aggregated data. How can you know before the period has ended?
pplonski86大约 6 年前
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?
评论 #19558940 未加载
评论 #19565457 未加载
评论 #19558971 未加载
digitaltrees大约 6 年前
I built a prototype for health care last week. Daily is awesome. Keep it up!
klaudius大约 6 年前
Stripe is touted as &#x27;developer-friendly&#x27;, but it&#x27;s not all it&#x27;s cracked up to be. I think PayPal is underrated here.<p>- Stripe&#x27;s list of prohibited businesses is much larger than PayPal&#x27;s. They are not business-friendly.<p>- PayPal is available in over 200 countries. You can accept payments in many countries Stripe is not available in.<p>- On PayPal you can start accepting payments immediately, no need to submit complex business docs.<p>- PayPal is easier to setup (Paypal.me link, buttons, send via email etc.) and has lower fees for small transactions.<p>- People might be more comfortable buying from a relatively unknown site when they are using trusted 3rd party provider like PayPal.
评论 #19557730 未加载
eruci大约 6 年前
This is unnecessarily complicated. That&#x27;s why I handle all subscriptions with PayPal.
评论 #19557333 未加载
评论 #19557522 未加载