#remrem_code
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/1235269021306196059
đ 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.
- remrem_subschedules, 18 hours ago, 12 messages
- remrem_code, 20 hours ago, 7 messages
- remrem_code, 21 hours ago, 9 messages
Hello! It sounds like you want to disable prorations when you make the update: https://docs.stripe.com/billing/subscriptions/prorations#disable-prorations
I've tried to do that, but if I disable it, the Stripe do not attemp to charge the user on subscription change. We don't want to allow someone to upgrade a tier without getting a full payment from it
When you update the Subscription you can also set billing_cycle_anchor to now which should generate an Invoice immediately: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#immediate-payment
I think i've tried it. Let me try again
I change the code as per your advice, but Stripe still charge 20 - 5 = 15, instead of full 20
here is the exampe:
https://dashboard.stripe.com/test/subscriptions/sub_1PBgP0CUfedYEKYyqcM8tJAY
await stripe.subscriptions.update(subscription?.id, {
items: [
{
id: currentSubscriptionItem?.id,
price: product.default_price,
},
],
payment_behavior: "pending_if_incomplete",
proration_behavior: "always_invoice",
billing_cycle_anchor: "now",
});
}
You have proration_behavior set to always_invoice which means proration is turned on. You need to turn proration off.
You need to set that to none: https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_behavior
I got it, amazing
It works
Does it mean that the billing period will be updated too? It I will change it on the 15 of May, my next billing will be in 15 of June
Right?
Yep.
I see. Thank you so much for help
No problem!