Skip to content

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 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

  1. Staff creates a payment link from the order detail screen in the backoffice
  2. The link is generated via the selected payment provider (e.g., Stripe Checkout, PayPal)
  3. Staff copies the link and sends it to the customer (via email, SMS, etc.)
  4. The customer clicks the link, sees the payment page, and pays
  5. 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:

  1. Finds unpaid invoices with due dates within the reminder window
  2. Checks each invoice's payment status (skips paid invoices)
  3. For invoices due soon: sends a due soon reminder (one per invoice)
  4. 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 reminder
  • InvoiceReminder:OverdueCount -- number of overdue reminders sent
  • InvoiceReminder: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:

  1. Email Builder -- Configure email templates for the invoice.due.soon and invoice.overdue topics in the backoffice
  2. Custom handlers -- Implement INotificationAsyncHandler<InvoiceDueSoonNotification> or INotificationAsyncHandler<InvoiceOverdueNotification> as shown above
  3. Webhooks -- Subscribe to the corresponding webhook topics

These features work well together:

  1. An invoice is created for a phone order
  2. Staff generates a payment link and emails it to the customer
  3. If the customer doesn't pay, the reminder system sends automated follow-ups
  4. 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.