Skip to content

Conversation

@sean-brydon
Copy link
Member

Summary

Add task handlers for proration billing email flow:

  • sendProrationInvoiceEmail: Sends invoice email and schedules 7-day reminder
  • sendProrationReminderEmail: Sends reminder if invoice still unpaid
  • cancelProrationReminder: Cancels scheduled reminder on payment success

Usage

The calling job should trigger these tasks:

  1. After MonthlyProrationService.createProrationForTeam() succeeds with invoice:
await tasker.create("sendProrationInvoiceEmail", {
  prorationId,
  teamId,
  isAutoCharge
});
  1. After handleProrationPaymentSuccess() to cancel reminder:
await tasker.create("cancelProrationReminder", { prorationId });

Test plan

  • Verify task handlers are registered correctly
  • Verify reminder scheduling works (7 days delay)
  • Verify reminder cancellation on payment success
  • Type check passes

Depends on: #27246

@sean-brydon sean-brydon force-pushed the feat/proration-email-templates branch from 8f29823 to 9f69f09 Compare January 26, 2026 14:17
@sean-brydon sean-brydon force-pushed the feat/proration-tasker-integration branch from 08d3c7c to a2231c2 Compare January 26, 2026 14:18
@sean-brydon sean-brydon force-pushed the feat/proration-email-templates branch from 9f69f09 to fea5046 Compare January 26, 2026 14:20
@sean-brydon sean-brydon force-pushed the feat/proration-tasker-integration branch from a2231c2 to 3e59fae Compare January 26, 2026 14:20
@sean-brydon sean-brydon force-pushed the feat/proration-email-templates branch from fea5046 to b23fdaa Compare January 26, 2026 14:26
Add task handlers for proration billing email flow:

- sendProrationInvoiceEmail: Sends invoice email and schedules reminder
- sendProrationReminderEmail: Sends reminder if invoice still unpaid
- cancelProrationReminder: Cancels scheduled reminder on payment success

The calling job should trigger these tasks after:
1. MonthlyProrationService.createProrationForTeam() succeeds with invoice
2. handleProrationPaymentSuccess() is called (to cancel reminder)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@sean-brydon sean-brydon force-pushed the feat/proration-tasker-integration branch from 3e59fae to 49c35ca Compare January 26, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants