TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How we made billing backendless

42 pointsby ayushrodrigues6 days ago

13 comments

Daviey6 days ago
I find this &quot;backendless billing&quot; approach fascinating because it highlights the tension between DX and security. As someone who&#x27;s built payment systems, I understand the appeal of reducing backend boilerplate, but there&#x27;s always a security tax to pay.<p>The real issue seems to be that they&#x27;re trying to make billing &quot;feel frontendish&quot; when it&#x27;s inherently a backend concern. The encryption approach in Part 3 is essentially recreating auth tokens but with extra steps, as others have noted - they&#x27;re basically reinventing JWTs.<p>What struck me most was the security vulnerability they discovered with server actions. If you can make calls with any customer_id without verification, that&#x27;s a textbook IDOR vulnerability. A simple curl request with a different customer_id would let you upgrade&#x2F;downgrade other accounts! No amount of client-side magic can fix fundamentally flawed authorization.<p>Their conclusion is telling, sometimes the &quot;boring&quot; approach (proper backend routes with auth) exists for good reasons. I appreciate their transparency about the journey though, we learn more from these explorations than from pretending everything works perfectly from day one.
评论 #43996338 未加载
biker1425416 days ago
Like others, quite confused here. If it requires server actions, then it&#x27;s not backendless? Just say you are simplifying the backend and how you interact with it, if that&#x27;s what you are doing.
评论 #43995678 未加载
taurath6 days ago
I&#x27;m rather confused by this article - I&#x27;ve made products and pricing services, and just on the first line its said that billing requires webhooks and state syncing.. but why? Is it a way to utilize payments in an otherwise static site? Whats the benefit? You can absolutely accept payments without webhooks. Please help, I really don&#x27;t understand the niche!<p>I&#x27;m left with the sense that this is a sort of solution that&#x27;s trying to do auth permissions via the billing process, without calling it auth. Any access token you&#x27;d set up for auth with roles or permissions can give you access to both a customerId and whatever access grants you&#x27;d want to give.
评论 #43995642 未加载
评论 #43995988 未加载
oulipo6 days ago
Reading the blog it seems the engineers there lack basic knowledge about safety (see their multiple different approaches where they learned &quot;after the fact&quot; that their approach wasn&#x27;t secure)... this doesn&#x27;t inspire a lot of safety
beej716 days ago
I don&#x27;t get it. If someone gets a hold of the encrypted customer ID, can&#x27;t they impersonate the customer? Is it just that the customer ID is guessable?
评论 #43995639 未加载
serbuvlad6 days ago
I find everything about web technology nowadays to be extremely obtuse.<p>I am mostly an embedded&#x2F;Linux driver engineer, but I think I know the basics of HTTP, REST APIs, Docker containers, how the web works overall etc.<p>But, like. What are we doing?<p>What do you mean make the billing backendless? Obviously there has to be a backend to process the payment. What are you even saying? You are presumably not building a distributed blockchain - and even that requires permanent nodes.<p>Same with serverless (which are just Edge Functions and could just be called that, or serviceless, if you really wanted to define it negatively).<p>If these people named NoSQL, it would be called databaseless.
评论 #43995724 未加载
评论 #43995668 未加载
评论 #43999189 未加载
评论 #43995528 未加载
评论 #43996322 未加载
singron6 days ago
&gt; Server actions are public, unauthenticated routes<p>Why can&#x27;t they be authenticated? That seems like the obvious fix. Otherwise how you are handing out the correct customer_id unless you authenticate somehow?<p>This scheme also complicates API key rotation, although you can work around it by trying to decrypt with both the old and new key if you use e.g. authenticated encryption.<p>This also has no mechanism for expiration (besides API key rotation). If you add an expiration time and sign it, then you essentially created an authentication token that you use as the customer_id.
评论 #43995685 未加载
robertlagrant6 days ago
Why not just authenticate the user against that customer_id, and then you can pass the customer_id around as much as you like (or have a surrogate key to it for a little more security)?<p>A JWT with the customer_id (or surrogate) in would let you do that in serverless function.
评论 #43996350 未加载
delusional6 days ago
If you don&#x27;t have a backend, how do you make sure I&#x27;m billed?<p>What&#x27;s stopping me from opening the console and calling the &quot;addMoreCredits&quot; function? Why can&#x27;t I just edit the code to remove any mention of consuming credits?<p>I think you&#x27;re about to discover why most multiplayer games have moved authoritative simulation to the server.
评论 #43995768 未加载
baobun6 days ago
You should look deeper into JWTs and what you can do with them. Sounds like you are on the way to reinventing them.
评论 #43995581 未加载
throwaway634676 days ago
Aren’t server actions a backend?
评论 #43995940 未加载
codegeek6 days ago
Interesting how YC funds similar companies. useautumn looks a close competitor to another YC company getlago.
评论 #43995713 未加载
animitronix4 days ago
This sounds like an awful idea