feat: invoice email sending, view tracking & BullMQ payment reminders#124
Merged
0xdevcollins merged 1 commit intomainfrom Apr 4, 2026
Merged
feat: invoice email sending, view tracking & BullMQ payment reminders#1240xdevcollins merged 1 commit intomainfrom
0xdevcollins merged 1 commit intomainfrom
Conversation
Closes #66 - POST /v1/invoices/:id/send now sends branded email via Resend with merchant logo, brand colour, optional custom message, Pay Now CTA, and an embedded 1×1 tracking pixel - GET /v1/invoices/:id/track — public pixel endpoint; loading it transitions invoice SENT → VIEWED and fires invoice.viewed webhook - Three BullMQ reminder jobs auto-scheduled on send (3 days before due, on due date, 3 days after due date which also marks OVERDUE) - Webhook events added: invoice.sent, invoice.viewed - invoice.overdue webhook now fired per-invoice (bulk cron + reminder processor) - invoice.paid webhook fired on full payment via recordPayment() - Notification templates updated with merchant branding and contextual due-date colouring (red when overdue) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #66
Summary
POST /v1/invoices/:id/send— sends branded invoice email (merchant logo, brand colour, optional custom message, Pay Now CTA) and schedules automatic remindersGET /v1/invoices/:id/track— public pixel endpoint embedded in the email; when the customer opens the email their client loads this pixel, transitioning the invoiceSENT → VIEWEDand firing theinvoice.viewedwebhookinvoice.sent,invoice.viewedinvoice.overdueandinvoice.paidwebhooks now fired correctly per invoiceReminder schedule
before_dueon_dueafter_dueOVERDUE+invoice.overduewebhook + reminder emailWebhook events
invoice.sentPOST /:id/sendinvoice.viewedinvoice.paidinvoice.overdueafter_duereminder job or bulk cronTest plan
POST /v1/invoices/:id/sendwith{ "message": "Please pay by end of month" }— email received with custom message and brandingGET /:id/trackfires, status changes toVIEWED,invoice.viewedwebhook deliveredinvoice-remindersqueue) after sendPOST /v1/invoices/:id/paymentswith full amount —invoice.paidwebhook firedAPI_URLenv var set correctly so tracking pixel URL resolves🤖 Generated with Claude Code