Support the ongoing development of Laravel.io →
Packages Laravel

Trying to get Laravel Cashier to work when adding a payment. Following everything as instructed in documentation (https://laravel.com/docs/6.x/billing#storing-payment-methods). Creating a customer works well but exception is being thrown when trying to establish intent. Any thoughts as to what I'm missing?

I'm using the latest homestead, laravel and cashier packages.!

Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Call to undefined method stdClass::createSetupIntent()

Screenshot of Error Screenshot of Error

Last updated 3 years ago.
0

Dear @jozeperez have a look at your code specially at this point

$customer = DB::table('customers')->find($id);

Try to change into

$customer = Customer::find($id)

Regards

0

Thanks Eshan Alizad! That is exaclty what was wrong. I wasn't using the eloquent model for the customer record. Thanks for taking the time to point me in the right direction.

:)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jozeperez jozeperez Joined 15 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.