Skip to content

API: Invoice Email Delivery & Automatic Reminders #67

@0xdevcollins

Description

@0xdevcollins

Summary

Implement invoice sending via email (Resend) and automatic payment reminders via BullMQ scheduled jobs.

Requirements

  • POST /v1/invoices/:id/send — Send invoice to customer via email
    • Custom message field in request body
    • Email includes: merchant branding, invoice summary, "Pay Now" CTA button linking to checkout
    • Update status to SENT
  • Track when customer views invoice email (pixel/link tracking) → update to VIEWED
  • Automatic reminders via BullMQ:
    • 3 days before due date
    • On due date
    • 3 days after due date (mark as OVERDUE)
  • Reminder emails use Resend templates with merchant branding

Dependencies

  • Notifications module (Resend) — already implemented
  • BullMQ — already configured

Acceptance Criteria

  • Invoice sent via email with merchant branding and pay link
  • View tracking updates invoice status
  • 3 reminder jobs scheduled automatically on invoice send
  • Overdue status applied automatically after due date + 3 days
  • Webhook events fired: invoice.sent, invoice.viewed, invoice.overdue

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions