Update Customer in Stripe using Laravel Cashier

Posted on June 6th, 2019.

I've just had the situation where I needed to setup my Laravel app to update my customer's information in Stripe when they change it in my app.

The method I used to do this is actually undocumented on the official Laravel Cashier documentation, I found it while I was looking through the Cashier code.

In my Settings controller I used the following code to update the customer's name and email when they resubmit the settings form.

$stripeData = array(
    'name' => $user->first_name . ' ' . $user->last_name,
    'email' => $user->email


That code should work as long as the User model has the Billable trait.

Signup for my newsletter

Every so often I send out an email with recent thoughts, work and stuff going on in the Laravel/Statamic community.

I pinky promise I won't spam you or sell your e-mail address.