Skip to content
← Processes

Chase failed direct debits

Each failed direct debit is matched to its invoice, skipped if paid, retrying or already chased, and given a reminder draft that fits why it failed.

GoCardless→Pennylane→Slack→Gmail
Starts
When you ask
Steps
7
Checks and gates
2
A person decides
1

Chase this month's failed direct debits.

Request in chat after the debit run

See it in a demo

Claude runs the rest autonomously

  1. 1

    AI lists the failed debits not yet closed.

    GoCardless

    GoCardless

    Every failure in the window comes back with its cause and retry status, minus what the log already closed and anything the provider will retry.

  2. 2

    AI confirms the invoice is still owed.check

    Pennylane

    Pennylane

    The failure is matched to its invoice, and an invoice paid by transfer, a credit note or two equally likely matches stop it there.

    GoCardless

    GoCardless

  3. 3

    AI sorts each failure by cause, posts the disputes.

    Slack

    Slack

    Low funds and a dead mandate each get their own ask, while disputes and repeat failures go to the billing channel instead of an email.

  4. 4

    AI skips what was already chased.check

    Gmail

    Gmail

    A draft or a sent message whose subject carries the same invoice reference ends the payment as already chased.

  5. 5

    AI drafts one reminder per failure.

    Gmail

    Gmail

    Each reminder states the amount, the invoice, the charge date and one next step, and waits in the mailbox as a draft.

  6. 6

    AI logs every payment against its id.

    Every payment the run looked at gets one row keyed on its id, so the next run never chases the same incident twice.

  7. Read and send each draft. A person takes it from here.handover

    A person reads the drafts, largest debt first, and sends, edits or deletes each one.

A direct debit fails and the payment provider says why, in a reason code nobody outside finance reads. Someone then opens the accounting tool to find the invoice, checks whether the customer already paid by transfer, looks for the reminder a colleague may have sent last week, and writes an email that mostly says the same thing every month. Miss one and the debt ages. Chase one too fast and you ask a customer to fix a payment the provider was about to retry on its own.

Both halves already exist. Your direct-debit provider knows every failed payment, its cause, its mandate and whether a retry is coming. Your accounting tool knows whether the invoice behind it is still open. The work is the join, run the same way every time, with a mailbox that holds the drafts and a log that remembers what was done.

What you get

Every failed direct debit that is still owed has one reminder draft waiting in the mailbox, worded for why it failed, while retries, settled invoices, disputes and anything already chased are logged and left alone.

What each failed debit is checked against

The run pulls failed payments from GoCardless in one call, already resolved to the customer, the amount, the cause and the retry status. It reaches back one full billing cycle, because the provider filters on when a payment was created rather than when it failed, then keeps only the failures inside the window. Anything the provider will still retry is logged and left for the provider.

Each remaining failure is matched to its invoice in Pennylane, first by the payment id written on the document, then through the customer, the amount and a due date close to the charge date. An invoice since paid by transfer ends the chase. A document carrying the payment id that turns out to be a credit note ends it too: the debt was already cancelled. Before anything is drafted, Gmail is searched for a draft or a sent message carrying the same invoice reference.

What makes overdue invoice reminders hold up

The reminder fits the cause, not a calendar. Low funds keep the mandate alive, so the email names the date you will collect again or gives transfer details. A cancelled or expired mandate fails the same way twice, so the ask is a new mandate, never "we will try again". A disputed debit gets no email at all: it is posted to your billing channel on Slack for a person, and so is a customer whose debits keep failing past your threshold. A cause the run has never seen is not guessed into a group; it is listed for someone to handle and map.

Ambiguity stops the run rather than the customer. Two open invoices that both match a failed payment means neither is chased, and the payment waits for a person. A confirmed payment on the same mandate since the failure is not taken as proof of payment on a subscription, where it is usually just the next cycle: only the invoice's own paid status settles it there.

One failed payment is one incident. Every payment the run looks at gets a row in a log keyed on its payment id, including the ones that stopped early, and the next run reads that log before anything else, so a dispute is posted once and a debt is chased once. Escalations are written the moment they are posted, not at the end, so a run that stops halfway never posts the same one twice. Nothing leaves the mailbox on its own: every reminder is a draft, ordered largest debt first, for a person to send.

Overdue invoice email examples

These are examples of the drafts the process writes, one per cause group, with the bracketed fields filled from the payment and the invoice. The subject keeps the same pattern on every run, because the duplicate check searches for it.

Low funds, no retry left

Subject: Payment failed — invoice [INV-0142]

Hello,

The direct debit of [€480.00] for invoice [INV-0142], presented on
[3 October], was declined by your bank.

We will present it again on [17 October]. If you would rather pay by
transfer before then, our bank details are: [IBAN, reference INV-0142].

Dead mandate

Subject: Payment failed — invoice [INV-0157]

Hello,

The direct debit of [€1,200.00] for invoice [INV-0157], presented on
[3 October], could not be collected: the mandate on file is no longer
active.

Presenting it again would fail the same way, so we need a new mandate.
You can set one up here: [your mandate setup link].

Refer to payer

Subject: Payment failed — invoice [INV-0163]

Hello,

Your bank declined the direct debit of [€310.00] for invoice
[INV-0163], presented on [3 October], and asked us to contact you.

We will present it again on [17 October]. If something has changed on
your side, or you would rather pay by transfer, our bank details are:
[IBAN, reference INV-0163].

There is no example for a dispute, because the process never emails one.

The prompt

The real prompt behind the steps above, detailed enough that an agent with the same tools can run it as written. The Run buttons copy the full version, which also carries the steps for connecting those tools.

# Chase failed direct debits

You have access to your direct-debit provider, your accounting tool,
a mailbox, a team chat and a table you can read and write. Run this
for **[the failed direct debits of the window you are chasing, e.g.
this month]**.


## 1. List the failed debits not yet closed

- Pull the failed payments in one call, with the page size set
  explicitly to its maximum (500). Each row already carries the
  customer's name and email, the amount, the charge date, the failure
  time, the cause and reason code, whether a retry is scheduled, and
  the mandate's state. The payment → mandate → customer chain is
  resolved for you: there is no per-row lookup to do.
- **The date filter is on when the payment was created, not when it
  failed.** A payment created before your window that failed inside
  it will not come back. Set the filter one full billing cycle
  earlier than the window you care about, then keep only the rows
  whose failure time falls inside it. If a page still comes back
  full, narrow the window instead of assuming you have everything.
- Read **[your reminder log]** (step 6) once, here, before anything
  else runs, and index it by payment id. **A payment whose logged
  outcome is final (settled, escalated, needs a person, already
  chased, drafted) is dropped now**, before step 3 can post anything
  about it. Runs overlap by a full cycle on purpose, so without this
  the same dispute would be posted to your billing channel on every
  run. Only *retry pending* rows are evaluated again.
- **A retry is scheduled → draft nothing.** While the provider says
  it will retry, it re-presents the payment on its own, and a
  reminder now asks the customer to fix something that may fix
  itself within days. Log it as *retry pending* and move on.
- **Carry over what an earlier run left pending.** For every *retry
  pending* row in the log, re-read the payment by its id: its
  creation date may now sit outside the new window, so this is the
  only way a retry that failed too gets picked up. Confirmed or paid
  out → *settled*. Failed again → read its latest failure reason, and
  whether yet another retry is scheduled.

## 2. Confirm the invoice is still owed

Resolve the invoice through a fallback chain, strongest key first:

- **Find by external reference**, with the payment id as the
  reference. The search is filtered server-side, so an old or
  archived document still turns up, and a miss comes back as "not
  found" rather than an empty list. This key only exists if your
  billing flow writes the payment id onto its documents: test it on
  one known payment before trusting a miss.
- **A hit is not always the invoice.** The document carrying the
  payment id is often a credit note raised against the failed
  payment. Credit notes carry negative amounts: one means the debt
  was already cancelled, and the payment ends as *settled
  (credited)*. Only a sales invoice with a positive amount goes on.
- **On a miss:** resolve the payment to its party, whose metadata may
  carry your own customer reference (depending on how the mandate was
  created, it may not). Find the customer in the accounting tool by
  that reference, or list customers to resolve the id from the name.
- Then list invoices, **always bounded with a page limit**: without
  one the whole invoice history comes back and can overflow the
  response. Start small and widen. Match sales invoices only, on the
  customer, the amount and a due date close to the charge date.
  **Two open invoices match → pick neither**: log the payment as
  *needs a person* rather than chase the wrong document.

Two checks then end the payment as *settled*:

- The matched invoice already shows as paid: a bank transfer came in
  after the debit failed. This is the check to trust.
- A confirmed or paid-out payment of the same amount on the same
  mandate since the failed charge date. **On a subscription, that row
  is usually just the next cycle**, and reading it as a re-collection
  drops a real debt without a warning. Count it only when the payment
  shows no subscription or instalment schedule and, when your billing
  flow writes one, its reference points at the same invoice.
  Otherwise rely on the invoice's paid status alone.

## 3. Sort each failure by cause, post the disputes

Map the cause and reason code into groups once, then treat each group
the same way every run:

- **Low funds, no retry left.** The mandate still works. A
  refer-to-payer refusal belongs here too: the bank declined and sent
  the payer to ask why, which is usually low funds, not a dispute. The
  reminder states the amount and the invoice and gives one next step:
  the date you will collect again, or your transfer details.
- **Dead mandate**: cancelled, expired, or the bank account closed.
  Collecting again fails the same way, so the ask is a new mandate
  through **[your mandate setup link]**, never "we will try again".
- **Dispute**: only a payer disputing the authorization, or a
  chargeback-type cause. A chasing email escalates it. Post the
  customer, amount, invoice reference and cause to **[your billing
  channel]** and stop: a person handles it. Logged as *escalated*.
- **Anything unmapped**: invalid bank details, a transferred account,
  a cause you have never seen. Guessing a group sends the wrong ask,
  so it becomes *needs a person* and is listed in the report.
- **Repeat failures.** List the mandate's failed payments since the
  start of **[your lookback window]**, page size 500, and count them.
  Count payments, not events: the events feed has no date filter. At
  **[your repeat-failure threshold]** the payment gets the same channel
  post as a dispute instead of a polite email, logged as *escalated*.
- Right after posting, write the *escalated* rows to the log in one
  batch keyed on the payment id, instead of waiting for step 6. A run
  that stops between the post and the end-of-run log would otherwise
  post the same payment again next time.

Order what remains by amount, then by days since the failure, so the
reviewer reads the largest, oldest debts first.

## 4. Skip what was already chased

One incident is one payment id, and it gets one reminder at most. The
log already dropped what it closed; what is left are the duplicates
it cannot see:

- Search the mailbox for `in:drafts subject:"[invoice reference]"`:
  a draft from an earlier run that stopped before logging it. Search
  rather than list drafts, since a list returns only the most recent
  page.
- Search for `in:sent subject:"[invoice reference]"`: a reminder
  someone wrote by hand, outside this process.

Either match ends the payment as *already chased*. Both checks work
only because the subject line in step 5 always carries the invoice
reference. Don't reword it run to run.

## 5. Draft one reminder per failure

- Save each reminder as a **draft** in the mailbox. Nothing in this
  process sends: report every one as *draft*, never *sent*.
- **To**: the invoice recipient on the accounting side when it
  differs from the payer's email on the debit. Whoever receives
  invoices is usually the one who can fix a payment. **Subject**: a
  fixed pattern carrying the invoice reference, e.g. *Payment failed —
  invoice [invoice reference]*. **Body**: amount, invoice reference,
  charge date, and the one next step from step 3. Firm and courteous;
  no late-payment penalty unless your terms state one. Let the
  mailbox append its own signature rather than writing a sign-off.
- A new draft can be missing from a mailbox tab that is already open
  for a while. Tell the reviewer to reload or search the drafts
  folder rather than assume it failed.

## 6. Log every payment against its id

- One batch write at the end of the run, keyed on the payment id, so
  a re-run merges onto the same rows instead of appending duplicates.
  One row per payment this run evaluated, **including the ones that
  exited early**: payment id, invoice reference, cause group, outcome
  (*retry pending*, *settled*, *settled (credited)*, *escalated*,
  *needs a person*, *already chased*, *drafted*), the draft id when
  there is one, and the run date read at run time rather than typed.
- Payments dropped in step 1 because their outcome was already final
  stay out of the batch, so a *drafted* row is never overwritten by a
  weaker outcome on a later run.

## 7. Read and send each draft

A person opens the drafts, largest first, and sends, edits or deletes
each one. Nothing leaves the mailbox until they do.

## Rules

- The accounting side is read-only here: never collect again, create
  a credit note, or finalize or send an invoice.
- Never send an email: every reminder is a draft a person sends.
- Never email a customer about a disputed debit.

## Output

A short report: failures found in the window, then how many were
skipped as already handled, retry pending, settled (paid, credited or
collected again), escalated to your billing channel (disputes, repeat
failures), already chased, or left for a person (ambiguous invoice
match, unmapped cause), and how many drafts wait in the mailbox,
listed largest first with customer, amount and cause.

Why run it with Tulina

A prompt helps one person. A process moves a team.

Pasted into a chat, the prompt above works once, for whoever pasted it. In Tulina, "Chase failed direct debits" becomes a process the team shares, that keeps its history, runs on its own, and stays inside the same security perimeter as the tools it calls.

  • The whole team works on the same one

    PersonalTeamOrganisation

    A process lives where it belongs: yours, your team's or the whole organisation's. Whoever runs it can improve it, and everyone starts from the best version instead of explaining the job again.

  • Every edit is a version

    v1v2v3

    Each change is a new version with the previous one kept, so a bad edit is undone by restoring an earlier one. Every run records the version it followed, and what a run teaches goes back into the process.

  • It runs without you

    schedulewebhookon demand

    A hosted agent runs the process on Tulina's own infrastructure, on a schedule or when an event arrives, and keeps going when you close the chat. Nothing to host. Every run is tracked to its outcome.

  • Inside the same security perimeter

    vaultrolesrun log

    Credentials stay in the vault, never in the prompt. Roles decide who may run what, every call is logged, and a step a person has to approve waits for that person.

Questions about overdue invoice emails

The amount, the invoice reference, the charge date and one next step, and nothing else to argue with. Here the next step depends on why the debit failed: a date you will collect again or transfer details when funds were short, a link to set up a new mandate when the old one is dead. The subject always carries the invoice reference.

It can do everything up to the send. Each failed debit is checked against its invoice, skipped if it was paid by transfer, credited, is about to be retried or was already chased, and the rest get a reminder drafted in the mailbox. A person reads and sends each draft, and disputes go to a person without any email at all.

Not while the provider says it will retry: it re-presents the payment on its own, and a reminder asks the customer to fix something that may fix itself within days. Not when the invoice was paid another way since. And not on a dispute, where a chasing email escalates it.

One failed payment is one incident, keyed on its payment id in a log the next run reads first. Before drafting, the mailbox is also searched for a draft or a sent message whose subject carries the same invoice reference, which catches a reminder written by hand.

Processes that share tools with this one. The shared tools are lit.

See Tulina in a 30-minute demo.

Book a demo