DEV Community

Discussion on: Why Do You Need a Backend?

Collapse
 
imacchiavello profile image
imacchiavello

love your post I have a question tho. If I want to integrate stripe into a website and I'm hosting my website with X hosting company. Can I just add the backend for the specific function I want to implement in this case accept payments. Or do I also need to create routes, middlewares, etc? Thank you so much for your time.

Collapse
 
kayis profile image
K

Depends on "what the users pay for"

If you sell static stuff (images/videos/music) or physical products it could very well be that one function could be enough.

If you have some kind of SaaS, you would mark users as "subscribers" in one backend function and then would have to check this flag in every route that needs to be protected.