Skip to main content
This project was created years ago for sneaker botting and is 100% outdated. It serves as an educational reference for understanding Shopify’s checkout flow and automation techniques.

What is Shopify Module?

Shopify Module is a sophisticated Node.js automation script designed to automate the checkout process on Shopify-powered e-commerce websites. Originally built for high-demand product releases (sneakers, limited edition items), it demonstrates advanced techniques for handling modern e-commerce challenges.

Key Features

Product Search

Search products by direct URL or dynamic keywords with support for inclusion/exclusion operators

Variant Selection

Intelligent size and color variant selection with random or specific targeting

Queue Management

Advanced handling of Shopify’s queue system with polling and token-based continuation

Account Authentication

Automated Shopify account login with challenge/captcha detection

Captcha Detection

Built-in detection for reCAPTCHA checkpoints and challenge pages

Proxy Support

Full proxy integration for distributed requests and rate limit bypassing

Card Vaulting

Secure card tokenization via Shopify’s payment gateway

Multiple Variants

Three script versions: Preload, Fast, and Safe for different use cases

Script Variants

The project includes three specialized scripts optimized for different scenarios: The most comprehensive variant with cart preloading capabilities:
Preload.js adds a test product to cart first, generates a checkout session, then swaps to the target product. This technique helps bypass some anti-bot measures.
  • Preloads cart with test product
  • Generates checkout URL before real product drops
  • Dual product search (test + real)
  • Best for high-security sites

fast.js - Speed Optimized

Streamlined checkout flow focusing on speed:
  • Direct product-to-checkout flow
  • Minimal delay between steps
  • Uses Shopify Checkout API (2020-10)
  • Ideal for low-latency scenarios

safe_1.js - Reliability Focused

Most reliable approach using traditional methods:
  • Standard cart/shipping_rates.json endpoints
  • More natural user flow simulation
  • Better for sites with strict bot detection
  • Prioritizes success rate over speed

How It Works

1

Product Discovery

The script searches for products either by direct URL (.js endpoint) or by polling /products.json with keyword matching.
// URL-based search
const product = await request.get({
  url: item.url + '.js'
});

// Keyword-based search
const products = await request.get({
  url: `https://${website}/products.json`
});
2

Variant Selection

Filters available variants and selects based on size/color preferences using smart matching logic.
variants = chosenProduct.variants.filter(
  variant => variant.available
);
3

Add to Cart

Adds the selected variant to cart via /cart/add.js endpoint.
await request.post({
  url: domain + "/cart/add.js",
  form: {
    id: size.id,
    quantity: "1"
  }
});
4

Queue Handling

Detects and processes Shopify’s queue system if the checkout is throttled.
Queue handling is complex and involves polling endpoints, token management, and replay object processing.
5

Checkout Submission

Submits shipping address, selects shipping method, vaults payment card, and completes the order.
6

Order Confirmation

Polls the processing endpoint until redirected to the thank you page or receives an error.

Technical Architecture

Request Handling

Built on request-promise with custom middleware:
const _include_headers = function (body, response, resolveWithFullResponse) {
  return {
    headers: response.headers,
    body: body,
    status: response.statusCode,
    finalUrl: response.request.uri.href
  };
};
Maintains session state across requests:
let cookieJar = request.jar();

User Agent

Simulates Chrome browser:
function getUA() {
  return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36";
}

Common Use Cases

Sneaker Releases

Automate purchasing limited edition sneakers from Shopify stores

Limited Drops

Secure items from high-demand product launches

Restocks

Monitor and auto-checkout restocked items

Testing

Test e-commerce flows and checkout systems

Next Steps

Quick Start

Get up and running with your first automation task

Configuration

Learn about all available configuration options

Advanced Features

Deep dive into queue handling and captcha integration

Troubleshooting

Common issues and solutions
Legal & Ethical Notice: This code is provided for educational purposes only. Automated purchasing may violate website terms of service and could be illegal in some jurisdictions. Use responsibly and at your own risk.

Build docs developers (and LLMs) love