stripe setup

im using the stripe plugin and i have 2 plans on stripe: pro and enterprise. when i upgrade from free to pro its working fine and i see pro in the db. but when i upgrade my sub from pro to enterprise

const upgradeParams = {
      plan: plan.name,
      successUrl: `${process.env.NEXT_PUBLIC_APP_URL}/dashboard`,
      cancelUrl: `${process.env.NEXT_PUBLIC_APP_URL}/pricing`,
      ...(currentPlan?.stripeSubscriptionId && {
        subscriptionId: currentPlan.id,
      }),
    };

    try {
      const { data, error } = await subscription.upgrade(upgradeParams);

      if (error) console.log(error);
    } catch (error) {
      console.log(error);
    }


I still see pro in the db. am I doing something wrong, or is it supposed to work like that?
Was this page helpful?