---
title: "Stripe payments recorded on FreshBooks invoices | FlowRunner flow"
description: "When a Stripe payment comes in, this flow finds the FreshBooks invoice it pays and records the payment there. Payments it cannot match go to finance in Slack."
url: https://flowrunner.ai/flows/freshbooks-stripe-payments-matched-to-invoices
date_published: 2026-11-17
date_modified: 2026-11-18T16:18:59-08:00
---

# Stripe payments recorded on FreshBooks invoices

When a Stripe payment comes in, this flow finds the FreshBooks invoice it pays and records the payment there. Payments it cannot match go to finance in Slack.

## The prompt

When a payment succeeds in Stripe, look up the Stripe customer and find their client in FreshBooks by email. Among the client's open invoices, find the one the payment is for: first by an invoice number in the payment's description, otherwise by an invoice whose balance equals the amount. Record the payment on that invoice in FreshBooks with the amount, the date and the Stripe payment ID. If there's no customer, no client or no matching invoice, post the payment to our finance channel in Slack so someone records it by hand.

FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.

## The flow

[Import this flow](https://flowrunner.ai/downloads/prompt-to-flow/freshbooks-stripe-payments-matched-to-invoices.json)

-   [FreshBooks](https://flowrunner.ai/integrations/freshbooks)
-   [Stripe](https://flowrunner.ai/integrations/stripe)
-   [Slack](https://flowrunner.ai/integrations/slack)

Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. [How importing works](https://docs.flowrunner.ai/manage/flows#importing-a-flow)

## What each step does

1.  Payment received in Stripe Checks Stripe every 5 minutes for payments that went through, and reads the amount, date and payment method.
2.  Get the Stripe customer Reads the customer on the payment to get their email address. A payment with no customer goes to finance in Slack.
3.  Find the client in FreshBooks Finds the FreshBooks client with the same email address. When there is none, the payment goes to finance in Slack.
4.  Match the payment to an invoice Looks through the client's open invoices for one whose number appears in the payment's description or metadata. Failing that, it takes the oldest open invoice whose balance equals the payment, in the same currency.
5.  Open invoice found? A payment that matches no open invoice goes to finance in Slack with the amount, the Stripe payment ID and the customer's email, and nothing is recorded.
6.  Record the payment in FreshBooks Records the payment against the invoice with the amount, the payment date and method, and the Stripe payment and charge IDs in the note.

## Need a custom payment reconciliation automation? Our team can build it for you.

Tell us the process. Our implementation team at Midnight Flow builds it around how you work, tests it on your real data, and keeps it running, in your own FlowRunner workspace.

[Have us build it](https://midnightflow.ai/packages/custom?utm_source=flowrunner.ai&utm_medium=referral&utm_campaign=general&utm_content=flows.aside&utm_term=freshbooks-stripe-payments-matched-to-invoices)

## Before you turn it on

-   Connect your FreshBooks, Stripe and Slack accounts, and enter your Stripe secret key and client ID.
-   Pick your finance channel in Send unmatched payment to finance.

[Everything FlowRunner does with FreshBooks](https://flowrunner.ai/integrations/freshbooks)

---
Markdown version of https://flowrunner.ai/flows/freshbooks-stripe-payments-matched-to-invoices. Site index: https://flowrunner.ai/llms.txt
