Check the LemonSqueezy Webhooks for Non-Auth Users guide for Non-Auth users integration.
app/Services/LemonSqueezyService.php
( Remember to add LemonSqueezyServiceProvider::class to the config/app.php providers list)
LemonSqueezyService uses LemonSqueezyAPI -> https://docs.lemonsqueezy.com/api
Products
To retrieve the products, use the products() method from the Service,Variants
For each product, you can retrieve its own variant by providing the product ID,Products with no variants
If your product does not have any variants, in other words, if it has only one price, in the Product Object attributes you will see “buy_now_url” which can be used for checkout.To apply the discount code in the checkout URL you can add the following after your URL
?checkout[discount_code]=YOUR_DISCOUNT_CODE
Products with multiple variants
If the product has multiple variants, to create a checkout URL dynamically use the “checkout” method from the Service. The checkout method accepts variant ID and creates URL.Example for Single Variant Products
$products
variable in your view files to display pricing tables
To read about LemonSqueezy integration for Auth users, check the LemonSqueezy for Auth Users guide.