Lurker News
Hi HN! For the past bit we’ve been building Flowglad (https://flowglad.com) and can now feel it’s just gotten good enough to share with you all:

Repo: https://github.com/flowglad/flowglad
Demo video: https://www.youtube.com/watch?v=G6H0c1Cd2kU
Flowglad is a payment processor that you integrate without writing any glue code. Along with processing your payments, it tells you in real time the features and usage credit balances that your customers have available to you based on their billing state. The DX feels like React, because we wanted to bring the reactive programming paradigm to payments.
We make it easy to spin up full-fledged pricing models (including usage meters, feature gates and usage credit grants) in a few clicks. We schematize these pricing models into a pricing.yaml file that’s kinda like Terraform but for your pricing.
The result is a payments layer that AI coding agents have a substantially easier time one-shotting (for now the happiest path is a fullstack Typescript + React app).
Why we built this:
- After a decade of building on Stripe, we found it powerful but underopinionated. It left us doing a lot of rote work to set up fairly standard use cases - That meant more code to maintain, much of which is brittle because it crosses so many server-client boundaries - Not to mention choreographing the lifecycle of our business domain with the Stripe checkout flow and webhook event types, of which there are 250+ - Payments online has gotten complex - not just new pricing models for AI products, but also cross border sales tax, etc. You either need to handle significant chunks of it yourself, or sign up for and compose multiple services
This all feels unduly clunky, esp when compared to how easy other layers like hosting and databases have gotten in recent years.
These patterns haven’t changed much in a decade. And while coding agents can nail every other rote part of an app (auth, db, analytics), payments is the scariest to tab-tab-tab your way through. Because the the existing integration patterns are difficult to reason about, difficult to verify correctness, and absolutely mission critical.
Our beta version lets you:
- Spin up common pricing models in just a few clicks, and customize them as needed - Clone pricing models between testmode and live mode, and import / export via pricing.yaml - Check customer usage credits and feature access in real time on your backend and React frontend - Integrate without any DB schema changes - you reference your customers via your ids, and reference prices, products, features and usage meters via slugs that you define
We’re still early in our journey so would love your feedback and opinions. Billing has a lot of use cases, so if you see anything that you wish we supported, please let us know!

Comments (223) 46 threads

Earlier comments
baobabKoodaa2 replies#
For what it's worth, the landing page is one of the most beautifully designed things I have seen in a long time. Congratz on the launch, didn't want to be so negative. I just hate that this is built on top of Stripe :(
willcodeforfoo1 reply#
I liked it too, reminds me of zed.dev...
agreeahmed#
Thank you, Zed's is so beautiful. Our team's blushing
agreeahmed1 reply#
Thank you, that's very kind of you.

Funny thing about the site: we deliberately tried to keep it single-page because we spent all of the past year building / testing the billing engine, data model, and SDK.

probablypat1 reply#
Do you have any more details on how you designed the site? I see that it was in framer.
literallybatman#
Yooo, founding designer here.

From a technical perspective, building it on framer was pretty easy, though, it has some limitations with more complex SVG imports. I mirrored the Shadcn global.css color variables from the portal on the website for a more consistent vibe. Definitely recommend that.
From a design perspective, I wanted something radically simple, with taste. The narrow width visually demonstrates simplicity at a glance. I love narrow sites. Instinctually feel amazing. The double dashed borders will eventually turn into “flowing” lines. Which is a Flow of funds reference. We also worked with primary studio to help us choose some colors, typography, and patterns we’ll likely introduce later.
Hope this helps!

callamdelaney1 reply#
The reason webhooks are popular is because they are easy, reliable and they work.

Now I might have to spin up a whole area of infrastructure I may not yet have to track eg usage, subscription tier, cancellations etc

agreeahmed2 replies#
Webhooks are absolutely the right tool for async / background jobs, or events driven domains. I’m not sure payments, and its flip side of entitlements, is best modeled as an events-driven domains.

In a perfect world money would trade hands and you’d just see what that meant for the features or value your customers could access accordingly. This is what happens in other domains of online commerce like Shopify. Shopify has webhooks but they are not the primary load bearing site of payment integration for most storefronts.
Payments webhooks were, from what I can tell in the history, a hack for side stepping gnarly problems in domain modeling and read optimization.

lmz1 reply#
Cards don't really need webhooks (unless you get into 3ds). Other payment types may need webhooks because they are fundamentally async.
dxdm1 reply#
3DS is a big deal in Europe, and card payments can be disputed. So I'd argue that credit cards are async, too, at least on some edges that can be expensive to ignore.

Continue this thread — 1 reply

dxdm#
> I’m not sure payments [..] is best modeled as an events-driven domains.

But payments are event-driven in reality. Credit card charges can be disputed, some transactions only succeed after a delay, or transactions or refunds you thought were successful turn out to actually have failed. Some payment methods are more susceptible than others, but even credit cards are affected by some of this.
The point is, stuff will happen to your payments without you initiating the change, and out of your control. Like, you know, events. Now you will need to become aware of them, and either you keep polling updates for a lot of your payments to catch the one that changed, or you have the information pushed to you.
Webhooks are great for that.
(Edited because a word was missing.)

ripped_britches2 replies#
How does this work in terms of having a merchant bank? Surely you need something else besides this repo right?
ghurtado1 reply#
You still need to have a payment provider / merchant account, so that part remains the same

For all I could see this is no different than any other payment gateway service. Well, it is different in one important way: you'll pay a higher percentage per transaction, since the middle man needs to make money somehow.

agreeahmed#
With Flowglad you’d pay ever so slightly less than you would with a vanilla Stripe integration which usually includes Stripe Billing. That total cost is 3.6% (2.9% per charge + .7% for billing) and $.30, whereas we’re 3.55%.

We’re not really trying to compete on cost. But we certainly aren’t more expensive once you include the cost of Stripe Billing.

agreeahmed#
Yes, while this is OSS, we haven't yet figured out how to self host an acquiring bank partnership... For now we're using Stripe Connect to set up a merchant account through our Stripe Connect platform. So as long as you are a legal entity (individual or business) in the countries that Stripe does merchant acquiring you should be good to go with us.

Eventually we want to get to a place where we are embedded deeper on the payments side. But for now that's the flow.

clintonb2 replies#
> Not to mention choreographing the lifecycle of our business domain with the Stripe checkout flow and webhook event types, of which there are 250+

You don’t need to listen for all event types if you aren’t using _every_ Stripe feature.

OsrsNeedsf2P2 replies#
Sure, but everything from the Stripe UI down to their API is feature creeped. I remember using it 10 years ago and I got it working in 10-20 minutes. Last month I see it up for my new project and it took almost a whole day
tyre1 reply#
Were you using it in the same way?
agreeahmed#
I'd bet the typical payments integration has more complex requirements now than those from 10 years ago. That's what usually happens as a space becomes more important and, therefore, more regulated. Usually new entrants will come in and try to provide a tidier interface for solving an increasingly complex problem. In payments, as others in the comments have pointed out, that process is hampered by the gatekeepers involved.

You'd have to commit to building an amazing developer experience and navigating bank partnerships and compliance (per country), risk, antifraud, etc.
That's why the payments devex feels so behind the DB, hosting, or auth devex today.

Scubabear68#
You setup a payment flow and it took you less than a day, and you are upset? I don't understand.
agreeahmed1 reply#
But you do have to figure out which ones are salient to you and how they map to your specific app's lifecycle.

As a very small example: would you need to handle `charge.succeeded` and `payment_intent.succeeded`? How would you dedupe processing these events vs `customer.subscription.created`? Today, there's a lot of incidental knowledge about your payment processor's specific approach to webhook events that you need to know in order to integrate them.

owenwil1 reply#
Yeah, this isn’t great today. We have been exploring Webhook bundles/groups for common integration shapes that make a bit easier to make the right choices based on what you’re doing and hope to have something out here to help soon.
whiskey-one#
Having to figure out which of the 100s of Stripe event types we need to handle and which ones overlap was the most stressful part of adopting their system. Simplification here is welcomed.

Load more comments