Remix.run Logo
Show HN: API monetization with its own billing engine built from scratch(nadles.com)
1 points by olschafer 10 hours ago

It started as an attempt to replicate some of RapidAPI's functionality in Go around Oct. 2020. Just for fun.

The first public version was released in Dec. 2022 (after I got hit by the job market turbulence) and had no billing capabilities at all, but it allowed API providers to configure "subscriptions plans" more flexibly than with RapidAPI. Like, you could include several APIs in one plan, exclude certain endpoints from low-cost plans, block some API calls based on request attributes, apply rate limits per group of endpoints from different APIs, etc. And manually create subscriptions, which allowed users to access the API in accordance with the configured rules.

After a month, it became clear that without payments it's not particularly useful.

That's how Billing 1.0 was born, initially integrating only with Stripe. However, it was already quite versatile, as it could bill for any product-related metrics, not just API calls, combine recurring prices with different billing periods in one subscription, etc. It didn’t use Stripe Billing for subscriptions. It was handling them on its own. True hero.

After a month, it became clear that without self-service onboarding for API users it's not particularly useful.

So we added self-service checkout pages (like Stripe's payment links). And added themes, so that checkout page style could be customized. API users were happy to self-service onboard themselves. We didn't ask but pretty sure they were.

Only one part was missing: there was no automatic payment collection. Each time, users had to go to the website, click "Pay" and enter payment details :-/ That was quickly addressed in the summer 2023. Because like...no off-session charges? Really?

Then we integrated the billing engine with Paddle to cover the needs of European providers for Merchant of Record option. That's late fall 2023.

Then we rebranded because the initial name of the product was derived from the name of the folder where the code was stored in 2020, the domain was in *.biz zone and the design was too 2010. That's spring 2024.

Then, we added analytics that allowed providers to run free-form SQL queries on the data produced by the API gateway.

(I'm turning the commit log into complete sentences here)

Then, we worked to make the API gateway globally distributed. And deployed it in several points of presence. Because why not. And also, our monitoring's latency graph looks more impressive with the drop.

After a month, it became clear that without subscription upgrades/downgrades, one-off prices and a ton of other billing features it's not particularly useful.

So we implemented all of them, released Billing 2.0 (a month ago) and wrote an article on Medium about it (today).

Immediately after the release, it became clear that without a hosted white-label user portal it's already somewhat useful. But it's better with a hosted white-label user portal. So we added that.

After a month, it became clear… :D

Hope you find it useful. Thanks for reading!

The article on Medium, btw: https://nadles.medium.com/billing-2-0-91666da99c74