Skip to content

Conversation

julienbourdeau
Copy link
Contributor

@julienbourdeau julienbourdeau commented May 26, 2025

Context

This PR is part of upgrading Stripe (clients + API version).

Description

This is extracted from #3300.

You cannot update the api_version of an existing WebhookEndpoint. You must create a new WebhookEndpoint with the new version and delete the old one once you migrated. This is the best way to not have any downtime.

https://docs.stripe.com/webhooks/versioning

It means to set the version for all our customers, we'll need to recreate the endpoint for all organization. It's fine but I'd rather upgrade to a more recent version before we enforce it in the webhook.

  • Replace PaymentProviders::StripeService.new.refresh_webhook by dedicated RefreshWebhookService
  • Tried to make PaymentProviders::StripeService.create_or_update a little clearer as secrets cannot be updated

Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

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

Looks great!

@julienbourdeau julienbourdeau merged commit 8b75f25 into main May 26, 2025
14 checks passed
@julienbourdeau julienbourdeau deleted the feat/refactor-stripe-webhooks branch May 26, 2025 14:16
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