#zaddler_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/1217569894166696008
đ 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.
- zaddler_webhooks, 2 days ago, 34 messages
- zaddler_unexpected, 5 days ago, 48 messages
- zaddler_unexpected, 6 days ago, 80 messages
In your scenario, are you doing prorations at any point?
No prorations
Stripe subscription's don't really track this situation, so they don't remember what plan they had two updates ago. I think you will need to record on your side what the highest tier this subscription has been on this month and then charge or not charge based on that when updating your subscription
So it would be advisable to lower it to the System level and not Stripe?
What I want is like... downgrade it from the plan, but if it goes up again without the billing cycle happening first, something like renewing that plan
From what you have described so far I think that would be necessary. Can you give me an example of what the renewing thing would look like with your three example prices? Not quite getting that scenario but I am happy to consult
-
User purchases a subscription of 3.99 (Billing would be May 1 to June 1.
-
Then at that same moment you want to downgrade to a 2.99 plan (I would charge you on June 1, when the May-June cycle ends. For Stripe it is on the 2.99 plan but for my system it is on the 3.99 plan) .
-
If at that same moment the user changes from 2.99 to 3.99 (which was billed from May 1 to June 1), Stripe will charge them for the plan change while in the billing cycle, when what they should do is , renew it, that is, return to step number 1, which is to return to the cycle from May 1 to June 1.
Is this possible?
Oh, so you want to charge the full 3.99 again even if you are not all the way through the cycle? You can do that by resetting the billing cycle anchor while updating your subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I understand, but how can I know if the user has already paid for an expensive plan while in the billing cycle? Because the problem is that, I have a logic that when it changes from cheap to expensive, it always invoices at the moment, and collects, but if it pays in the same cycle, it goes down and goes up again, how could it know that I already paid in the cycle of billing?
Hi, taking over as Pompey needs to step away. Let me catch up here
Alright
Is there a way to know which is the most expensive plan that a customer purchased within the current billing cycle on the current date?
You would need to track this on your end. You can likely add metadata when you update the Subscription, https://docs.stripe.com/api/subscriptions/update#update_subscription-metadata and track that way. Then, you can look at the Subscription object later to identify which plans they have changed from and how many times.
It could be but it is not very practical, I would like to know if there is a way to obtain the current invoice for the current cycle
Because that way I can charge or not being in the current cycle
If it came from an expensive plan already paid for, it goes down and goes up again, what I want is how to renew it, not charge you again
Well, you can retrieve the Subscription, https://docs.stripe.com/api/subscriptions/retrieve in this case and look at the items. Or, you can also use our Expand function, https://docs.stripe.com/expand and Expand the latest invoice https://docs.stripe.com/api/subscriptions/object#subscription_object-latest_invoice from the subscirption. Is that what you're looking for?