PHPackages                             aerni/snipcart-webhooks - 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. [API Development](/categories/api)
4. /
5. aerni/snipcart-webhooks

ActiveLibrary[API Development](/categories/api)

aerni/snipcart-webhooks
=======================

Receive and work with Snipcart webhooks in Laravel

v1.2.0(2y ago)035611MITPHPPHP ^8.1

Since Sep 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aerni/snipcart-webhooks)[ Packagist](https://packagist.org/packages/aerni/snipcart-webhooks)[ Docs](https://github.com/aerni/snipcart-webhooks)[ RSS](/packages/aerni-snipcart-webhooks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (1)

Laravel Snipcart Webhooks
=========================

[](#laravel-snipcart-webhooks)

This package makes it super easy to setup and work with Snipcart webhooks in your Laravel application.

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

[](#installation)

Install the package using Composer.

```
composer require aerni/snipcart-webhooks
```

Set your Snipcart `Live Secret` and `Test Secret` in your `.env`. You can find them in your [Snipcart Dashboard](https://app.snipcart.com/dashboard/account/credentials).

```
SNIPCART_LIVE_SECRET=********************************
SNIPCART_TEST_SECRET=********************************
```

You may also publish the config of the package.

```
php artisan vendor:publish --provider="Aerni\SnipcartWebhooks\SnipcartWebhooksServiceProvider"
```

The following config will be published to `config/snipcart-webhooks.php`.

```
return [

    /*
    |--------------------------------------------------------------------------
    | Snipcart API Keys
    |--------------------------------------------------------------------------
    |
    | Your secret Snipcart API Keys for the Live and Test Environment.
    |
    */

    'live_secret' => env('SNIPCART_LIVE_SECRET'),
    'test_secret' => env('SNIPCART_TEST_SECRET'),

    /*
    |--------------------------------------------------------------------------
    | Test Mode
    |--------------------------------------------------------------------------
    |
    | Set this to 'false' to authenticate using the 'live_secret'.
    | You probably want to do this in production only.
    |
    */

    'test_mode' => env('SNIPCART_TEST_MODE', true),

];
```

Basic Usage
-----------

[](#basic-usage)

1. Register a webhook receiving route
2. Create Event Listeners or Subscribers to listen for Snipcart Events.

Routing
-------

[](#routing)

Go to your [Snipcart Dashboard](https://app.snipcart.com/dashboard/webhooks) and configure the URL where you want to receive the webhook requests. Register that route in `routes/web.php` using the provided `Route::snipcart` macro.

```
Route::snipcart('webhook-receiving-url');
```

This will register a `POST` route to a controller provided by this package. The route will be registered without the `VerifyCsrfToken` middleware, because Snipcart has no way of getting a csrf-token.

Events &amp; Listeners
----------------------

[](#events--listeners)

Each incoming Snipcart webhook request will trigger its corresponding Laravel Event. [Create and register](https://laravel.com/docs/7.x/events) one or more Event Listeners or Subscribers and do your magic.

### Overview

[](#overview)

Laravel EventsSnipcart Events[OrderCompleted](#ordercompleted)[order.completed](https://docs.snipcart.com/v3/webhooks/order-events#order-completed)[OrderStatusChanged](#orderstatuschanged)[order.status.changed](https://docs.snipcart.com/v3/webhooks/order-events#order-status-changed)[OrderPaymentStatusChanged](#orderpaymentstatuschanged)[order.paymentStatus.changed](https://docs.snipcart.com/v3/webhooks/order-events#order-paymentStatus-changed)[OrderTrackingNumberChanged](#ordertrackingnumberchanged)[order.trackingNumber.changed](https://docs.snipcart.com/v3/webhooks/order-events#order-trackingnumber-changed)[OrderRefundCreated](#orderrefundcreated)[order.refund.created](https://docs.snipcart.com/v3/webhooks/order-events#order-refund-created)[OrderNotificationCreated](#ordernotificationcreated)[order.notification.created](https://docs.snipcart.com/v3/webhooks/order-events#order-notification-created)[SubscriptionCreated](#subscriptioncreated)[subscription.created](https://docs.snipcart.com/v3/webhooks/subscription-events#subscription-created)[SubscriptionCancelled](#subscriptioncancelled)[subscription.cancelled](https://docs.snipcart.com/v3/webhooks/subscription-events#subscription-cancelled)[SubscriptionPaused](#subscriptionpaused)[subscription.paused](https://docs.snipcart.com/v3/webhooks/subscription-events#subscription-paused)[SubscriptionResumed](#subscriptionresumed)[subscription.resumed](https://docs.snipcart.com/v3/webhooks/subscription-events#subscription-resumed)[SubscriptionInvoiceCreated](#subscriptioninvoicecreated)[subscription.invoice.created](https://docs.snipcart.com/v3/webhooks/subscription-events#subscription-invoice-created)[InvalidSignature](#invalidsignature)### OrderCompleted

[](#ordercompleted)

`Aerni\SnipcartWebhooks\Events\OrderCompleted`

Dispatched whenever a new order is completed.

```
public function handle(OrderCompleted $payload)
{
    $payload;
}
```

### OrderStatusChanged

[](#orderstatuschanged)

`Aerni\SnipcartWebhooks\Events\OrderStatusChanged`

Dispatched whenever the status of an order changes.

```
public function handle(OrderStatusChanged $payload)
{
    $payload;
}
```

### OrderPaymentStatusChanged

[](#orderpaymentstatuschanged)

`Aerni\SnipcartWebhooks\Events\OrderPaymentStatusChanged`

Dispatched whenever the payment status of an order changes.

```
public function handle(OrderPaymentStatusChanged $payload)
{
    $payload;
}
```

### OrderTrackingNumberChanged

[](#ordertrackingnumberchanged)

`Aerni\SnipcartWebhooks\Events\OrderTrackingNumberChanged`

Dispatched whenever the tracking number of an order changes.

```
public function handle(OrderTrackingNumberChanged $payload)
{
    $payload;
}
```

### OrderRefundCreated

[](#orderrefundcreated)

`Aerni\SnipcartWebhooks\Events\OrderRefundCreated`

Dispatched whenever an order is refunded.

```
public function handle(OrderRefundCreated $payload)
{
    $payload;
}
```

### OrderNotificationCreated

[](#ordernotificationcreated)

`Aerni\SnipcartWebhooks\Events\OrderNotificationCreated`

Dispatched whenever a notification is added to an order.

```
public function handle(OrderNotificationCreated $payload)
{
    $payload;
}
```

### SubscriptionCreated

[](#subscriptioncreated)

`Aerni\SnipcartWebhooks\Events\SubscriptionCreated`

Dispatched whenever a new subscription is created.

```
public function handle(SubscriptionCreated $payload)
{
    $payload;
}
```

### SubscriptionCancelled

[](#subscriptioncancelled)

`Aerni\SnipcartWebhooks\Events\SubscriptionCancelled`

Dispatched whenever a subscription is cancelled.

```
public function handle(SubscriptionCancelled $payload)
{
    $payload;
}
```

### SubscriptionPaused

[](#subscriptionpaused)

`Aerni\SnipcartWebhooks\Events\SubscriptionPaused`

Dispatched whenever a subscription is paused.

```
public function handle(SubscriptionPaused $payload)
{
    $payload;
}
```

### SubscriptionResumed

[](#subscriptionresumed)

`Aerni\SnipcartWebhooks\Events\SubscriptionResumed`

Dispatched whenever a subscription is resumed.

```
public function handle(SubscriptionResumed $payload)
{
    $payload;
}
```

### SubscriptionInvoiceCreated

[](#subscriptioninvoicecreated)

`Aerni\SnipcartWebhooks\Events\SubscriptionInvoiceCreated`

Dispatched whenever a new invoice is added to an existing subscription.

```
public function handle(SubscriptionInvoiceCreated $payload)
{
    $payload;
}
```

### InvalidSignature

[](#invalidsignature)

`Aerni\SnipcartWebhooks\Events\InvalidSignature`

Dispatched whenever the signature of the webhook request is invalid.

```
public function handle(InvalidSignature $request)
{
    $request;
}
```

Tests
-----

[](#tests)

Run the tests like this:

```
vendor/bin/phpunit
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~489 days

Total

3

Last Release

1086d ago

PHP version history (3 changes)v1.0.0PHP ^7.4

v1.1.0PHP ^7.4|^8.0

v1.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f0a168dc347e5e141dc13cec734d3b0a25a13445069483732580f26f71456a6?d=identicon)[aerni](/maintainers/aerni)

---

Top Contributors

[![aerni](https://avatars.githubusercontent.com/u/23167701?v=4)](https://github.com/aerni "aerni (26 commits)")

---

Tags

laravelwebhooksshope-commercesnipcartsnipcart-webhooks

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aerni-snipcart-webhooks/health.svg)

```
[![Health](https://phpackages.com/badges/aerni-snipcart-webhooks/health.svg)](https://phpackages.com/packages/aerni-snipcart-webhooks)
```

###  Alternatives

[aimeos/aimeos-laravel

Cloud native, API first Laravel eCommerce package with integrated AI for ultra-fast online shops, marketplaces and complex B2B projects

8.6k214.7k3](/packages/aimeos-aimeos-laravel)[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[aimeos/aimeos-headless

Aimeos headless ecommerce system

2.5k2.3k](/packages/aimeos-aimeos-headless)[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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