Block Amazon "Buy for Me" Before Shopify Checkout
If you’re reading this, you’ve probably already seen a few Buy For Me orders come through. They look legitimate at first, then create friction you didn’t sign up for.
The fastest way to deal with that isn’t manual review or cleanup. It’s stopping those orders from being created at all.
Here is the clean way to do it, using Shopify’s own tooling.
Why checkout validation is the best solution
Once a Buy For Me order exists, you’re already doing extra work. You’re reviewing it, deciding what to do, and usually unwinding it.
Blocking at checkout skips all of that. No order record, no payment, no refund, no follow-up.
The Workflow
We’ll create a checkout validation rule that:
- Reads the buyer’s email
- Rejects emails ending in buyforme.amazon
- Shows a clear error
- Stops payment entirely
Step 1: Environment setup
Install:
then log in to Shopify:
shopify auth login
Step 2: Create a private app with Functions
We’ll make a custom app for your store only.
Create it:
shopify app init
Choose:
- “Build an extension-only app”
- Your organization
- “Yes, create it as a new app”
- Enter an app name
Then enter the app directory.
Step 3: Add a checkout validation function
Generate the extension that will run during checkout:
shopify app generate extension
Select:
- “Cart and checkout validation”
- Enter a function name
- “Javascript”
Step 4: Add the code
Now let’s add the email rule code:
Open extensions/FUNCTION_NAME/src/cart_validations_generate_run.js.
Replace the contents with:
export function cartValidationsGenerateRun(input) {
const errors = [];
const email = input.cart?.buyerIdentity?.email?.toLowerCase() ?? "";
if (email.endsWith("buyforme.amazon")) {
errors.push({
message: "Orders cannot be placed using Amazon Buy for Me email addresses",
target: "$.cart.buyerIdentity.email",
});
}
return { operations:
[
{
validationAdd: {
errors
},
},
] };
};
Step 5: Deploy and enable
Deploy the app:
shopify app deploy
Then enable it in admin at Settings → Checkout → Checkout rules
Once enabled, it’s live immediately.
That Amazon Buy for Me orders will now be blocked during checkout.
Heads Up
Proxy orders are only one tactic Amazon uses to screw you.
They also run aggressive product scraping bots. These bots harvest pricing, availability, and metadata continuously. Your data is used against you for Amazon’s benefit.
FraudFighter blocks both of these tactics. Not with alerts or dashboards, but by stopping the behavior outright.
FraudFighter gives you ongoing protection. We actively monitor Amazon’s actions so we can stop their next hostile scheme too.
Try it free for a month by entering your email below. Sign-ups are open for the next two weeks.