Skip to content
usdconchain-engineering
Joshua C.

Automating USDC Invoice Reminders Without Custody Risks

Step-by-step guide for developers to implement automated USDC invoice reminders for onchain payments. Learn notification flows, webhooks, and practical patterns.

Automating USDC Invoice Reminders Without Custody Risks

For crypto SaaS and B2B products, onchain USDC invoicing solves cross-border friction, but collection is not set-and-forget. Unlike card rails, you rarely get a payer’s email by default. Onchain payments are final and non-custodial. A missed invoice does not mean an automatic retry. To reduce late payments, you need a reliable way to remind payers when an invoice is due or overdue. This guide covers practical patterns for building automated USDC invoice reminders, focusing on non-custodial flows and real-time onchain status.

Why Automated Invoice Reminders Matter for Onchain Billing

Stablecoin payments bring speed and certainty, but the lack of chargebacks and the finality of settlement mean you cannot reverse a failed or missed payment. There is no fallback to auto-bill a card on file. For recurring SaaS or B2B services where a customer pays in USDC from their own wallet, the main risk is that someone simply forgets to pay. An automated reminder system bridges this gap.

Core Components of an Onchain Reminder System

You need three main pieces:

  1. Invoice lifecycle tracking: Database records for invoice creation, status, and due dates.
  2. Onchain payment detection: A service that monitors the relevant chains (Arc, Base, Ethereum, Polygon) for invoice settlement events.
  3. Notification triggers: A job or service that identifies unpaid invoices and sends reminders to payers using the contact channels you have (email, SMS, push, or app notification).

Invoice Data Model Essentials

Each invoice record should include: - Invoice ID - Customer identifier (wallet address, and if available, email or handle) - Chain (arc, base, ethereum, polygon) - Amount (in USDC) - Settlement address (your collection address) - Due date - Status: unpaid, paid, expired

This lets you programmatically determine payment status and when to trigger reminders.

Detecting Invoice Payments Onchain

You cannot depend on a webhook from the payer. You must watch the relevant blockchains for a payment that matches each invoice. Most teams use one of two patterns:

  • Unique address per invoice: Each invoice is paid to a separate settlement address. Any incoming transfer of the exact amount marks the invoice paid. This simplifies detection but has wallet management tradeoffs.
  • Shared address with memo or reference: Payers use a common address, but must include a reference (e.g., a unique memo or data field). This is harder on EVM chains, since ERC-20 transfers do not carry payloads by default. Most SaaS products stick with unique addresses or rely on exact amount matching plus payer address mapping.

Example: Detecting payment for Invoice #12345

Assume you issue an invoice for 1,000 USDC on Polygon to customer wallet 0xC0ffee... due in 7 days. The invoice settlement address is 0xMerchant.... Your backend watches for incoming USDC transfers to 0xMerchant... on Polygon for exactly 1,000 USDC from 0xC0ffee.... When a transfer settles and is confirmed, you mark the invoice as paid.

Scheduling and Triggering Reminders

You need a background job or scheduled function that checks for unpaid invoices approaching or past their due date. This can run every hour or day, depending on your requirements.

Reminder Timing Patterns

Most SaaS teams use a sequence like: - First reminder: 3 days before the due date - Second reminder: On the due date, if unpaid - Overdue reminder(s): 1, 3, and 7 days after the due date, until paid or expired

The exact cadence depends on your customer base and tolerance for late payments.

Example Reminder Flow

Suppose an invoice is due on June 8. Your schedule: - June 5: Send a reminder - June 8, 09:00 UTC: Check status, send a reminder if unpaid - June 9: If still unpaid, send an overdue notice - June 11: Final overdue reminder before marking as failed or expired

Building the Notification Layer

Because wallet addresses do not map to emails by default, you need to collect contact info during onboarding or invoice creation. This is usually done via a hosted checkout or a customer portal. You must store this securely and respect privacy.

Sending Notifications

  • Email: Use a transactional email provider (e.g., SendGrid, Postmark).
  • SMS: Use services like Twilio if you collect phone numbers.
  • Push/App notifications: If you operate a dapp or mobile app, integrate push channels.
  • Webhook: For enterprise customers, offer a webhook that triggers when an invoice is due or overdue, so they can route notifications themselves.

You do not send reminders onchain. The payer must have opted in to receive offchain messages.

Example: Automated Reminder Implementation (Node.js)

Below is a sample Node.js function to check for due invoices and send email reminders using SendGrid. It assumes you have a database table invoices and a payment detection service updating invoice status.

const { sendEmail } = require('./email'); // wraps SendGrid or similar
const db = require('./db'); // your invoice DB adapter

async function sendDueInvoiceReminders() {
  const now = new Date();
  // Select unpaid invoices due within 3 days or overdue
  const invoices = await db.query(`
    SELECT * FROM invoices
    WHERE status = 'unpaid' AND (due_date <= $1 OR due_date - interval '3 days' <= $1)
  `, [now]);
  for (const invoice of invoices) {
    if (!invoice.email) continue; // Skip if no contact info
    let subject, body;
    if (now < invoice.due_date) {
      subject = `Upcoming USDC invoice due ${invoice.due_date.toISOString().slice(0,10)}`;
      body = `Your invoice for ${invoice.amount} USDC is due soon. Pay from your wallet to ${invoice.settlement_address} on ${invoice.chain}.`;
    } else {
      subject = `USDC invoice overdue: action required`;
      body = `Your invoice for ${invoice.amount} USDC was due ${invoice.due_date.toISOString().slice(0,10)}. Pay now to avoid interruption.`;
    }
    await sendEmail(invoice.email, subject, body);
  }
}

This example checks invoices, skips those without an email, and sends reminders using simple subject lines. You can expand this with templating, SMS, or app notifications as needed.

Handling Paid and Expired Invoices

When a payment is detected onchain and confirmed, mark the invoice as paid and suppress further reminders. For expired or failed invoices, mark them accordingly and stop reminders. If your product supports renewing or re-issuing invoices, consider a final email with a new payment link or support contact.

Failure Modes and Monitoring

  • Contact info missing: If the payer never entered an email, reminders cannot be sent. Prompt for contact info at invoice creation or checkout.
  • Partial payments: USDC transfers for less than the invoice amount should not trigger a paid status. Optionally notify support for manual review.
  • Onchain delays: If the payment settles but is not detected due to node lag, you may send a reminder in error. Monitor your indexers and handle reorgs as needed.
  • Unsubscribe requests: Allow customers to opt out of reminders, but make it clear this may risk service interruption.

Real-World Numbers: Reminder Cadence and Payment Rates

A SaaS product issuing $10,000 in monthly USDC invoices to 20 enterprise customers on Base saw the following after implementing automated reminders: - 60% of invoices paid before the due date after the first reminder - 30% paid within three days of the overdue reminder - 10% required manual follow-up

Without reminders, only 35% of invoices were paid on time. Automated offchain reminders more than doubled on-time payment rates, with no change to the non-custodial or finality guarantees.

How We Handle Automated USDC Invoice Reminders at Reclack

At Reclack, we automate invoice reminders by combining onchain payment detection with secure, offchain notifications. Merchants collect payer emails or webhook URLs during checkout. We monitor Arc, Base, Ethereum, and Polygon for real-time USDC settlement. Our backend triggers reminders before due dates and on overdue status, without ever touching customer funds or requiring private keys. If you want to see how this works in production, visit reclack.com.

usdconchain-engineering