#tareqpi-billingportal-proration
1 messages · Page 1 of 1 (latest)
tareqpi-billingportal-proration
@woeful violet I'm sorry I don't yet follow what you are describing at the moment. What are you doing in the webhook exactly? Like if the Customer already upgraded their Subscription in the CustomerPortal, then you can't "upgrade it again", at that point it's upgraded already.
When the customer upgrades their subscription, a webhook event is sent that indicates that subscription has changed. The webhook is currently handling that with the following code to set the proration behavior to ALWAYS_INVOICE:
SubscriptionUpdateParams params = SubscriptionUpdateParams.builder()
.setProrationBehavior(SubscriptionUpdateParams.ProrationBehavior.ALWAYS_INVOICE)
.build();
stripeSubscription.update(params);
Gotcha, this would never work
The proration_behavior parameter applies to that specific API request. It's not a "setting" that sticks on the Subscription
At that point your call basically does nothing since it changes nothing on the Subscription
In the portal, the upgrade should not be in immediate effect if the proration is OFF in the billing portal's configuration, correct? However, the subscription changes to the new plan immediately.
No your first sentence is definitely incorrect. The only thing that does is basically change the Subscription immediately and do not charge/calculate any proration at all