Login Embed

  1. Go to "Embeddables -> Login"
  2. Copy the HTML given
  3. Paste on your existing site where you would like customers to sign up for your subscription

Login options

In the config for a request embed, these are the options which can customize the embed

Attribute Type Description
url string https://app.subill.co
selector Element The element you want to turn into a form
[handleResponse] function(response) a function which gets called after the subscription has been created
[token] string JSON Web Token for the user you want to make the request with, set this if you want to request subscriptions with existing users

Example Login Config

        PrivateSecretKey : "Your Scret Key",
        url : "https://app.subill.co", 
        selector : document.getElementById('subill-login-form'),
        handleResponse : async (response) => { //handleResponse can return a promise to be resolved before redirect happens
            console.log(response.user) //user object
            console.log(response.token) //JSON Web Token to be validated from your app, also contains user id encoded
            console.log(response.instances) //service instances this user owns


  • You can add additional javascript logic in the handleResponse function
  • You can decode the JSON web token to get the user id which will include references to service instances, and funds