How to Block Customer Account

Topic summary

  • Problem: A store owner wants to block a specific customer who previously placed a fraudulent order and now generates hundreds of abandoned carts daily.
  • Impact: The volume of abandoned checkouts clutters their view, making it difficult to identify genuine abandoned carts from other customers.
  • Request: Seeks a code-based method to block this customer account to stop further abandoned cart activity.
  • Status: No solution or actions reported; the question remains open with no confirmed approach shared.
Summarized with AI on January 7. AI used: gpt-5.

I want to block a customer who has hundreds of abandoned carts. This customer also placed a fraudulent order. There has not been another fraudulent order from this customer, but hundreds of abandoned checkouts, daily, to where I’m not able to see the real customer abandonded checkouts.
Is there a way to do it with code?

What have you done for research? There are extensive topics on this.

Shopify doesn’t have a direct “block customer” feature that stops someone from interacting with your store entirely, especially if they’re checking out as a guest.

For the fraudulent order, you can disable their customer account in the admin, which prevents them from logging in, but they can still place orders as a guest. To effectively block repeat offenders and manage the abandoned cart spam, your best bet is usually a robust fraud prevention app from the Shopify App Store. These apps can blacklist emails, IP addresses, and often integrate with your checkout process to prevent suspicious orders or flag them for review before they’re processed. Many can also help identify bot-like activity that might be generating those abandoned carts.

Regarding code, if you’re on Shopify Plus, you could potentially use Shopify Functions to block specific customers or email addresses during checkout. For standard Shopify plans, you could try to add some Liquid to your cart.liquid or checkout.liquid (if you have access) to redirect or show an error message based on customer.email or client.ip, but this is often circumvented by guest checkouts and won’t stop the abandoned carts from showing up if they’re hitting the checkout page before your code runs. If the abandoned carts are from a bot, blocking the IP at your CDN or firewall level might help, but that’s a more technical and less precise solution than a dedicated app.

The apps are generally the most reliable way to handle this kind of issue systematically.

P.S. I’m building a gamified discount app called Game Gophers. Looking for beta testers if you’re interested.

Thanks for the reply. I cannot disable the customer account - I guess the new customer account management from Shopify doesn’t allow it.
Yes, I looked at multiple apps, and most handled preventing fraudulent orders. The issue is more from the abandoned checkouts now.

Thanks.

Hi @c3idesign

Yes, you can block a specific customer from creating checkouts in Shopify using Liquid + Shopify Scripts or an app. Native Shopify doesn’t let you block checkouts by customer email automatically, but here’s what you can do:

  1. Use Shopify Flow (if on Shopify Plus):

    • Trigger: Checkout created

    • Condition: Customer email = fraudulent email

    • Action: Cancel checkout or send alert

  2. Use a third-party app:

    • Apps like Fraud Filter let you block specific emails, IPs, or patterns from completing checkouts.
  3. Custom code workaround (non-Plus):

    • In theme’s checkout.liquid, you could check customer.email and redirect/block if it matches the banned email.

    • Only works if the customer is logged in; abandoned guest checkouts may still appear.

Yes, this is possible, but Shopify doesn’t provide a built-in way to “block” a customer from creating abandoned checkouts. You can, however, mitigate the issue programmatically. Here’s the best approach:


Best Solution Approach

You can do this with a Shopify app / private app using the Admin API + Liquid / Webhooks.

1. Identify the customer

  • Use the customer’s email, ID, or phone.

  • Example: fraudster@example.com


2. Block new checkouts (via code)

Shopify does not let you block checkout creation directly, but you can:

Option A — Hide the “Buy” button for that customer (Front-end)

In your theme’s product.liquid or product-template.liquid:

{% if customer and customer.email == "fraudster@example.com" %}
  <style>
    .product-form__submit { display: none !important; }
    .fraud-warning { display: block; color: red; margin-top: 10px; }
  </style>
  <div class="fraud-warning">
    You are not allowed to place orders on this store.
  </div>
{% endif %}

:white_check_mark: Pros: Stops them from creating new checkouts on the storefront.
:cross_mark: Cons: Only works for logged-in customers.


Option B — Cancel checkouts via Webhook (Back-end)

  1. Subscribe to Checkout Create webhook:
POST /admin/api/2026-01/webhooks.json
{
  "webhook": {
    "topic": "checkouts/create",
    "address": "https://your-server.com/webhooks/checkout",
    "format": "json"
  }
}

  1. When a checkout is created, check the email or customer ID.

  2. If it matches the fraudulent customer, cancel it immediately:

// Example pseudo-code
if(checkout.email === "fraudster@example.com") {
   Shopify.Checkout.cancel(checkout.id)
}

:white_check_mark: Pros: Works for everyone (even guests)
:white_check_mark: You can filter out hundreds of abandoned checkouts automatically
:cross_mark: Cons: Requires a private app or custom backend


Option C — Tag & filter

If you cannot block entirely, at least tag the customer as fraud and exclude them from abandoned checkout reports:

  • Go to Customers → Edit customer → Add tag fraud

  • In reports or apps, filter exclude fraud tag

This doesn’t stop abandoned checkouts, but makes reporting manageable.


Recommended Strategy

  1. Tag the customer as fraud

  2. Hide “Add to Cart” button if logged in (Option A)

  3. Use a webhook or app to cancel new checkouts (Option B)

This combination prevents new orders, keeps reports clean, and avoids being spammed by abandoned checkouts.