NewWe open-sourced 50+ Laravel packages
Custom AI apps, agents and automation — Roundly ConsultingRoundly
All packages

The whole flow — a product, stock, a cart, an order, a charge and fulfilment — with the package’s defaults (a null gateway that always succeeds, free shipping, config tax rates):

use RoundlyConsulting\Money\Money;
use RoundlyConsulting\Shops\Cart\Cart;
use RoundlyConsulting\Shops\Facades\Shops;
use RoundlyConsulting\Shops\Orders\DataTransferObjects\Address;
use RoundlyConsulting\Shops\Orders\DataTransferObjects\PlaceOrderData;
use RoundlyConsulting\Shops\Products\Product;

// 1. A new product gets a default variant automatically — price it and receive stock.
$product = Product::create(['name' => 'Sparkling Water', 'published_at' => now()]);
$variant = $product->defaultVariant;                       // SKU "SPARKLING-WATER-DEFAULT"
$variant->update(['price' => Money::ofMinor(199, 'EUR')]);
Shops::inventory($variant)->receive(100);

// 2. Fill a cart.
$cart = Cart::create(['currency' => 'EUR']);
Shops::cart($cart)->add($variant, 2);

// 3. Check out: lines snapshotted, stock reserved, number generated, cart cleared.
$order = Shops::cart($cart)->checkout(new PlaceOrderData(
    billing: new Address('Jane Doe', 'Main Street 1', 'Berlin', '10115', 'DE'),
));

// 4. Charge it through the bound gateway (New → InProgress → Paid on success).
$result = Shops::order($order)->charge();

// 5. Ship it — the reservation becomes a sale.
Shops::order($order)->fulfil();

Every step goes through the Shops facade. The next page tours its whole surface; the one after it shows the same API through an injected ShopsManager or the action classes.

Show your open-source love

This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.

More ways to support, including crypto

By donating, you agree to our donation terms.

Want this built into your product?

We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.