Level 63
You have the answer in the error message.
What do you read in the error message ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Strip\ Exception\ InvalidRequestException
You must pass in an existing product ID into product.
When I update the plan locally and in stripe, it give me the above error
$plan = Plan::find($id);
$plan->name = $req->name;
$plan->price = $req->price;
$plan->trial_days = $req->trial_days;
$plan->billing_period = $req->billingPeriod;
$plan->update();
$plan = StripePlan::update($plan->plan_id, [
'amount' => $req->price * 100,
'currency' => "usd",
'trial_period_days' => $req->trial_days,
'interval' => $req->billingPeriod,
'product' => [
'name' => $req->name,
]
]);
Please or to participate in this conversation.