Payment Links and Invoice Reminders¶
Merchello provides two complementary features for getting invoices paid: payment links (shareable URLs generated by staff in the backoffice) and invoice reminders (automated emails for unpaid invoices).
Payment Links¶
Payment links let staff generate a shareable URL that customers can use to pay an invoice. This is useful for phone orders, custom quotes, or any situation where the customer was not present during order creation.
How It Works¶
- Staff creates a payment link from the order detail screen in the backoffice
- The link is generated via the selected payment provider (e.g., Stripe Checkout, PayPal)
- Staff copies the link and sends it to the customer (via email, SMS, etc.)
- The customer clicks the link, sees the payment page, and pays
- The payment is recorded against the invoice via webhook
Supported Providers¶
Not all providers support payment links. The provider must declare SupportsPaymentLinks in its capabilities:
| Provider | Payment Links |
|---|---|
| Stripe | Yes |
| PayPal | Yes |
| Amazon Pay | No |
| Braintree | No |
| WorldPay | No |
| Manual | No |
Payment link creation, retrieval, and deactivation are all managed through the backoffice UI — backed by PaymentLinksApiController under /umbraco/api/v1/ and orchestrated by IPaymentLinkService. The link URL and provider info are persisted on Invoice.ExtendedData. There is no storefront-facing API for payment links — they are an admin-only feature.
Invoice Reminders¶
Invoice reminders are automated emails sent to customers when invoices are approaching their due date or are overdue. This is handled by the InvoiceReminderService and a background job.
Reminder Types¶
The system sends two types of reminders:
| Type | When | Notification |
|---|---|---|
| Due Soon | Before the due date | InvoiceDueSoonNotification |
| Overdue | After the due date | InvoiceOverdueNotification |
Configuration¶
Bound from Merchello:Invoices:Reminders in appsettings.json (see InvoiceReminderSettings.cs and the Startup.cs binding):
{
"Merchello": {
"Invoices": {
"Reminders": {
"ReminderDaysBeforeDue": 7,
"OverdueReminderIntervalDays": 7,
"MaxOverdueReminders": 3,
"CheckIntervalHours": 24
}
}
}
}
| Setting | Default | Description |
|---|---|---|
ReminderDaysBeforeDue |
7 |
Days before due date to send the first reminder |
OverdueReminderIntervalDays |
7 |
Days between overdue reminder emails |
MaxOverdueReminders |
3 |
Maximum overdue reminders per invoice |
CheckIntervalHours |
24 |
How often the background job checks for invoices |
How Reminders Work¶
The background job runs periodically (default: every 24 hours) and:
- Finds unpaid invoices with due dates within the reminder window
- Checks each invoice's payment status (skips paid invoices)
- For invoices due soon: sends a due soon reminder (one per invoice)
- For overdue invoices: sends an overdue reminder (up to the configured maximum)
Deduplication¶
The system tracks sent reminders using the invoice's ExtendedData:
InvoiceReminder:LastSent-- timestamp of the last due-soon reminderInvoiceReminder:OverdueCount-- number of overdue reminders sentInvoiceReminder:LastOverdueSent-- timestamp of the last overdue reminder
This prevents duplicate emails if the job runs multiple times before the interval elapses.
Custom Reminder Handlers¶
You can hook into reminder notifications to customise behavior or integrate with external systems:
public class MyDueSoonHandler : INotificationAsyncHandler<InvoiceDueSoonNotification>
{
public async Task HandleAsync(InvoiceDueSoonNotification notification, CancellationToken ct)
{
// Send via your preferred channel, update a CRM, etc.
var invoice = notification.Invoice;
var dueDate = notification.DueDate;
}
}
public class MyOverdueHandler : INotificationAsyncHandler<InvoiceOverdueNotification>
{
public async Task HandleAsync(InvoiceOverdueNotification notification, CancellationToken ct)
{
// Escalation logic, Slack alerts, etc.
var overdueCount = notification.OverdueReminderCount;
}
}
There are three ways to handle reminder emails:
- Email Builder -- Configure email templates for the
invoice.due.soonandinvoice.overduetopics in the backoffice - Custom handlers -- Implement
INotificationAsyncHandler<InvoiceDueSoonNotification>orINotificationAsyncHandler<InvoiceOverdueNotification>as shown above - Webhooks -- Subscribe to the corresponding webhook topics
Reminder and Payment Link Workflow¶
These features work well together:
- An invoice is created for a phone order
- Staff generates a payment link and emails it to the customer
- If the customer doesn't pay, the reminder system sends automated follow-ups
- Each reminder can include the payment link for easy one-click payment
Tip: Include the payment link in your reminder email templates so customers can pay directly from the reminder email.