#ali-raza_api

1 messages ยท Page 1 of 1 (latest)

proven lintelBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1319302020808708178

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

forest estuary
#

Please check my last conversataion with soma. 2 hours ago.

#

The old price was 33$
new one is 99$

now the upcoming invoice is showing 164$ which I am not able to understand why?

#

Any one there?

#

@lusty bobcat

#

??

#

@proven lintel please assign me some one

lusty bobcat
#

Hi
Please don't use mentions, we are monitoring all threads.

#

I'm checking the data you've shared.

#

now the upcoming invoice is showing 164$ which I am not able to understand why?
What were you expecting to be as a Price?

forest estuary
#

Oh sorry!

lusty bobcat
#

Could you please share what part is not clear exactly ?

forest estuary
#

Yes.

#

I create a product for $33/mo
user rameez subscribed the product at $33 now the product price is updated 33 -> 99

Now, When I come to rameez subscription for that product. I go to upcoming incovice and I see $164 as next payment. It should have been $99

#

right?

#

Related IDs

customer ID : cus_RKXUbToPahJFsW
upcoming_invoice: sub_1QXjp6CuC33ZJzbkB4iaupdS
product_id: prod_RQavN4MudFmHWX

OLD price ID : price_1QXjjpCuC33ZJzbkpNqsuJwc
new price ID : price_1QXjugCuC33ZJzbkN

lusty bobcat
#

I go to upcoming incovice and I see $164 as next payment. It should have been $99
right?
No because the remaining period of the current phase is being prorated.

#

If you want to keep the current period with the old price and use the new price starting from the next period

#

you need to create another price (not updating the existing one)

#

And update the Subscirption with no proration

forest estuary
#

99 + 33 = 132.

Why it is showing 164?

forest estuary
#

And yes, I did created new price.

You can see the ids.

OLD price ID : price_1QXjjpCuC33ZJzbkpNqsuJwc
new price ID : price_1QXjugCuC33ZJzbkN
#

Old price id = $33
new price id = $99

lusty bobcat
#

= 164

#

If you want to have 99 + 33

forest estuary
#

No I don't want that

lusty bobcat
#

?

forest estuary
#

Let me tell you my desired output

lusty bobcat
#

Yes please.

forest estuary
#

Community created with a price of $33/month on 1/1/2024

user subscription fee of $33 per month on 4/1/2024

price updated to $99/month on 10/1/2024

Now on the next billing cycle, the user will be charged $99/month.

Simple, no additional cost.

lusty bobcat
forest estuary
#

Yes, I am doing this.

#

Can you please wait and don't close the thread

#

till I test

forest estuary
#

okay, thanks

#

I updated the new price to $400/month

and the user upcoming invoice now shows $400.

lusty bobcat
#

Great, happy to help!

forest estuary
#

Archieve old price is mandatory when creating a new price for a product?

lusty bobcat
#

No. You can have multiple prices (archived or not) under the same Product.

forest estuary
#

and if I want to make newly created price as default I pass active:true, Correct?

  // Step 4: Update the product with the new prices
    await stripe.products.update(productId, {
      default_price: monthlyPriceId?.id || null,
      active: true,
      metadata: {
        updated_at: new Date().toISOString(),
        oldPrice: `The old price was ${community.monthly_subscription_price} and ${community.yearly_subscription_price}`,
        oldPriceMonthlyId: community.stripe_monthly_price_id ?? null,
        oldPriceYearlyId: community.stripe_yearly_price_id ?? null,
      },
    });
lusty bobcat
#

The relevant parameter here is default_price.

forest estuary
#

Okay, so need for active:true

proven lintelBOT
boreal hemlock
#

๐Ÿ‘‹

#

Stepping in as a os4m37 needed to step away