πŸͺIntro To Webhooks

The problem

Webhooks in Cashier are pretty straight forward. Cashier by default handles the main subscription events required to operate a standard subscription model. However with connect, our requirements are far more complex. This due to the the unlimited combinations of models and payment flows that can occur thanks to this plugin, not to mention if you are using Tenancy for Laravel to have a multi tenant solution. As such. there is no currently identifyable set way to handle webhooks.

The Solution

For this reason we do not handle any connect webhooks by default, rather provide you with the tools to construct your own webhook handling system.

Now the most painful part of handling webhooks is dealing with signatures, secrets, retry limits etc, it is quite exhausting and one of the great things about cashier, is it takes the pain out of this for you, handling the default events but also allowing you to register your own event handlers via the Event service provider (See cashier docs for more info).

What we have done is simply ripped off the Cashier webhook system and altered it for Connect use whilst abstaining from handling the default events that Cashier normally handles. Other than that, everything else is the same and should work as Cashier does. The later pages in this guide will make it clear.

Last updated