Lemon.js

Methods

Once Lemon.js is loaded on your page, you'll have access to a global LemonSqueezy object. It has the following available methods:

MethodDescription
LemonSqueezy.Setup(options)Initialises Lemon.js on your page. Setup options
LemonSqueezy.Refresh()Refreshes lemonsqueezy-button listeners on the page, useful for SPAs
LemonSqueezy.Url.Open(url)Opens a given Lemon Squeezy URL, typically these are Checkout or Payment Details Update overlays

We're constantly shipping new updates and features to make the developer experience better. You can help us improve the experience by chatting to us about your experience.

Setup Method Options

The LemonSqueezy.Setup() method takes an object, this object can have the following values:

  • eventHandler - Callback Function
eventHandler: (event) => { // Do whatever you want with this event data }
Previous
Handling Events