Something got out of whack somewhere... deleted all test data at the Stripe end and recreated all the subscription plans and it works.
Cashier and Stripe again. You passed an empty string for 'items[0][price]'
Is it just me or is the whole Stripe/Cashier caper quite fragile? I thought I had it all working a while ago and have come back and it's broken. After a few days of debugging I have upgraded everything. Cashier is now 14.2.1 and the Stripe API is at the recommended version of 2022-08-01. My code is basically identical to the example in the Cashier docs, which is the same as the Andre Madarang videos on here. I can't find anything weird. Yet this line
$user->newSubscription($plan->identifier, $plan->stripe_id)
->create($request->paymentMethod);
to create the actual subscription, just fails everytime, with the exception,
You passed an empty string for 'items[0][price]'. We assume empty values are an attempt to unset a parameter; however 'items[0][price]' cannot be unset. You should remove 'items[0][price]' from your request or supply a non-empty value.
which is a Stripe invalid request exception. I have nothing about items in any of my code, so I don't even know where it is coming from.
All help gratefully recieved.
Please or to participate in this conversation.