Unleak

Enroller

Show the widget

New user subscription. Should be used when the customer has no Stripe customer ID set while calling the customer method. This can also be called on other widget's error promise with NO_CUSTOMER_ID error code.
      window.Unleak('enroller').then((response) => {
  // Success promise.
}, (error) => {
  // Error promise.
});
    

Success promise

Property Type Description
source string Always ENROLLER
code string Response status code. Value can be:
CUSTOMER_CREATED: Everything went fine.
data object { stripe_customer_id: 'cus_xxx' }
You should store the returned stripe_customer_id in your database.
No need to call window.Unleak('customer', { id: stripe_customer_id } ), it has been done for you.

Error promise

Property Type Description
source string Always ENROLLER
code string Response status code. Value can be:
EXISTING_CUSTOMER: The customer already exists. You should show the manager instead.
NO_CUSTOMER_EMAIL: You failed to provide the customer email.
REJECTED: The customer closed the window.
data object Always null.