What I am trying to do is to add a new Subscription Item to an existing Stripe Customer
The Stripe customer already has a subscription with a billing period, and I would just like to add this new subscription (which is a different product) but I would like this amount to show on the next bill for the customer as a prorated amount. So that the subscriptions can have the same billing period. Meaning we can send the customer one invoice, and not charging the card on file more than one time per month.
So if the customer wanted to add an additional user at 10 dollars per month. and they signed up halfway through the month the customer would get billed 5 dollars for time used from the last billing period plus the regular 10 dollars for the subscription.
I have this code
if (item.Plan.ProductId == "productId") {
var subscriptionItemOptions = new SubscriptionItemUpdateOptions {
Price = "priceId",
Quantity = vm.NumberOfUsersToChange,
};
var subscriptionItemService = new SubscriptionItemService();
subscriptionItemService.Update(item.Id, subscriptionItemOptions);
}
What this does is on the next invoice it will subtract the amount of time not used.
I want the exact opposite to happen. So It would get the prorated amount and add to the next invoice.
Any help is greatly appreciated thanks!
proration_behavior
] and set it tocreate_prorations
and you may also need to specifyproration_date
when adding the Subscription Item, but I'm not 100% sure as the example you gave is ambiguous. If that doesn't work can you edit your question with a more detailed example that doesn't have the change happen exactly halfway through a period? - Justin Michael