#ali-raza_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- ali-raza_code, 37 minutes ago, 24 messages
- ali-raza_code, 2 hours ago, 47 messages
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
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?
Oh sorry!
Could you please share what part is not clear exactly ?
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
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
99 + 33 = 132.
Why it is showing 164?
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
Nope it's:
- 99 (the new price) - 33 (the unused time from the current period)
-
- 99 (the next period)
= 164
If you want to have 99 + 33
No I don't want that
?
Let me tell you my desired output
Yes please.
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.
When updating the Subscription, you need to set proration to none.
I inivte you to make some tests using Stripe Test clocks:
https://stripe.com/docs/billing/testing/test-clocks
Yes, I am doing this.
Can you please wait and don't close the thread
till I test
okay, thanks
I updated the new price to $400/month
and the user upcoming invoice now shows $400.
Great, happy to help!
Archieve old price is mandatory when creating a new price for a product?
No. You can have multiple prices (archived or not) under the same Product.
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,
},
});
The relevant parameter here is default_price.
Okay, so need for active:true