Skip to main content

Subscriptions on TOS

Due to the fact that transactions in TOS Blockchain are fast and the network fees are low, you can process recurring payments on-chain via smart contracts.

For example, users can subscribe to digital content (or anything else) and be charged a monthly fee of 1 TOS.

There is no specific standard for this.

Use case flow

The current standard method:

  • Users use a v4 wallet. (V4R2 is TOS Blockchain's default wallet smart contract.) It allows additional smart contracts, known as plugins, to extend its functionality.

    After ensuring their functionality, the user can approve the addresses of trusted smart contracts (plugins) for his wallet. Following that, the trusted smart contracts can withdraw Toscoin from the wallet. This is similar to "Infinite Approval" in some other blockchains.

  • An intermediate subscription smart contract is used between each user and service as a wallet plugin.

    This smart contract guarantees that a specified amount of Toscoin will be debited from a user's wallet no more than once within a specified period.

  • The service's backend initiates payments on a regular basis by sending an external message to subscription smart contracts.

Smart contract examples