@canadiandeer You need to see what event Stripe fires when a customer updates their information, and then listen on that event.
Nov 5, 2020
3
Level 1
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
Please or to participate in this conversation.