I’ve written two basic example rust projects that I’ll try open source this week.
1. BTCPay server webhook that can update a database on invoice payment.
2. Nostr 402 Payment Required paywall server that uses NIP-98 HTTP Auth after payment to authorise access. It likely can generate lightning invoices before payment too.
The basic idea is that if you ZAP or pay an invoice, the same URL can return the desired content if you sign a Nostr message that proves your private key which can be used to check prior payment.
Ideally we can support some kind of Nostr client app UX, where content can refresh post-payment.