🕛
Subscriptions
Subscriptions is a beta feature, things can change slightly here and there.
Subscriptions enable merchants to generate reliable recurring revenue to grow their businesses. Merchants can easily create subscription plans and automatically charge customers on a recurring basis.
When working with subscriptions, there are a few building blocks to consider:
- 1.Subscription Plan.
- 2.Subscription.
- 3.Subscription Charges.
The subscription plan defines the core attributes of future subscriptions. It could be used as a possible source for the list of subscription plans for customers to select from.
The plan has the following attributes:
- 1.Periodicity (minimum 1 day, maximum 365 days)
- 2.Token from the list of supported tokens.
- 3.Amount.
- 4.Description.
- 5.Tags.
- 6.Status.
Plan statuses have the following mechanics:
- Once created, a plan has a
Draft
status. The plan can be updated in this status only. - In order to create a subscription based on a plan, that plan should be switched to
Active
. - When a plan is no longer needed, it should be moved to a
Acrhive
status. Subscriptions cannot be created in this status anymore, but you can always move them back to active status if needed.
The main purpose of tags is to group and categorize plans. You an assign arbitrary tags to plans and use them in UI to filter or group plans according to your logic.
A subscription is an entity that is linked to a subscription plan and contains charging rules. Charging rules are immutable and implemented as a smart contract on a blockchain network. Once deployed, this smart contract controls the number of tokens being transferred from the payer to the merchant.
The following status transitions are possible for a subscription.

Subscription state transitions
A subscription charge represents a single token transfer from the payer to the merchant.
For the Subscription API Reference please follow the link below:
Last modified 4mo ago