PHPackages                             spatie/checkout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. spatie/checkout

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

spatie/checkout
===============

A simple e-commerce checkout helper for Laravel 5

2.0.3(9y ago)436983MITPHPPHP ^5.6.0|^7.0

Since Aug 23Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/spatie/checkout)[ Packagist](https://packagist.org/packages/spatie/checkout)[ Docs](https://github.com/spatie/checkout)[ RSS](/packages/spatie-checkout/feed)WikiDiscussions master Synced today

READMEChangelog (6)Dependencies (3)Versions (10)Used By (0)

Remember the order id in the checkout process of a webshop
==========================================================

[](#remember-the-order-id-in-the-checkout-process-of-a-webshop)

[![Build Status](https://camo.githubusercontent.com/e663a8f5b0cd8764480b4aaf6d7afb9633f0f98c0def8daf7f9150f0c3cbe95c/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7370617469652f636865636b6f75742e706e67)](http://travis-ci.org/spatie/checkout)[![Latest Stable Version](https://camo.githubusercontent.com/a6e655b1efa2cdc89a6d015c61cff83b8b0d019041d6d39a03afba2a8ae4fef4/68747470733a2f2f706f7365722e707567782e6f72672f7370617469652f636865636b6f75742f76657273696f6e2e706e67)](https://packagist.org/packages/spatie/checkout)[![License](https://camo.githubusercontent.com/bfc668de5f3b44cd70fb628381e7d36edc70e9fd813b5b1ff7e5c45cbede4389/68747470733a2f2f706f7365722e707567782e6f72672f7370617469652f636865636b6f75742f6c6963656e73652e706e67)](https://packagist.org/packages/spatie/checkout)

When building a checkout process for a webshop, you likely discovery a need to store the id of a newly created order in a session. This Laravel package provides a clean way to work the order id in the session.

Support us
----------

[](#support-us)

Learn how to create a package like this one, by watching our premium video course:

[![Laravel Package training](https://camo.githubusercontent.com/4c7f3720a29525e627f6004ee367e55def510e45d18e6bc974725812fa5cf257/68747470733a2f2f7370617469652e62652f6769746875622f7061636b6167652d747261696e696e672e6a7067)](https://laravelpackage.training)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Postcardware
------------

[](#postcardware)

You're free to use this package (it's [MIT-licensed](LICENSE.md)), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Installation
------------

[](#installation)

This package can be installed through Composer.

```
composer require spatie/checkout

```

There is a service provider you can make use of.

```
// app/config/app.php

'providers' => [
    '...',
    'Spatie\Checkout\CheckoutServiceProvider'
];
```

This package also comes with a facade, which provides an easy way to use this class.

```
// app/config/app.php

'aliases' => array(
	...
	'Checkout' => 'Spatie\Checkout\CheckoutFacade',
)
```

Usage
-----

[](#usage)

You can store the order id using this method:

```
    Checkout::setCurrentOrderId($yourOrderId);
```

Your order id will be stored in Laravel's session store.

You can retrieve the value with:

```
    Checkout::getCurrentOrderId();
```

These methods are also provided:

- `Checkout::clearCurrentOrderId()`: Forget the previously stored value.
- `Checkout::isCurrentOrderId($orderId)`: Convenient method to determine if the given orderId is equal to the value stored with the previous call to `setCurrentOrderId`.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance50

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~59 days

Total

9

Last Release

3486d ago

Major Versions

0.1.2 → 1.0.02015-05-24

1.0.1 → 2.0.02016-04-22

PHP version history (2 changes)0.1.0PHP &gt;=5.4.0

2.0.0PHP ^5.6.0|^7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (30 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (7 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (5 commits)")[![juukie](https://avatars.githubusercontent.com/u/2678657?v=4)](https://github.com/juukie "juukie (1 commits)")[![quentindecosne](https://avatars.githubusercontent.com/u/17610084?v=4)](https://github.com/quentindecosne "quentindecosne (1 commits)")[![Tjoosten](https://avatars.githubusercontent.com/u/5157609?v=4)](https://github.com/Tjoosten "Tjoosten (1 commits)")

---

Tags

laravelhelperpaymentgatewaywebshopcheckout

### Embed Badge

![Health badge](/badges/spatie-checkout/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-checkout/health.svg)](https://phpackages.com/packages/spatie-checkout)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k133.0M739](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k2.3M62](/packages/fruitcake-laravel-debugbar)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
