.noConflict(): this

If a Subscribe object already exists in the global object of the current page, the Subscribe.js library will be renamed to PooolSubscribe and the original Subscribe object will be restored.


.init(appId: String): ElementsFactory

Creates a new Subscribe instance (required to display any elements) using your app ID.



.createAuthElement(name: String, options: Object): Promise<AuthElement>

Create a new auth element instance.


  • Type: string
  • Accepted values: 'signin-button', 'signin-with-subscribe-button'
The name of the auth element you want to create.
Available elements:
  • signin-button: Displays a signin button that redirects to your Subscribe platform
  • signin-with-subscribe-button: Displays the same signin button as signin-button, but also adds a Subscribe from X/mo button that displays any offer price of your choice.


  • Type: String|Element
  • Default: 'body'
CSS selector or DOM element that will contain the auth element.
  • Type: String
  • Default: null
Slug of the offer you want to highlight inside the signin-with-subscribe-button element (will display Subscribe from *price of the selected offer*)
  • Type: Object
  • Default: null
Allows you to add custom styles to your auth elements.


.config(optionName: String, optionValue: Any, readOnly?: Boolean): this

.config(options: Object, readOnly?: Boolean): this

Allows to set some configuration options. See the configuration options documentation.


.getUser(): Promise<UserModel>
Retrieve the currently-authenticated user information. Returns undefined if no user is authenticated.
This methods returns a UserModel object, which looks like this:


.signout(): Promise<this>
Disconnect the current user.


.on(name: String, callback: Function): this

Allows to set a callback to be called when a specific event is triggered. See the events documentation.


.once(name: String, callback: Function): this
Same as .on() but the callback will be called only once and removed afterwards.


.off(name: String, callback: Function): this
Allows to remove an event callback previously set with .on() or .once().



.destroy(): Promise<null>
Destroys the element.