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

ShamiCanCode's avatar

Casheir stripe

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,
        ]
    ]);
0 likes
2 replies
vincent15000's avatar

You have the answer in the error message.

What do you read in the error message ?

martinbean's avatar

@vincent15000 Because they’ve not bothered to read their error messages in the past. Why would they start now…?

1 like

Please or to participate in this conversation.