Skip to content

Monthly

Find duplicate customers in Stripe

Each month you get a list of customers who share an email address, ready to clean up.

Runs
Monthly
Apps
Stripe
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: on the 1st of each month, find Stripe customers that share the same email address and email me each group with their IDs and created dates.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A growing business finds three Stripe customer records for the same buyer: jane@shop.com, Jane@Shop.com and jane@shop.com with a typo in the name. One has the subscription, one has the old card, and one holds an unpaid invoice. Reports undercount customers, receipts go to the wrong profile, and support wastes time figuring out which record is the real one. Over a year this adds up to a messy customer list nobody trusts.

On the first of each month, ClickRuntime pages through your Stripe customers, groups them by lowercase email and emails you every group with more than one record, listing IDs, creation dates and subscriptions. You clean up duplicates on your own schedule, knowing exactly where to look.

It helps companies that have imported customers, run multiple checkout flows or let people sign up through different front ends.

What you get out of it

  • Customer counts reflect real people

    Duplicates inflate customer totals and distort metrics like average revenue per customer. A monthly cleanup list keeps the numbers you report to investors and your team honest. Cleaner data also makes cohort and retention analysis more accurate for your whole team.

  • Billing lands on the right account

    When a subscription, a card and an unpaid invoice live on separate records, dunning emails and receipts go astray. Merging or retiring the extra records stops confusing messages to customers.

  • Support finds the full history quickly

    Agents searching by email should see one profile with the complete payment history. Cleaning duplicates means fewer back-and-forth questions about which charge belongs to whom. One complete record also makes refund decisions quicker.

  • Problems are caught before they pile up

    Monthly checks find a handful of duplicates at a time. Left alone, hundreds accumulate, and cleaning them in one go becomes a risky project nobody wants to start. A short monthly list takes minutes to clear.

  • Source of duplicates becomes visible

    If the same pattern keeps appearing, such as guest checkout creating a new record every time, the list points you to the flow that needs fixing rather than just treating symptoms.

How it works

What happens, step by step

  1. Once a month, the automation goes through every customer in your Stripe account.

  2. It groups customers by email address, ignoring capital letters.

  3. You get an email listing every email used by more than one customer, with each customer's created date.

Before it runs live

  • Connect Stripe

What you get

RunsMonthly
Find duplicate customers in Stripetoday, 9:00Succeeded
Email · 3 duplicate Stripe customersbilling@acme.example - cus_Q1a2B3c4 (created 2025-06-02) - cus_R9z8Y7x6 (created 2026-09-14)

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Stripe steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
duplicate_customer_report.pyexample
from collections import defaultdict
from datetime import datetime, timezone
import stripe
from clickruntime import on_trigger, credentials, notify

@on_trigger
def run(event):
    stripe.api_key = credentials.secret("STRIPE_API_KEY")
    groups = defaultdict(list)
    for c in stripe.Customer.list(limit=100).auto_paging_iter():
        if c.email:
            groups[c.email.strip().lower()].append(c)
    dupes = {e: cs for e, cs in groups.items() if len(cs) > 1}
    if not dupes:
        return {"groups": 0}
    lines = []
    for email, cs in sorted(dupes.items()):
        lines.append(email)
        lines += [f"  - {c.id} (created {datetime.fromtimestamp(c.created, timezone.utc):%Y-%m-%d})" for c in cs]
    notify.email_me(f"{len(dupes)} duplicate Stripe customers", "\n".join(lines))
    return {"groups": len(dupes)}

FAQ

Common questions

Why compare by lowercase email?
Email addresses are case-insensitive in practice, but Stripe stores them as typed, so Jane@Shop.com and jane@shop.com appear as two customers. Lowercasing before grouping catches those pairs without false matches on names. That keeps the report accurate and free of noise.
Does it merge or delete customers?
No. It only reports. Stripe does not offer a safe automatic merge, and deleting a customer removes history you may need. The email lists IDs so you can decide which record to keep. Merging is left to you so nothing important disappears.
Will it find duplicates with different email addresses?
No, it groups on email only. A person who signed up with a work and a personal address looks like two customers. If you want matching on name plus postcode or phone, tell your assistant and approve the added rule.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (monthly). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Find duplicate customers in Stripe” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.