Links

Subscriptions

Subscriptions is a beta feature, things can change slightly here and there.
Use the API described below to integrate subscriptions into your app or e-commerce system.
To learn more about subscriptions, visit this section.
To create a subscription via API one should follow these steps:
  1. 1.
    Get active subscription plans.
  2. 2.
    Create a new subscription in a Draft state, and get a future contract address.
  3. 3.
    Broadcast a particular approve spending transaction into the blockchain, for the corresponding token and contract as a spender.
  4. 4.
    Activate subscription.
See also:
Things to consider:
  1. 1.
    Subscription plans should be created upfront via Merchant Admin UI.
  2. 2.
    Plans should be activated to be used.
  3. 3.
    API Key and Secret should be created.
  4. 4.
    ​
    ❗
    Gas Wallet for the corresponding network should be configured.
get
<api>
/integration/subscription-plans
Returns active subscription plans
post
<api>
/integration/subscriptions
Create a subscription
get
<api>
/integration/subscriptions
Returns subscriptions by filter
post
<api>
/integration/subscriptions/create-customer-token
Create access token for external widget