#corolla-subscription-proration
1 messages · Page 1 of 1 (latest)
Hello! Give me a few minutes to wrap up some other threads and I'd be happy to help
Of course. Thank you!
(sorry had to delete a message meant for a different thread)
No problem! I panicked thinking I had made you wait.
Do you have an example request showing what you're doing for step #3?
Yes. This is what it looks like from my end.
If there is a better way or more simple way I'm also open to redoing it.
Hmm... and what are you doing for request #2?
This is for #2
I'm a little confused when I look at your requests - it looks like you created two separate checkout sessions for this customer, each of which created a separate subcription (which is why you have two)
Was this intentional?
I did not mean to create two separate checkout sessions. So that would not be intentional. However, when I go through all of these API requests the user does not enter any credit card information
#2 is a GET request which gets the Subscription Item Id for #3 so that I can update the subscription in the #3 step.
Really, the core issue here is that you ahve the two checkout sessions which created two separate subscriptions
If you had the one Subscription, then the only change you'd need to make is that for your third request (the one that's updating the subscription) yo'ud also set items[0][price] to the new price ID you want to update your subscription to
Okay, that makes sense. So the workflow should look like this:
- Create a new price id for the new amount
- Use the subscription_items API for the user’s subscription to get the Subscription Item Id.
- Use the subscription API with the subscription item id to update the subscription.
This image is of the new step #3
yup!
and if it's helpful, we do have an example of this in our docs here (https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#changing)
Oh perfect! Do you mind if I run through it quickly and let you know how it goes?
go ahead 🙂
Thank you! Also, if I don't want any of the old subscription time to be used as a proration would I set the cancel_at_period_end = false?
corolla-subscription-proration
I essentially want the subscription payment to be a one-time payment that is used and gone for the user once they pay. This is for a coffee shop loyalty program so if the user adds $10 to their wallet pass I don't want the next subscription to give them some of the balance that wasn't used against the new updated price amount
I don't really understand what you mean by that.
I updated step #3 to the above image and ran a test. Starting from 0 subscriptions for the test user, I added one subscription for $10.
This is what it looked like in Stripe.
Then I updated the subscription amount to $20/week and this is what it looks like in Stripe for the same test user.
@half raft what's the question? Those are just pictures of the Dashboard. We're focusing on helping developers with their real code here and the exact API responses. What is your problem/confusing you?
Oh, I didn't realize the person helping me changed. Let me explain.
I read the rest of the convo. I'm just asking for a clear question about what's blocking you
It looks like my current workflow is adding a second amount to be paid to the subscription rather than replacing the old one with the new one.
So if they start by creating a subscription for $10/week and then they want to change it to $20/week, I would like to use the Stripe API to change the subscription price to be $20/week and completely remove the $10/week price from their subscription.
that's exactly what it does
You need to carefully read this doc end to end
it explains how proration works
Thank you. To disable prorations I need to set proration_behavior=none in all subscription API requests. Is that correct?
I got confused because it says the amount due is $30. Which is combining the two price ids in the one subscription. You're saying that the customer won't be charged $30?
You're misunderstanding what this means because you haven't carefully read that doc
Your user paid $10. You want them to pay $20 instead. You owe them their $10 back, they owe you $20, so really they owe you $10 right now. Next month, they will be on $20/month, so they'll owe you $20. We don't charge for proration upfront so the $10 they owe you will be added to their next Invoice so $10 + $20 = $30
That's what the picture tells you exactly too. It's just not how most people think about proration at first, hence why we have an end to end doc on this!
Does that make more sense now?
Yes, that makes sense. Thank you for the explanation and your patience. I'm still learning so I appreciate it!