Skip to content

🔒 GDPR billing org-axis data provider (anonymize, keep invoices) #3889

@PierreBrisorgueil

Description

@PierreBrisorgueil

Self-register billing as an org-axis GDPR provider that anonymizes payment identifiers while keeping the financial record (legal/tax retention).

Scope — billing.init.js (axis:'org', retention:'anonymize')

  • Export per orgId: Subscription + ExtraBalance ledger + Usage (exclude internal ProcessedStripeEvent / FailedBackfill — not subject data).
  • Erase = anonymize Stripe identifiers (stripeCustomerId, stripeSubscriptionId, ledger stripeSessionId / historyId / adminUpdatedBy); keep org id, amounts, dates, ledger kinds (tax retention). BillingUsage (pure metering) may hard-delete (add deleteByOrg).
  • Degrades to a no-op when billing is deactivated.

DoD

  • Provider resolves orgs via the user→org bridge; anonymize keeps the financial trail intact.
  • /verify green.

Note: a billing org-removal cleanup handler is a separate concern, out of scope here.

Depends on: GDPR export+erasure controller (org-axis payload).

Created via /dev:issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions