#sebastian-subscription-proration
1 messages ยท Page 1 of 1 (latest)
Wow, that's a wall of text. Give me a minute or two to catch up
Do you have an example request of the Update API call I can review? The request ID would be very helpful.
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Sure, please give me a couple of minutes I'll look into it
Sorry for this if it may be a dummy question, I have the log you need, is ok/safe if I share this with you throught this thread? or maybe should I share it by DM?
You can just paste the request ID req_XXXX in here. It's safe since only someone who could access your account could use it anyway
To be clear, I don't need to the full link
perfect, thanks
Okay so in this case the price ID you provide in items is your one-off lifetime subscription price, correct?
The price ID I provide in items is the zero cost price which is recurrent
And you don't want the charge the user that price every year?
That's correct
Only one time (the first invoice)
That price ID corresponds to a price with a 1/year cycle and an amount of $49.99
Which is why the Subscription object has a recurring price of $49.99
But let's assume you do use the $0 price. You can still use the add_invoice_items parameter when updating a Subscription and that will apply a one-time price to the next invoice generated by that subscription.
https://stripe.com/docs/api/subscriptions/update#update_subscription-add_invoice_items
No worries, that's why we're here ๐
Okay I can see the subscription is updated to use a price of $0
correct
And you've added the one-off price of $99
So what part of this is not behaving as you expect?
if you look at the subscription you will see that the real price added on the "add_invoice_items" is shown as a pending invoice and it seems not to be charged instantly
I would like to know if after this subscription update is possible to charge the user immediately
Sure, that just depends on the Update call
The default is to pro-rate any price change and apply new one-off charges to the next scheduled invoice
You can trigger an immediate charge by passing proration_behavior: "always_invoice": https://stripe.com/docs/api/subscriptions/update#update_subscription-proration_behavior
That seems to be a good approach, Snufkin, could you give me 5/8 min so I try to change this on my API call and then come back here with you?
Sure thing. Take your time. If it isn't me there will be someone from Stripe here to help. (we work in shifts)
Sure, thank you
sebastian-subscription-proration
It seems to be working good!, thank you, however I have another issue raising from this, some of the past plans of the user may include a discount coupon on it, is possible to remove all the coupon benefits from the subscription before making the plan change?
because it is applying this coupon discount to the 99 USD real price and we will not be allowing that for the users
You can unset the coupon by passing coupon: '' when updating the Subscription, try it in Test mode
Thank you koopajah, let me try this in a moment ๐