Skip to content

Comments

fix(stripe): prevent duplicate update#2015

Merged
gregberge merged 1 commit intomainfrom
prevent-duplicate-update
Feb 20, 2026
Merged

fix(stripe): prevent duplicate update#2015
gregberge merged 1 commit intomainfrom
prevent-duplicate-update

Conversation

@gregberge
Copy link
Member

No description provided.

@gregberge gregberge requested review from a team, Copilot and jsfez and removed request for a team February 20, 2026 21:19
@argos-ci
Copy link

argos-ci bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Feb 20, 2026, 9:21 PM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes Stripe webhook handling by preventing duplicate subscription updates when customer.updated events are fired. Previously, every customer update triggered a full subscription update, but now updates only occur when the customer's default payment method changes via invoice_settings.default_payment_method.

Changes:

  • Added conditional logic to filter customer.updated events based on previous_attributes
  • Only processes updates when invoice_settings.default_payment_method has actually changed
  • Prevents redundant database updates since subscription-specific changes already trigger customer.subscription.updated events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gregberge gregberge merged commit b8ff656 into main Feb 20, 2026
12 checks passed
@gregberge gregberge deleted the prevent-duplicate-update branch February 20, 2026 21:27
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.

2 participants