Reputation: 387
I am trying to update my subscription in such a way to remove the prorartion behaviour. Here's what I did, (It didn't work and while printing the $subscription_object I didn't see any proration_behavior field despite what it is written in the API documentation of a subscription object)
$subscription_obj = \Stripe\Subscription::retrieve($checkout_session->subscription);
\Stripe\Subscription::update($subscription_obj->id, [
'proration_behavior' => 'none',
]);
I also tried :
$subscription_obj->proration_behavior = 'none';
$subscription_obj->save();
Upvotes: 2
Views: 4174
Reputation: 7459
This is only relevant when you are making another change to the subscription, such as upgrading/downgrading the plan, changing the billing cycle anchor or canceling. If you're otherwise not changing the subscription, there is nothing to prorate and this will have no effect.
If you are trying to disable prorations for some other change, you should provide proration_behavior=none
with that update request.
Upvotes: 5