News for hackers. Stuff that matters.

Ask HN: How to build minimal login and payment for web app?

What is the easiest way to build a minimal product that has a way to have users sign in and pay a monthly subscription? Let’s say we want to do this in Python. To make this more concrete suppose I want to monetize a function hello(name) that takes a string and prints out "Hello, " + name + "!". What is the easiest way to build the subscription and payment infrastructure? Is there a SaaS that solves this problem?
( 5 comments | 3 points | on HN )
Re:Ask HN: How to build minimal login and payment for web app? by Jugurtha on Wednesday February 03, 2021 @12:43PM (#26016476)
I'll be doing that as well for our internal machine learning platform. I'll use Stripe, but it doesn't accept Algeria, so we'll use our accounts in France.

You can use Flask Login[0] for the login part and I hope you live in an area that payments services support.

- [0]: https://flask-login.readthedocs.io/en/latest/

Re:Ask HN: How to build minimal login and payment for web app? by trcarney on Wednesday February 03, 2021 @11:39AM (#26015420)
Django has the sign in stuff built in and stripe can provide the payments quickly, they even provide the payment forms.
Re:Ask HN: How to build minimal login and payment for web app? by soulchild37 on Wednesday February 03, 2021 @02:55PM (#26018341)
For Ruby/Rails, there's https://jumpstartrails.com and https://bullettrain.co that handles these for you so you can focus on coding the core functionality.
Re:Ask HN: How to build minimal login and payment for web app? by varlogix on Wednesday February 03, 2021 @10:53AM (#26014743)
I think Laravel framework for PHP has something called Spark which provides this.

https://spark.laravel.com/

Re:Ask HN: How to build minimal login and payment for web app? by kleer001 on Wednesday February 03, 2021 @12:02PM (#26015795)
Please don't build one yourself for actual commercial use. Please rely on established ones for that. Otherwise it's a great exercise.