Lemon Squeezy for Laravel

Packages

May 4th, 2023

Lemon Squeezy for Laravel

Lemon Squeezy for Laravel is an upcoming package to easily create checkouts, manage subscriptions and more:

This package is designed to easily integrate your Laravel application with Lemon Squeezy, a SaaS application for payments, tax, and subscriptions for software companies:

Easily integrate your Laravel application with Lemon Squeezy. It takes the pain out of setting up a checkout experience. Easily set up payments for your products or let your customers subscribe to your product plans. Handle grace periods, pause subscriptions, or offer free trials.

Laravel team member Dries Vints has been hard at work to bring the initial prerelease version. During the pre-release phase you can expect breaking changes leading up to the stable v1.0.0 release.

While we are not sure what features will be available (nor when), the roadmap has some exciting features listed:

  • Subscription invoices
  • License keys
  • Marketing emails check
  • Product & variant listing
  • Custom priced checkouts
  • Create discount codes

Where things really get exciting for me is the Checkouts section of the readme, which includes docs on how to create checkouts for customers, such as single payments, an overlay payment widget, and even pre-filling user data for checkouts:

Route::get('/buy', function (Request $request) {
return redirect(
$request->user()->checkout('variant-id')
->withName('John Doe')
->withEmail('john@example.com')
->withBillingAddress('US', '10038') // Country & Zip Code
->withTaxNumber('123456679')
->withDiscountCode('PROMO')
);
});

The readme has quite a bit of detail for the initial prerelease. So while this package will possibly have breaking changes before the v1.0.0 release, feel free to jump in early and test it out!

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.