SteemPlus API Updates : Getting ready for Premium Features

We've been talking about it for a while and announced them at the SteemFest, the premium features are coming soon!

This update creates the mechanism for redeeming the SPPs for these premium features.

Premium features routines and how they work

Subscribing

The subscribe process takes two steps.
By clicking on the subscribe button, you will send 0.001SBD to SteemPlus. The memo of this transfers includes the name of the feature. Then when SteemPlus receive it, it will check if you have enough SPP to subscribe. If it is the case, SteemPlus will send you an acknowledgement saying your subscribed to the feature. If you don't have enough SPP, SteemPlus will send you an acknowledgement saying you need more SPP.

Unsubscribing

The unsubscribing process is quite similar. You will send a 0.001 SBD to SteemPlus and then SteemPlus will answer.
Because you already pay for a month, even if you cancel your subscription after a day, the feature will be available until the end of the month (period of 31 days).
If you decide to subscribe again, you won't be charged.

Renewing

Renewing your subscription is an automatic process. If you have enough SPP, SteemPlus will renew your subscription and send you a notification.
If you don't have enough SPP, SteemPlus will cancel your subscription and notify you.

Repository:

https://github.com/stoodkev/steemplus-api

Pull Request

Wanna contribute?

Join us on Discord

How to test this code?

  • Subscribe to SteemSQL (10 SBD/month)
  • Clone this repository
  • npm install
  • Set the environment variables (information received by transfer when you subscribe to SteemSQL). These environment variables are LOGIN, PASSWORD, SQL_API and DB.
  • npm run start
  • You should be able to test it on localhost:3000.



@stoodkev and @cedricguillas for @steem-plus

Powered by @adsactly

Powered by @utopian-io

Like what I do? Vote @stoodkev for witness!

H2
H3
H4
3 columns
2 columns
1 column
14 Comments