# Daily Braintree declined-payment recovery digest to Slack

> Every weekday at 8am, your billing team gets a Slack rundown of yesterday's failed Braintree charges, the revenue at risk, and who to chase first.

- Workflow type: agent
- Services: Braintree, Slack Bot
- Categories: Finance, Operations
- Published: 2026-07-17

## What it does

- Each weekday morning, gathers every Braintree payment that was declined, rejected, failed, or expired in the last 24 hours.
- Adds each customer's name and email so your team knows exactly who to reach out to.
- Totals the revenue at risk and ranks customers by the biggest recoverable amounts first.
- Posts a clean digest to your billing Slack channel with a suggested outreach note for each customer, or a quick all-clear when there were no failures.

## What you'll need

- A Braintree account with permission to view transactions and customers.
- A Slack workspace with a channel for your billing team.
- The name of the Slack channel where the digest should be posted.

## Prompt

Every weekday at 8am, run a declined-payment recovery digest so our billing team can chase failed Braintree charges the same morning. This runs on a schedule (cron), Monday through Friday at 8am.

Start with Braintree Search Transactions to pull every transaction created in the last 24 hours whose status is a failure: processor declined, gateway rejected, failed, or authorization expired. Skip anything in test mode, and skip any charge that has already been recovered (for example, a later successful charge to the same customer for the same amount or order). For each qualifying transaction, read the amount, currency, status, and the specific decline or rejection reason.

For each remaining failed transaction, use Braintree Search Customers to look up the customer by their ID or email and pull their name and email address so the billing team knows exactly who to contact. If a customer cannot be matched, still include the charge and note that contact details are missing.

Then build the digest. Total up the revenue at risk across all failed charges (amounts are decimal strings in each transaction's currency, so keep currencies separate if there is more than one). List each affected customer with the amount, the specific decline reason, and a short suggested outreach note tailored to that reason (for example, an expired card reads differently from an insufficient-funds decline). Order the list so the largest recoverable amounts come first.

Post the finished digest to our billing channel with Slack, Send a Message. Lead with the total revenue at risk and the number of affected customers, then the prioritized customer list with amounts, decline reasons, and the suggested notes. Use clear Slack formatting so it is easy to skim on a phone.

If there were no qualifying declined payments in the last 24 hours, post a brief all-clear to the same channel (for example, "No declined Braintree payments in the last 24 hours") instead of staying silent, so the team knows the check ran.

## How to customize

- Change the schedule, for example run it seven days a week or later in the morning.
- Choose which Slack channel receives the digest.
- Adjust which failure types count, or set a minimum amount so only larger declines are flagged.

## FAQ

### Which failed payments does it include?

It looks for charges from the last 24 hours that were declined by the processor, rejected by the gateway, outright failed, or where the authorization expired.

### Will it flag test transactions?

No. Test-mode charges and payments that have already been recovered are skipped, so your team only sees real, still-open issues.

### What happens on a day with no failed payments?

You still get a short all-clear message in Slack, so you know the check ran and there is nothing to chase.

### Do I need to write the outreach messages myself?

No. Each customer in the digest comes with a short suggested note you can copy, tweak, and send.

### Can I run this on weekends too?

Yes. It defaults to weekday mornings, but you can set it to run on any days and times you like.

Use this prompt in General Input: https://www.generalinput.com/prompts/daily-braintree-declined-payment-recovery-digest-to-slack