Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Reduce Stripe invoice paid alert noise

Neeraj Guptaf09cf8fd03d4
diff --git a/server/pkg/controller/stripe.go b/server/pkg/controller/stripe.go
index 8c35b87891..71597ccfe5 100644
--- a/server/pkg/controller/stripe.go
+++ b/server/pkg/controller/stripe.go
@@ -333,7 +333,9 @@ func (c *StripeController) handleInvoicePaid(event stripe.Event, country ente.St
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
// See: Ignore webhooks received before user has been created
- c.notifyIgnoredPaidStripeWebhook(event.Type, country, stripeSubscriptionID, invoice.Customer.ID)
+ if invoice.BillingReason != stripe.InvoiceBillingReasonSubscriptionCreate {
+ c.notifyIgnoredPaidStripeWebhook(event.Type, country, stripeSubscriptionID, invoice.Customer.ID)
+ }
log.Warn("Webhook is reporting an event for un-verified subscription stripeSubscriptionID:", stripeSubscriptionID)
return ente.StripeEventLog{}, nil
}