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

lara1376's avatar

Laravel Cashier 'Resume' Subscription

Hey all,

Got Laravel Cashier working and it's great - only problem is that resuming cancelled subscriptions doesn't seem to work.

When I run the following:

Auth::user()->subscription('subscription_name')->resume($token);

I get this message:

BadMethodCallException in StripeGateway.php line 454:
Call to a member function create() on a non-object (NULL)

(From Laravel\Cashier\StripeGateway)

Which seems to pertain to something about the card saved in Stripe? Checked the code and the $token is being generated so can't figure out why this might not be working.

Anyone else had any problems or got it working?

Thanks in advance :)

0 likes
5 replies
lara1376's avatar

Just wondering - the $token that I'm passing to resume() - this is a brand new credit card token. Do I need to send the old one or something?

The error seems to stem from Stripe not being able to find the original card the user paid with.

If so, how do I get this?

theUnforgiven's avatar

I found the same thing, so I did it when a card/customer first signs up and adds their card, I store the $token in my db then I can use it later for resuming a subscription.

Andreyco's avatar
Level 1

This was causing problems for me as well.
Solution seems to be explicitly setting Stripe API version to use.

Stripe::setApiVersion("2015-02-10");

You should use brand new token, since token cannot be used more than once. Thus storing token is redundant as long as it's used.

1 like
lara1376's avatar

Cashier was using the wrong version of Stripe's PHP SDK. Gah!

Andreyco's avatar

I was using Stripe without setting the version explicitly, suddenly code stopped working... From now on, the very first thing after composer install would be setting the API version when using Stripe.

Please or to participate in this conversation.