Skip to content

[FEAT] Add Earnings Export Scheduled Email #820

Description

@Emmzyemms

Description:
Creators want to automatically receive their monthly earnings report by email for tax purposes.

Acceptance Criteria:

  • Add a "Monthly Report Email" toggle in Settings → Notifications
  • POST /api/earnings/schedule-report enables/disables the scheduled export
  • A cron job (Vercel Cron or external) fires on the 1st of each month
  • Cron calls POST /api/cron/earnings-reports with an admin Bearer token
  • Route generates and emails CSV exports to all users with the toggle enabled
  • Email uses a branded HTML template with the earnings summary and CSV attachment
  • Opt-in email preference is stored in the database

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions