Decide and reconcile Pro entitlement after a fully refunded Stripe subscription

Open
#26,365 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
firebase, python
Domain
backend, payments

Research direction

Start with the read-only mismatch scanner at backend/scripts/support/find_stripe_entitlement_mismatches.py and trace how Stripe subscription events update the Firestore user entitlement; the issue says the deployed code path has not yet been isolated. First get a product decision on refund timing and treatment of other entitlements, then locate the relevant event tests and add the listed refund and cancellation cases. Done means event ordering and retries project the approved rule consistently, reconciliation is auditable and reversible, and a real affected account is verified after release.

Written by the indexing model from the issue text.

Description

Observed

A read-only support check found a yearly Stripe subscription that is canceled and whose charge was fully refunded. No other active Stripe subscription was found for that account, while its Firestore user record still projects an active paid Pro plan linked to the canceled subscription. No account or billing changes were made. This establishes a Stripe/Firestore state difference; the correct access outcome is a policy decision, and the deployed code path has not been isolated.

Decision needed

Specify whether a full refund ends paid access immediately, at a stated effective date, or at the original period end. State how partial refunds, goodwill credits, and independent prepaid or second subscriptions differ. Preserve the explicit paid-through cancellation behavior unless the approved rule changes it.

Implementation and verification

After the billing/product ruling, make refund and cancellation events project the chosen entitlement consistently; handle event order and retries. Reconcile affected accounts with an auditable, reversible operator path that checks for other valid entitlements before writing. Add tests for full refund before/after cancellation, partial refund, ordinary paid-through cancellation, and a different active subscription. Verify one real affected account after release before closing.

Related

PR #21339 intentionally retains access after immediate cancellation and leaves refund-aware policy for follow-up. PR #25877 checks that the latest invoice is paid, but does not decide refund handling. The read-only mismatch scanner covers active Stripe subscriptions and will not detect this inverse state.

Dominant language
Python
Stars
14k
Forks
2.7k
Avg merge
9h 19m
Merged PRs (30d)
655

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BasedHardware/omi

All issues in BasedHardware/omi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.