#Benoît
1 messages · Page 1 of 1 (latest)
@swift wind that's mostly impossible to do I would say
😱
We don't really do the whole "charge fully now, but really just joking I'll prorate later"
What we do is charge the proration upfront for the new Price which is what makes the most sense to me in this case
So if i add this new plan the 22nd june to my main subscription, my customers would be able to use the new feature "freely" until the next invoice, the 10th july, right ?
no, you can make it so that they pay upfront for the proration from June 22 to July 10
Ah !
I understand, but it would mean that my customer will have a prorate invoice, so i have to warn him (for him not te be puzzled)
how is that different from you charging them the full price now and having to explain that they will get credit later?
It mean to make a server call to calculate the prorate and return him the amount
yes you can use https://stripe.com/docs/api/invoices/upcoming for that
It mean also to check if the user has already an item in the subscription, etc
This would return the whole amount of the future invoice, but at this time, the new plan would not have been added to the subscription
I mean not really you're just going too fast and skimming
The whole point of that API it to preview an upcoming invoice to a Subscription with or without change. So you can pass subscription_items and subscription_proration_behavior for example to simulate what the Invoice would look like if you added your new Price right now with proration_behavior: 'always_invoice' for example
Yes but the prorate amount I want is the one for the new plan only, not the whole future global invoice.
Maybe i don't understand the docs
Really it just works and does exactluy wht I described
Do you say that if i only pass the new plan to the upcoming method, this would work ?
you are just reading this too fast 🙂
Try it in Test mode, will take a couple of minutes and you'll get it immediately
Before trying the upcoming method, i need to test this. Have i something special to do, or specific parameters to use when i add the new item to the subscription ?
the first step is the upcoming method
that's the only step really, as the dev you just call this API and pass the parameters I mentioned
That's the 1st step if i want to create the warning for my customer, but before this i would like to test a payment for this period
Test in what sense? That sounds like a different problem than you described previously. (Taking over for koopa here)
I would like to do this
I want to test the proration payment
What do you mean by test? Koopa explained how to use the upcoming invoice endpoint to preview the amount
So what do you mean by test the payment?
Let's say i know the prorated amount to pay for the new plan will be 23$. I would like to add this new plan to the main subscription and initiate the payment of this amount
As in you calculate your own proration amount and what to add an invoice item to charge for that?
(intead of using prices and subscription proration automatically?)
I will make some tries. I'm vers sorry, my english is not perfect and tonight I really have a hard time understanding
That's ok -- we're trying our best to help you, just need to understand what you're trying to accomplish so we don't suggest things that won't help