Skip to content

Avoids Stripe error removing metered price from flex sub#1820

Merged
taylorotwell merged 3 commits intolaravel:16.xfrom
Arkitecht:bugfix/flexible-billing
Feb 9, 2026
Merged

Avoids Stripe error removing metered price from flex sub#1820
taylorotwell merged 3 commits intolaravel:16.xfrom
Arkitecht:bugfix/flexible-billing

Conversation

@Arkitecht
Copy link
Contributor

This addresses the issue raised in Issue #1819 and referenced in PR #1772 comment here until PR is merged or alternative support for flexible billing is provided.

@taylorotwell taylorotwell merged commit d0d0528 into laravel:16.x Feb 9, 2026
2 checks passed
$item['deleted'] = true;

if ($price->recurring->usage_type == 'metered') {
if ($price->recurring->usage_type == 'metered' && $this->usesFlexibleBilling($stripeSubscription)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this condition is wrong. What’s expected is that when the billing mode is flexible, clear_usage should not be used. However, this condition is the reverse of that.

With this change, the operation would still fail when calling swapAndInvoice for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thats my bad, should be ! $this-> ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants