Subscriptions is a beta feature, things can change slightly here and there.
Use API described below to integrate subscriptions into your app or e-commerce system.
To create a subscription via API one should follow these steps:
- 1.Get active subscription plans.
- 2.Create a new subscription in a
Draftstate, and get a future contract address.
- 3.Broadcast a particular approve spending transaction into the blockchain, for the corresponding token and contract as a spender.
- 4.Activate subscription.
Things to consider:
- 1.Subscription plans should be created upfront via Merchant Admin UI.
- 2.Plans should be activated to be used.
- 3.API Key and Secret should be created.
- 4.Gas Wallet for the corresponding network should be configured.❗
Returns active subscription plans
Create a subscription