Bitcoin

How do I perform invoice creation/payment processing with Lightning Network?

I am interested in implementing a microtransaction “paywall” that would allow anonymous users access to a web application I am building. Each unique visit to the application’s home page triggers an API call that generates an invoice for that specific session and provides the user with a QR code through which they can make a payment granting access to that specific session.

My question is how many invoices can I actually monitor? SubscribeSingleInvoice Wouldn’t there be a problem before that? If 100,000 people visited the app at the same time, that would mean 100,000 unique bills generated and subscribed… That would be a shame… I’d set this bill to expire rather soon. For example 5 -10 minutes, assuming you don’t pay within that time, there’s a good chance you won’t pay at all.

Are there any good tutorials you can recommend for setting up a paywall like this? I continued Googling but didn’t find anything really useful. And the Lightning documentation is a bit vague and lacking in specifics.

Also, a side question is, is it really necessary to run a Bitcoin backend to do this? I was reading about neutrinos and found out that I could use this as a backend via LND. I’m only interested in creating invoices and microtransactions and detecting when payments are due, so can my app use neutrinos for this? Can we reduce our heavy infrastructure footprint?

Related Articles

Back to top button