Patreon on Bitcoin

Recurring Payments and Checking Accounts

sCrypt
1 min readMar 7, 2021

We introduce a recurring payment contract that allows a customer to deposit money in and a business to collect payment at a regular interval.

Subscription

Implementation

The contract have three public functions.

Recurring Payment Contract
  • The first one is for the user to deposit more money.
  • The second one allows the user to opt out at any time. Note that if the user needs to provide a cancellation notice before stopping the recurring payment, it can be achieved on the basis of this contract with minimal modifications.
  • The last one is for the merchant to withdraw certain amount of money from the contract periodically. It contains an nLockTimeVerify part to prevent the merchant from draining it at once. Also note nLockTimeVerify only applies to the merchant and the user can still deposit more money or opt out.

Applications

While this contract is very useful for subscription payment, a similar contract can also be designed to work like a checking account: have a spending limit per day, have an emergency closing if your phone is stolen and a secret key to retrieve the money, have special condition to spend your money, … The possibilities are endless.

--

--

sCrypt
sCrypt

Written by sCrypt

sCrypt (https://scrypt.io) is a web3 development platform specialized in UTXO-blockchains like Bitcoin

No responses yet