Hysen Labs
Library / SDK
teamtnt/php-stripe-webhook-tester avatar
teamtnt

php-stripe-webhook-tester

A PHP package for testing Stripe Webhooks localy

100 stars25 forksPHPMIT
01
DEEP OPEN-SOURCE ANALYSIS

PHP Stripe Webhook Tester: local tests, no tunnels

A small PHP package that simulates Stripe webhook requests against a local endpoint, so you can test handlers without ngrok or a public URL.

02
DEEP OPEN-SOURCE ANALYSIS

What it replaces

The goal, in the README's own words, is to make testing Stripe webhooks easy on a local machine without ngrok or other tunneling services. Normally a webhook needs a publicly reachable URL for Stripe to hit, which is a nuisance in local development. This package removes that need entirely. It is written in PHP under the MIT license, it targets developers who build Stripe integrations, and it has been around long enough that the repository timeline starts in 2015.

03
DEEP OPEN-SOURCE ANALYSIS

The mechanism

The package simulates a POST request to a specified endpoint, carrying JSON with event data, and the point is to make sure your application reacts accordingly. In other words, you replay what Stripe would send, locally, and watch your handler respond, all without a tunnel or a real Stripe account. That is the whole mechanism, and the README keeps the description to a single paragraph rather than a manual.

04
DEEP OPEN-SOURCE ANALYSIS

Scope and nothing more

Beyond the goal statement, a short Laravel note, and a mention of the dummy event check, the README has little else to say. There are no benchmarks, no screenshots, and no usage statistics, which is consistent with a package this small. It does one thing, testing webhooks locally, and the documentation stays within that one thing.

05
DEEP OPEN-SOURCE ANALYSIS

The hook for Laravel Cashier

For Laravel users there is a specific integration. To use the package with Laravel Cashier, you override the eventExistsOnStripe method on the Cashier webhook controller. Without the environment checks, Cashier tries to verify that the dummy event is a valid webhook with Stripe, which the README says will obviously fail. The note exists because that failure is the exact thing the package is meant to sidestep, and the override is the documented way to tell Cashier to skip the verification when running locally.

07
DEEP OPEN-SOURCE ANALYSIS

Official sources

08
Community notes

Community notes