Subs Widget
Last updated
Last updated
Subs on your website has never been easier ! Thanks to our .
First things first, install the package
Now you just need to import and use our customizable button.
Just widget without default payment.
Widget with default payment.
Widget with default payment and token choice.
You can choose multiple ways to present your button.
address *
Address of the owner of the App
appId *
App ID
chain *
Network of your subscription plan
apiKey *
Api Key of the AppID. You can find your Key whan managing our App.
mode *
Choose mainnet or testnet, depending on the blockchain you are using.
color
You can customize the color of your button
width
And the width of the component
defaultPayment
Paeyment name, if you want to show a particular payment
choice
Payment name and token address, prechoose and only keep the Subscribe button
response
Informs you if a subscription is done successfully.
After creating your App go on the My Apps section on the left side of the website.
Then click on Manage of the App you want to set up
Wait a few seconds, your Api Key will appear on you screen right here.
If the Popup doesn't show up, some parts of your CSS may cause some issues.
First users need to select the period you want to subscribe and fill your email. We will notify your users after each debit and notify them if a debit fails.
Users will need to approve an amount of token before the subscription. We will later debit the amount with TransferFrom calls periodically.
When the approval is done, all you need to do is sign to trigger the subscription process.
If the user dosen't have enough funds in his wallet, the first debit won't work. And no one will be charged for this action.
Congratulation ! If the transaction is a success, users will be charge from now on. It is possible to get the result thanks to dataOnSubs, the function will return the status of the operation and a message if an error happens.