Live data from Hacker News

We tried to make billing backendless

useautumn.com

1–10 of 43 posts

Re: We tried to make billing backendless

#2
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)?

A JWT with the customer_id (or surrogate) in would let you do that in serverless function.

Re: We tried to make billing backendless

#3
I'm rather confused by this article - I'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't understand the niche!

I'm left with the sense that this is a sort of solution that's trying to do auth permissions via the billing process, without calling it auth. Any access token you'd set up for auth with roles or permissions can give you access to both a customerId and whatever access grants you'd want to give.

Re: We tried to make billing backendless

#6
I find everything about web technology nowadays to be extremely obtuse.

I am mostly an embedded/Linux driver engineer, but I think I know the basics of HTTP, REST APIs, Docker containers, how the web works overall etc.

But, like. What are we doing?

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.

Same with serverless (which are just Edge Functions and could just be called that, or serviceless, if you really wanted to define it negatively).

If these people named NoSQL, it would be called databaseless.

Re: We tried to make billing backendless

#7

I find everything about web technology nowadays to be extremely obtuse. I am mostly an embedded/Linux driver engineer, but I think I know the basics of HTTP, REST APIs, Docker containers, how the web works overall etc. But, like. What are we doing? 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 dist…

They encoded the billing rules into the fabric of spacetime, making them a fundamental property of the universe. Now there is no backend anymore, only reality.

That will be $6.62607015e-34 please.

Re: We tried to make billing backendless

#8
post #4

You should look deeper into JWTs and what you can do with them. Sounds like you are on the way to reinventing them.

Yes! This is exactly what we're doing now which also helps us be a little more framework agnostic. Nextjs kind of just lets us have them built-in

Re: We tried to make billing backendless

#9
> Server actions are public, unauthenticated routes

Why can't they be authenticated? That seems like the obvious fix. Otherwise how you are handing out the correct customer_id unless you authenticate somehow?

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.

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.

Post reply on HN