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

alex32's avatar
Level 2

Stripe Cashier | Call to a member function swap() on null

I'm trying to swap() price with Cashier, but I get Call to a member function swap() on null . Here is what I did with Laravel 11:

  • I bought a new plan for this user | the plan is reflected in Stripe Dashboard and in both tables: subscriptions and subscription_items.
  • I swap() product
  • I get the error

Thanks

Log:

local.ERROR: Call to a member function swap() on null 
 

MainController


$req= $request->user() ->subscription('default')->swap($price);  

0 likes
0 replies

Please or to participate in this conversation.