---
tags: discussion
---
# Subscriptions through presigned transactions
Shawki Sukkar Mar 9th at 12:36 PM
Hello everyone, in a use-case where users have to send n transactions, n could be 12, what is the best way from the UX perspective?
38 replies
Daniel Nordh 9 days ago
Hi Shawki. Can you elaborate, what kind of application is this and what is an example of a use case where this would be happening?
Johns Beharry 9 days ago
Also, the duration between the transactions, is it something thats done quickly in succession, or over a longer period of time?
Shawki Sukkar 9 days ago
I have a newsletter subscription and it could be a few months or a year but I don't want to send the user an email every month to sign a new transaction so I was thinking that when the user wants to subscribe, they sign more than 1 month
Shawki Sukkar 9 days ago
Locktime transactions
Johns Beharry 9 days ago
hmm — problem with locktime over such duration is you are expecting the user doesn’t need to use those utxos (inputs). thats where bip21 would come in.
:100:
1
:heavy_check_mark:
1
Johns Beharry 9 days ago
check this out — https://github.com/BitcoinDesign/Guide/discussions/122
Johns Beharry 9 days ago
We don’t have much in terms of reference material for this kind of mechanism yet. i imaged wallets having a list of “pending operations” and the subscription would just be a recurring “payment request” that needs approval.
Shawki Sukkar 9 days ago
Just read it, very interesting! but isn't better if you only notify when the UTXO is not available than notifying every month?
Yeah I think so too, having it from the wallet side will be the best way, anyone has done it before? is there a POC available?
Daniel Nordh 9 days ago
OpenNode seem to support subscriptions, but am not familiar with the details. https://www.opennode.com/billing-invoicing/
opennode.comopennode.com
Billing and Invoices | OpenNode
OpenNode makes it simple to request payment in bitcoin using our custom, itemized B2B and customer invoices for goods, services, and subscriptions. (70 kB)
https://www.opennode.com/preview/billing-invoices.png
Shawki Sukkar 9 days ago
I am trying to do the subscription in Ghost, what if I just add a wallet to it and add the pending request/operations feature inside that wallet?
Shawki Sukkar 9 days ago
Doing it with Opennode will require users to have an LN wallet I guess
Johns Beharry 9 days ago
Just read it, very interesting! but isn’t better if you only notify when the UTXO is not available than notifying every month?
really interesting question. id love to see a user flow would look like with the “unhappy path” to be able to say. whats the persona you’re targeting by the way?
@John Carvalho @John any thoughts?
Shawki Sukkar 9 days ago
Users who subscribe in a paid content platform (newsletter, books, videos, research papers) (edited)
John Carvalho 9 days ago
I'd say it really depends on the specific use case and how much you're willing to create if it doesn't exist yet.
There are several ways to create a subscription UX with Bitcoin and with Lightning.
If you want streaming payments (which subs are, at low frequencies) and constant enforcement, there needs to be communication between the peers, or a trusted 3rd party.
But you dont really need enforcement unless you are discounting the total price up front as pricing.
:white_check_mark:
2
John Carvalho 9 days ago
if you dont need enforcement, you can get similar UX with only part of the flow, either having comm line with the peer, or giving the buyer a way to recur payments on a schedule
John Carvalho 9 days ago
scheduled payments instead of streaming
John Carvalho 9 days ago
whether to prompt the user is UX the wallet can provide
John Carvalho 9 days ago
but none do
John Carvalho 9 days ago
yet
John Carvalho 9 days ago
so, in short, you can def create such a UX, how depends on how much of the stack you have the ability to edit
Johns Beharry 9 days ago
just thought of this — how to cancel subscriptions, and how do you deal with malicious merchants who have all these signed transactions? (edited)
John Carvalho 9 days ago
We will demonstrate the full flow this year in at least one UX
:fire:
4
John Carvalho 9 days ago
i dont think you really need or want to presign payments
John Carvalho 9 days ago
then you have volatility issues
John Carvalho 9 days ago
i mean you could do that, but again, dont do more than you need to for the UX
:pray:
1
John Carvalho 9 days ago
also i should note that subs are a use case that i think the Offers proposal, and also RGB invoicing fwiw, have planned for LN
John Carvalho 9 days ago
so another factor is if you are willing to wait :slightly_smiling_face:
Shawki Sukkar 9 days ago
Interesting, thank you!
Shawki Sukkar 9 days ago
Any open-source examples to check? scheduled payments without issuing the payment everymonth
Shawki Sukkar 9 days ago
Not in a used wallet, just an example
Johns Beharry 9 days ago
@Pavlenex anything in btcpay server to support subscriptions? (edited)
Pavlenex 9 days ago
https://docs.btcpayserver.org/PullPayments/
BTCPay Server DocsBTCPay Server Docs
Pull payments
Traditionally, to make a Bitcoin payment, a receiver shares their bitcoin address and the sender later sends money to this address. Such system is called Push payment as the sender initiates the payment while the receiver may be unavailable, in effect pushing the payment to the receiver. (8 kB)
https://img.youtube.com/vi/-e8lPd9NtPs/mqdefault.jpg
Pavlenex 9 days ago
Though, currently it needs to be pre-approved.
Shawki Sukkar 9 days ago
Great! Thanks a lot, @Johns Beharry and @Pavlenex
Pavlenex 9 days ago
But it's far from ideal and probably needs a lot of thinkering.
A subscription service (where the subscriber allows the service to pull money every x amount of time)
Pavlenex 9 days ago
Which is unlikely, ideally subscriptions should be handled by LN wallets
Pavlenex 9 days ago
What our-use case is: Merchant creates a refund, buyer claims it, and it's auto-approved or manually approved.
Shawki Sukkar 9 days ago
Hmmmmm, yeah that's true