> For the complete documentation index, see [llms.txt](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../prevent-bot-purchases-fraudulent-orders-and-unauthorized-checkout-checkout-lock.md).

# Prevent bot purchases, fraudulent orders & unauthorized checkout (Checkout Lock)

**Goal**\
Block **suspicious or unauthorized checkouts** using rules at the **checkout level** (not just at the catalog level).

**When to use this recipe**

* You get many **fake or risky orders**.
* You want only **approved customers** to complete checkout.
* You need extra safeguards for certain products, markets, or IP ranges.

***

#### Step 0 – Before you start

* Make sure **BSS B2B Lock – Checkout lock** is installed and visible in the app navigation.

***

#### Step 1 – Create a checkout lock rule

1. In the app, navigate to **Checkout locks** (or similar menu).
2. Click **Add checkout lock** (or **Add rule** depending on UI).
3. Name the rule:\
   `Block unauthorized checkouts` or `Stop bot/fraud orders`.

You’re now configuring **checkout-level conditions**, not just storefront visibility.

***

#### Step 2 – Define conditions for blocking checkout

Examples of useful patterns:

**A. Only tagged customers can checkout**

* Condition: **If the customer is not tagged with `wholesale` or `approved` → block checkout**.
* Result: Only approved customers can complete orders.

**B. Block specific products from checkout**

* Condition: If the cart **contains specific products/collections** AND customer is not tagged appropriately → block checkout.
* Useful for restricted products or controlled items.

**C. IP / location-based protection**

* Condition: Block checkout from **specific IP ranges** or **restricted countries/regions** if your UI supports this.

For each rule, define:

* When the rule **triggers** (e.g., before payment step).
* What **combination** of conditions means “block this order”.

***

#### Step 3 – Customize the blocked checkout message

When a checkout is blocked, the customer should see a **clear explanation**.

In the rule’s advanced or message settings:

* Headline:
  * “We can’t complete this order”
* Body examples:
  * “This checkout is only available for approved wholesale customers. Please log in with your wholesale account or contact us.”
  * “We’re unable to process orders from your region. If you believe this is a mistake, contact support.”

Include:

* A link to **contact support** or **request approval**.
* Any necessary compliance text (if blocking for legal reasons).

Click **Save**.

***

#### Test your checkout lock

1. Attempt a checkout as a **customer who should be blocked**:
   * Use a test customer or a normal retail profile.
   * Confirm the checkout displays your error message and does not proceed.
2. Attempt a checkout as an **approved customer**:
   * Confirm the order flows normally.

***

#### When to combine with other locks

Checkout Lock works best when combined with:

* **Catalog-level locks** (hide products/collections from the wrong users).
* **Price/visibility rules** (hide prices from guests or unapproved users).
* **Tag-based approval flows** from your B2B apps.

Together, they give you a **full stack** of protection:\
From **who can see what** → to **who can actually place an order**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-shpf.bsscommerce.com/bss-b2b-lock-login-password-hide-price/lock-core-concepts/goal-based-guides-i-want-to.../prevent-bot-purchases-fraudulent-orders-and-unauthorized-checkout-checkout-lock.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
