@past dawn pressed the 🧑💻 Code button in https://discord.com/channels/841573134531821608/842637025524842496 to ask a question:
Code
sub = await self._stripe.update_subscription(
stripe_subscription_id=subscription.stripe_subscription_id,
stripe_items=stripe_items,
expand=["items.data.price"],
proration_behavior="always_invoice", # charges now, but creates prorated lines
)
I’m considering changing it to:
sub = await self._stripe.update_subscription(
stripe_subscription_id=subscription.stripe_subscription_id,
stripe_items=stripe_items,
expand=["items.data.price"],
proratio
Question
I’m updating an existing subscription to add new seats/students. My desired behavior is:
Keep the current subscription billing cycle unchanged.
Do not create prorated lines like “Remaining time” or “Unused time”.
Charge the customer immediately for the full amount of only the newly added seats.
Have the new quantity reflected in the subscription for future renewals.
Is there any way to achieve this using only Subscription.update, without creating a separate manual invoice o
What have you already attempted?
I tried using proration_behavior="always_invoice", but the generated invoice includes prorated adjustments such as “Remaining time” and “Unused time”. That is not the desired behavior because the business rule is to charge the full value of the new seats immediately, not a prorated amount.
I also checked proration_behavior="none", but based on the documentation and tests, it prevents prorations and updates the subscription quantity, but does not generate an immediate charge
What are you working on?
I’m building a subscription flow where a parent/customer can add new students/seats to an existing subscription. The system needs to charge immediately for the