Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CanadianDeer's avatar

Laravel Cashier Stripe

Hello,

I use for my project Laravel Cashier Stripe.

To manage invoices and subscription and user data, I use the billing portal with the post request :

public function postForm(Request $request)
    {
        return $request->user()->redirectToBillingPortal(route('dashboard'));
    }

Now I have create a new Controller for the webhook and the route :

Route::post('stripe/webhook', [WebhookController::class, 'handleWebhook']);
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;

class WebhookController extends CashierController
{
    /**
     * Handle invoice payment succeeded.
     *
     * @param  array  $payload
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function handleCustomerSubscriptionUpdated($payload)
    {
        
    }
}

But I dont find example how to use the webhook on the current user when he update their informations on the billing portal. Can you explain me with exemple please ?

Thanks

0 likes
3 replies
martinbean's avatar

@canadiandeer You need to see what event Stripe fires when a customer updates their information, and then listen on that event.

CanadianDeer's avatar

@martinbean yes i understand that but I dont understand how its works with Cashier. that's why I'm asking for concrete examples

Please or to participate in this conversation.