# Checkout Load Tester & WAF Bypass (`zackmiel/checkout-load-tester`) Actor

A powerful load testing tool for e-commerce checkouts. Uses Playwright and residential proxies to solve Cloudflare Turnstile and bypass WAFs, simulating real human orders at scale. Perfect for stress-testing custom headless storefronts and APIs before major traffic surges.

- **URL**: https://apify.com/zackmiel/checkout-load-tester.md
- **Developed by:** [Zack Miel](https://apify.com/zackmiel) (community)
- **Categories:**
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Checkout Load Tester & WAF Bypass

A robust, Playwright-powered synthetic load testing tool designed for modern e-commerce storefronts. This Actor simulates real human checkout flows, effortlessly bypasses advanced Web Application Firewalls (like Cloudflare Turnstile), and scales horizontally to stress-test your backend under heavy traffic.

Whether you are preparing for a massive holiday sale or validating anti-bot protections on a custom headless storefront, this tool delivers authentic, distributed checkout requests at scale.

### Key Features

- **WAF & Turnstile Bypass:** Launches real headless Chromium browsers to natively execute JavaScript and solve Cloudflare Turnstile challenges before submitting checkout payloads.
- **Residential Proxy Integration:** Rotates unique residential IPs for every single order batch, bypassing network-level rate limits (HTTP 429) and session-linking throttles.
- **Dynamic Payload Interception:** Automatically scans your product page, submits the cart form, and intercepts the baseline checkout JSON template—no manual header configuration required.
- **Custom or Synthetic Data:** Upload your own JSON/CSV of customer details, or let the Actor automatically generate thousands of unique synthetic identities (names, addresses, emails) using Faker.js.
- **Custom Concurrency:** Control the exact flow of traffic to avoid accidentally DDoSing your own database.

### How It Works

1. **Session Acquisition:** The Actor visits your target product URL, fills out the visible forms, and intercepts the exact POST payload your frontend sends to your backend.
2. **Identity Generation:** It merges this intercepted template with either your uploaded custom data or auto-generated fake customer profiles.
3. **Distributed Execution:** The script boots up isolated Playwright browser contexts routed through residential proxies.
4. **Security Clearance:** It waits for anti-bot tokens (e.g., `cf-turnstile-response`) to attach to the DOM, injects them into the payload, and fires the POST request directly to your checkout API.

### Input Configuration

| Field | Type | Description |
| :--- | :--- | :--- |
| **Product page URL** | `string` | The storefront URL (e.g., a specific product page) where the active checkout/cart form exists. |
| **Checkout endpoint** | `string` | The backend API URL that receives the final POST request (e.g., `https://api.yourstore.com/checkout`). |
| **Load test token** | `string` | (Optional) A secret key injected as `X-Load-Test-Key` into the headers, allowing your backend to identify and authorize test traffic. |
| **Custom payload file** | `file` | (Optional) A JSON or CSV file containing custom customer data to override the generated payloads. |
| **Order count** | `integer` | Total number of synthetic orders to generate (ignored if using a custom payload file). |
| **Concurrency limit** | `integer` | Maximum number of simultaneous checkout requests to process at once. |
| **Proxy configuration** | `object` | Select Apify Residential Proxies to ensure every request comes from a fresh, human-like IP address. |

#### Note on Custom Payload Files

If you upload a custom JSON file, **do not** include security tokens like `session_id`, `turnstile_token`, or `cf-turnstile-response` in your file. The Actor must dynamically extract fresh tokens from the live browser session. Including hardcoded tokens in your JSON will overwrite the fresh ones and result in WAF blocks.

### Output Structure

The Actor pushes the result of every individual checkout attempt to the default dataset.

````json
{
  "payloadSent": {
    "customer": {
      "firstName": "John",
      "lastName": "Doe",
      "email": "johndoe@example.com"
    },
    "turnstile_token": "0.45789aBcDeF...",
    "order_lines": [
      {
        "quantity": 1,
        "product_variant": "956648a2-2a6a-4c13-9f3b-1be9ab9b4f8d"
      }
    ]
  },
  "statusCode": 201,
  "responseTimeMs": 1420,
  "attempts": 1
}

# Actor input Schema

## `targetUrl` (type: `string`):

The storefront product page whose active form will be scanned.
## `checkoutEndpoint` (type: `string`):

The backend HTTP endpoint that will receive synthetic POST payloads.
## `loadTestToken` (type: `string`):

Optional secret sent as X-Load-Test-Key for authorized load-testing traffic.
## `payloadFile` (type: `string`):

Optional: Upload a JSON or CSV file containing your custom order payloads.
## `orderCount` (type: `integer`):

Total number of synthetic orders to send.
## `concurrencyLimit` (type: `integer`):

Maximum simultaneous checkout requests.
## `proxyConfiguration` (type: `object`):

Select residential proxies to bypass rate limits.

## Actor input object example

```json
{
  "orderCount": 10,
  "concurrencyLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing the payload, HTTP status, and response time for each request.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zackmiel/checkout-load-tester").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "proxyConfiguration": { "useApifyProxy": True } }

# Run the Actor and wait for it to finish
run = client.actor("zackmiel/checkout-load-tester").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zackmiel/checkout-load-tester --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zackmiel/checkout-load-tester"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/tqI82lXeAb86xfEZ7/builds/6GFBjn8DdX60nK2P0/openapi.json
