did you add the route to csrf exceptions?
do you have any routes earlier in your routes file that could be greedily grabbing the route? Try moving this route to the top of your routes
does the name of your function match the stripe event code?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Good day, please not sure what i missed tying to use custom webhook for some reason it is not firing.
// web.php
use App\Http\Controllers\WebhookController;
Route::post('/stripe/webhook', [WebhookController::class, 'handleWebhook']);
My custom webhook
<?php
namespace App\Http\Controllers;
use Laravel\Cashier\Http\Controllers\WebhookController as CashierWebhookController;
class WebhookController extends CashierWebHookController
{
//
public function handleCheckoutSessionCompleted($payload)
{
dd('hello');
}
}
I have on my local server
STRIPE_WEBHOOK_SECRET=******************* in my .env file
if i test the webhook from stripe dashboard i get 200 response
I am not sure what i missed please any heads up is appreciated
thanks a lot
You didn't answer two of my questions.
Also, what webhook event is firing? Look in Stripe dashboard for the event type for your webhook.
Please or to participate in this conversation.