Ecommerce
Stripe catalog and checkout, plan and metered feature gating, and multi-level referrals, in PHP, Node and Python: what each package answers, how they meet, and what an agent may do at the till.
0/5 lessons
0%
The catalog: products, prices and plans
~8 min
particle-academy/laravel-catalog manages a Stripe catalog through a facade, for apps that bring their own UI: products, prices, plans and checkout.
There is no Plan model. A plan is a Product with at least one recurring Price. Prices are recurring (subscriptions) or one_time. Two ordering rules follow, and both fail if you skip them:
- A Product cannot sync to Stripe without at least one Price. Create the price first, then
Catalog::syncProductAndPrices($product). - Sync before you check out.
Catalog::subscriptionCheckout(...)andCatalog::oneTimeCheckout(...)create Stripe Checkout sessions, andgetSubscriptionCheckoutUrl(...)hands back a URL.
Products and prices are soft-deleted, which keeps your financial history intact. Cashier's migrations are not loaded automatically, so an app that already has a subscriptions table keeps it.
The twins carry the same model without a framework. The Node package, @particle-academy/fancy-catalog, keeps storage behind store adapters and takes the Stripe client you inject, and the Python package, fancy-catalog, holds money as integer minor units and also takes Stripe injected.
