Skip to main content
JavaScript
Smile.reset();
This method resets the SDK to an uninitialized state, clearing all stored data including the customer session, preloaded resources, and configuration settings (like publishable key). It’s primarily intended for use during cleanup operations or during development.
If you only need to log out a customer, use Smile.customer.logout() instead.

Returns

Void. This method does not return a value.

Good to know

  • After calling Smile.reset(), you must call Smile.initialize() again before using any other SDK methods.
  • Attempting to call SDK methods after Smile.reset() (and before reinitializing) will throw an error.
  • This is different from Smile.customer.logout(), which only logs out the customer but keeps the SDK initialized.
  • If you only need to log out a customer, use Smile.customer.logout() instead.