Catch duplicate Braintree charges before they become chargebacks

By General Input

Every four hours we scan your Braintree payments for accidental double charges, reverse the clear-cut ones, and flag the rest in Slack for approval.

Integrations

  • Braintree
  • Slack Bot
  • HubSpot

Type

Agentic Task

Categories

  • Finance
  • Operations

Every four hours, scan my Braintree account for accidental duplicate charges and get them reversed before they turn into chargebacks. This matters because issuing banks treat a double charge as a merchant error, so it usually comes back as a chargeback with fees attached rather than a simple refund, and customers tend to dispute with their bank instead of contacting support. The whole point is to catch and fix these within hours.

Start by using Braintree Search Transactions to pull every successful transaction from the last 24 hours. Cluster those transactions by customer, amount, and payment method, and flag any cluster where two or more near-identical charges landed within a short window of each other. Default that window to 60 minutes and make it easy for me to change.

For each suspected cluster, use Braintree Search Customers to attach the customer's name and email address so the alert is readable by a human without anyone having to go look up an ID.

Judge each cluster rather than blindly refunding it. An identical amount plus a matching order ID a few minutes apart is a real double submit, typically caused by a payment system retrying a charge, a shopper clicking buy twice on a slow checkout page, or a pre-authorization hold being converted to a charge incorrectly. On the other hand, distinct order IDs, a genuine restock or repeat purchase, and payments arriving on a normal recurring cadence that is visible in the customer's own transaction history should all be left alone. Give every cluster a confidence rating and a recommended action.

Because the scan runs every four hours across a 24 hour lookback, the same pair of charges will show up on several consecutive runs. Skip any cluster where one of the charges has already been voided or refunded, and do not re-alert or re-reverse a pair that an earlier run already handled.

Post a summary to my billing channel in Slack listing every suspected duplicate, with the customer name and email, the amount, both transaction IDs, the time gap between the two charges, the confidence rating, and the recommended action. If the scan finds nothing, keep it to a short all clear rather than a full empty report.

Then auto-reverse only the high confidence duplicates whose amount falls below a configurable dollar threshold, using Braintree Reverse Transaction, which voids or refunds automatically depending on whether the charge has already settled. That distinction is worth preserving: voiding a charge that has not settled yet means it never appears on the customer's statement at all. Always reverse the later charge in the pair and leave the original alone. Anything above the threshold, and anything below high confidence, stays in Slack for a human to approve instead.

Finally, for each duplicate, use HubSpot Search Contacts to find the contact by email address, then use HubSpot Create Note to log a note against that contact recording the duplicate charge, both transaction IDs, the amount, and whether it was reversed automatically or is still awaiting approval. That way support can see the duplicate and its refund status immediately if the customer calls in.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasoniMessage campaign console with pre-flight checks and delivery boardLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsA searchable RFP answer library your bid team drafts fromLinkedIn Ads budget pacing dashboard for every client account