Checkout

Pre-filled checkout fields

When you share a product in Lemon Squeezy, a link is generated for you that you can share in emails, newsletters, social media, etc. or you can use the Checkout Overlay to embed the link on your website using HTML. In both cases, the link can be customized by adding extra parameters to the query string to prefill the fields in the checkout when it loads.

The basic structure of a checkout link is as follows:

https://[STORE].lemonsqueezy.com/checkout/buy/[VARIANT_ID]

For example, it might look like https://my-store.lemonsqueezy.com/checkout/buy/d1f120fd-5adc-4fff-8915-cce713d29427

If you already know some of your customer data before sending them to the checkout, you can add a few extra parameters to prefill customer data to make the checkout process more straightforward.

https://[STORE].lemonsqueezy.com/checkout/buy/[VARIANT_ID] ?checkout[email][email protected] &checkout[name]=Luke Skywalker &checkout[billing_address][country]=US &checkout[billing_address][state]=NY &checkout[billing_address][zip]=10038 &checkout[tax_number]=GB123456789 &checkout[discount_code]=10PERCENTOFF

Note that the checkout[billing_address][country] should be in a ISO 3166-1 alpha-2 format. Note that all data will be sanitized and validated before the checkout is submitted.

The list of available parameters are:

ParameterDescriptionExample Value
checkout[email]Customer's email[email protected]
checkout[name]Customer's full nameLuke Skywalker
checkout[billing_address][country]Billing address countryUS
checkout[billing_address][state]Billing address stateNY
checkout[billing_address][zip]Billing address ZIP/postal code10038
checkout[tax_number]Business tax numberGB123456789
checkout[discount_code]Discount code10PERCENTOFF

Pre-filling customer with the API

You can also pass custom data to checkout links created with the API by passing a JSON object inside checkout_data. Read the API docs for more details.

Previous
Passing custom data