Alby Hub subscriptions work based on NWC. The client receives an NWC connection secret with a pay_invoice permission and sends a pay_invoice request to the wallet.
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qghwaehxw309aex2mrp0yh8qunfd4skctnwv46z7qg6waehxw309ac8junpd45kgtnxd9shg6npvchxxmmd9uqs6amnwvaz7tmxxaazu6t09uqzp75cf0tahv5z7plpdeaws7ex52nmnwgtwfr2g3m37r844evqrr6j2vwkgf nostr:nprofile1qqs2hr9cpe0y9fwytl8s5mpf0e6ckyf6sld22q5tzzezhzkl2w2a2qsy0084g nostr:nprofile1qyghwumn8ghj7mn0wd68ytnhd9hx2tcppemhxue69uhkummn9ekx7mp0qywhwumn8ghj7mn0wd68ytnzd96xxmmfdejhytnnda3kjctv9uq3vamnwvaz7tm9v3jkutnwdaehgu3wd3skuep0qythwumn8ghj7un9d3shjtnswf5k6ctv9ehx2ap0qqsrxra3gv0lnkxz2pcxh0xuq9k4f9dr7azwq3aypqtnay4w0mjzmtqymgkge
Discussion
Nice, do you know of any services that use this functionality so I can try it out/look at code?
I don't know any public ones, but basically you'd save the NWC connection secret and pull the money according to your subscription terms (e.g. monthly) using the pay_invoice command:
You could look at ZapPlanner: https://github.com/getAlby/ZapPlanner