I am using Laravel Cashier with Stripe checkout (to avoid need for compliance). I cannot fathom how to allow customer to change their card details. I know the cashier syntax is
$customer->updateCard($stripeToken)
but how do we get there? Anyone able to offer me the steps please?
Here's a good starting point to understand what Stripe expects tp update a customers card. Even though this is targeted towards vanilla PHP, it gives you a fair bit of detail as to what is required and what goes on behind the scenes. https://stripe.com/docs/recipes/updating-customer-cards
This explains further the inner working of updateCard
https://github.com/laravel/cashier/blob/7.0/src/Billable.php#389
In your case, you need a view with a form for new card details. The view should implement Stripe's JS Checkout library which in turn generates the stripe token. In your controller you can pass that token to updateCard
method on an instance of your user/customer model.