Inertia Start

v2.1.0

v2.1.0

This release lets applications adjust Stripe Checkout Sessions without editing BillingService, and keeps npm run test inside the tests folder.

Added

  • Added BillingService::customizeStripeCheckoutSessionsUsing() to adjust every Stripe Checkout Session right before it is created, for example to add metadata. Register the callback once at boot in a service provider. It receives the session's parameters and what the checkout is for (user, mode, subscription, plan, prices, and managed_payments), and returns the parameters to send. It applies to standard subscription and one-time checkouts as well as Managed Payments, where the parameters also include the customer's ID when the user is known. Passing null removes the callback.

Changed

  • Updated the reusable AI guidance on billing: applications customize Stripe Checkout Sessions through the new callback instead of editing BillingService.

Fixed

  • npm run test now limits Vitest to the tests folder. Vitest previously scanned the whole project and ran any test file whose path contained tests/, such as those of a project or release copied under storage/.

Dependencies

  • Updated minor and patch Composer and npm dependencies.

Upgrade Guide

  1. Run composer install and npm ci to install the locked dependency versions.
  2. If you edited BillingService to change Stripe Checkout Sessions, move those changes into a customizeStripeCheckoutSessionsUsing() callback, so future updates of BillingService merge cleanly. On standard Checkout, the parameters don't include the customer or the discount, which Laravel Cashier adds afterwards.
  3. If you changed the test script in package.json, keep --dir tests or your own folder restriction when merging.