Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

spar_x's avatar

is there a way to disable prorating on subscription upgrades?

Don't ask why.. I just need it to work. Downgrading is disabled altogether and on upgrades I need to charge the full difference between the current plan and new plan.

So if current plan is 5$/month and upgrade plan is 20$/month then at the time of upgrade I need to charge 15$.

Am using Braintree and currently it automatically prorates. Reason why I don't want to prorate is because I use a credit-based system and user is getting the full amount of additional credits (which don't expire) so he needs to be charged the full amount for those additional credits.

I spotted this in Braintree's Subscription.php

$response = BraintreeSubscription::update($subscription->id, [ 'planId' => $plan->id, 'price' => $plan->price * (1 + ($this->user->taxPercentage() / 100)), 'neverExpires' => true, 'numberOfBillingCycles' => null, 'options' => [ 'prorateCharges' => true, ], ]);

So it seems there is a way to set prorateCharges to false. But I don't know how to do that elegantly. Ideally I'd like to set this in the plan definition itself.

Anyone lend me a hand with this please?

0 likes
6 replies
spar_x's avatar

in SubscriptionTest.php I can see this 'options' => ['prorateCharges' => false]

but does anyone know how I can set my plans to not prorateCharges? I'm specifically wanting to allow for plan upgrading without using prorating charges. I need to charge the full amount upon a subscription upgrade and would like to achieve this without having to override the whole upgrade process

1 like
masonfox's avatar

I have also commented on your issue on the Spark repo, here. I am needing this same functionality, but for Stripe.

ejdelmonico's avatar

Are you guys aware of the recent Spark update? There is some changes in there about the prorate options.

nickf's avatar

Further to what @ejdelmonico said, the Spark docs have a brief section on Proration.

Basically, you can add Spark::noProrate(); to the booted method in App\Providers\SparkServiceProvider and the changes to the subscription will only occur at the beginning of the next billing cycle.

This would affect all of your plans, so you can't have some prorated and others not be prorated.

bishop3000's avatar

Spark::noProrate(); appears to only apply to subscription quantity changes, not subscription plan changes. For the latter, put protected $prorate = false; at the top of a Subscription model that overrides Laravel\Spark\TeamSubscription.

Please or to participate in this conversation.