#alalva_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/1288516583894810625
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, can you tell me more about what is going wrong with the proration itself? Like what number are you expecting vs what is the actual number for one of these prorations?
I ran out of characters, but when the user upgrades from a $1000 that was discounted to $500, but later in time wants to upgrade to the next "custom plan" which allows you to have the user add additional users, locations or admins. I have a popup that will show the user the cost of additional users the users wants and then will tell the user what the cost will be at the year end. i'll include a picture after. When i have the user click to pay then i have an api call to "update a subscription item" but the parameter in that call "price" is looking for the id of the plan and i need to let stripe know the amount to charge and then at the end of the year charge for the entire amount. I hope this makes sense - i know its alot.
yes, so the proration amount is correct but what i'm not able to do is charge for that specific proration amount, instead the calls i have are trying to charge the plan amount.
the attached picture is the current plan that the user is on which is normally $1000 but first year was charged $1000 and then the next plan is a custom plan and the numbers you currently see on the Admins, users, locations are what the user currently has paid for in the $500 plan, but if the user wants to add lets just say 1 more location then i show a popup to the user that says it will cost $22.42 to upgrade to the next plan but at the end of the year it will cost $1045.
what i want to do is charge that prorated amount of $22.45 for adding 1 location which will force the user to a custom plan. At the end of the year it will charge the user $1045. FYI the user already paid $500 for the current plan and because we are doing 50% off the 1st year it will continue to honor that cost to any of the plans within the 1st year.
Ah gotcha, how are you implementing the 50% discount? Is this through a coupon that you set up through the API or dashboard? If so, it sounds like the issue may be that you set it as a one-time discount and making it a 12 month discount should apply to any changes made to that subscription
yup thru a Checkout subscription using a coupon
using an api call
What do i need to do to stop it from being a one-time discount?
sorry, and keeping for a period of 12months?
there are duration and duration_in_months fields. They should also be visible from the dashboard but I am less familiar with what that would look like here https://docs.stripe.com/api/coupons/object#coupon_object-duration
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ah it looks like it has to be done in the creation of the coupon, ok-that sounds like a promising way to make this work. Hey Pompey, looks like you have lead me into the right direction, i'm going to try this now. appreciate your help!!!
๐
Of course, let me know if that works