Skip to content

Systemic Stripe→DB subscription sync failures — multiple orgs stuck at stale/null status despite active Stripe subscriptions #6686

Description

Summary

Follow-up to #6654. What looked like a one-off webhook miss is recurring across multiple orgs — this is a systemic Stripe→DB sync gap, not an isolated incident.

Confirmed occurrences

All show a live/active Stripe subscription with stale or null subscription_status in our DB:

Impact

Paying members are denied entitlement (blocked from member-only benefits, directory listing stuck in draft, "tier pending billing sync" messaging) despite having a valid, active subscription in Stripe. This is now confirmed across at least 3 distinct orgs, with one org recurring after a prior manual fix.

Root cause (suspected)

customer.subscription.created / customer.subscription.updated webhook events are not reliably updating subscription_status in our DB. Because Stripe's webhook delivery log only retains ~1 week of history, once a sync gap is discovered, the original event is frequently no longer available to replay — making point-in-time webhook resend an unreliable recovery path.

Immediate mitigation

Each affected org has (or had) a documented fix via:

POST /api/admin/accounts/{org_id}/sync

This pulls fresh state directly from Stripe and corrects the DB row. This is a per-org manual remediation, not a fix for the underlying gap.

Requested investigation

  1. Determine why webhook events are failing to update subscription_status — check Stripe webhook endpoint delivery success rate, error responses, and whether failures are silent (no retry/alerting) on our side.
  2. Since org from Fix payment history 500 error and sync subscription on Stripe link #538/Stripe subscription active but not synced to org — missing webhook event, no replay possible #6654 recurred, investigate whether the original Stripe subscription active but not synced to org — missing webhook event, no replay possible #6654 backfill was incomplete, or whether the sync gap is ongoing/repeatable for the same org (e.g., a scheduled job overwriting status, or a code path that doesn't call the sync logic consistently).
  3. Add the periodic reconciliation job proposed in Stripe subscription active but not synced to org — missing webhook event, no replay possible #6654 — compare Stripe subscription state against DB for all orgs with a linked cus_... ID on a schedule, not just on-demand via manual /sync calls or support escalation.
  4. Add alerting for webhook delivery failures so gaps are caught within Stripe's replay window, rather than discovered later by members hitting entitlement walls.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    admin-toolInternal tools for AAO staffbugSomething isn't workingclaude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.priority:P0Immediate priority: user/revenue/security/reliability bug to work nowseverity:critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions