2

Is it possible to implement a subscription/recurring payment type using Bitcoin scripts?

For example, you could send a payment for a service where there is a monthly subscription say, and each month if there was enough bitcoin in the paying address the required amount would be sent to the service provider. The time could be based on block number, which should correlate well with time, i.e. a monthly payment could be a payment every 4320 blocks.

3
  1. In order to send someone Bitcoins, you need to sign a transaction with your private key.
  2. Each transaction on your set of coins refers to the previous transaction. It is possible to create a daisy chain of transactions like this, but if you'd perform any operation in between the start and the finish of such sets of payments, the remaining transactions would be invalidated.

This makes it impossible under current model of transactions to perform such an operation. You could define a new OP that would allow one to redeem coins only after a certain amount of time, but then you'd be paying the full amount up front anyway.

You could, however, create a client that would be scheduling payments. But there is a problem - it is generally advised to keep your private keys encrypted, so nobody could steal your coins. A client can't sign a transaction with an encrypted key, so you'd have to be prompted for passwords every time. On the other hand, one could imagine a single address in a wallet to be kept unencrypted for such transactions. In the end though, it is not a matter of creating a new OP in the protocol, but new functionality in a client.

  • 1
    I'm thinking of something like having an address I could fund from which the subscription service could pull the subscription fee every 4320 blocks (1 month) say. I could fund it with whatever amount I wanted, e.g. 1 years worth of subscription fees, but the service could only pull the set amount each subscription period. If I wanted I could move the bitcoins out of the pre-funded address anytime I wanted without any permissions needed from anyone else and stop the subscription. Is this possible? – kirian Jan 24 '12 at 21:42
  • @kirian You'd have to have some modified client for this. You need to sign with your private key for every transaction that is to take place. Currently something like this is not available, but maybe in a couple months I should have some eWallet going that could do something like this. For now, everyone's paranoid about having their coins stolen. – ThePiachu Jan 25 '12 at 0:45
  • 2
    All you would need is a "not valid before block X" (or block with timestamp Y) transaction. You could then hand them transactions for each month in the next year, and you could remove the funds at any time prior to them taking the payments. – David Schwartz Jan 26 '12 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.