Learn how to integrate Bolt.new AI with WooCommerce in 2025 with simple steps to boost automation, conversions, and store performance.

Book a call with an Expert
Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.
To integrate Bolt.new with WooCommerce, you don’t integrate “Bolt” directly into WooCommerce. Instead, inside bolt.new you run code (usually a small Node.js or Python backend) that talks to WooCommerce using its real REST API. WooCommerce exposes everything through authenticated REST endpoints, and bolt.new is simply your coding workspace where you build the service that calls those endpoints. The real work is: create WooCommerce API keys → store them as environment variables in bolt.new → call WooCommerce REST endpoints → optionally expose your own API routes or a webhook endpoint to receive order events. That’s it. Bolt is just where you scaffold, build, and test the integration.
You integrate WooCommerce by calling its REST API from code running inside bolt.new. WooCommerce exposes endpoints to manage products, orders, customers, and store settings. To access those endpoints, you generate Consumer Key and Consumer Secret in WooCommerce and use them as credentials inside your bolt.new environment.
The following sections explain exactly how to set this up.
These two strings are what your bolt.new code uses to authenticate.
Now your code can safely access WooCommerce via environment variables.
This is a clean, valid, minimal example you can drop directly into a bolt.new project. It fetches products from WooCommerce.
// Example: fetch WooCommerce products inside bolt.new
import fetch from "node-fetch";
const storeUrl = process.env.WOOCOMMERCE_STORE_URL; // e.g. https://mystore.com
const key = process.env.WOOCOMMERCE_KEY; // WooCommerce Consumer Key
const secret = process.env.WOOCOMMERCE_SECRET; // WooCommerce Consumer Secret
export async function getProducts() {
const url = `${storeUrl}/wp-json/wc/v3/products`;
// WooCommerce supports Basic Auth with base64(key:secret)
const auth = Buffer.from(`${key}:${secret}`).toString("base64");
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: `Basic ${auth}`,
"Content-Type": "application/json"
}
});
if (!response.ok) {
throw new Error(`WooCommerce error: ${response.status}`);
}
return await response.json();
}
You can wire this to an API route inside bolt.new:
// api/products.js
import { getProducts } from "../woo.js";
export default async function handler(req, res) {
try {
const data = await getProducts();
res.status(200).json(data);
} catch (err) {
res.status(500).json({ error: err.message });
}
}
Here is a fully valid example of creating an order using WooCommerce REST API.
// Create a WooCommerce order
export async function createOrder(orderData) {
const url = `${storeUrl}/wp-json/wc/v3/orders`;
const auth = Buffer.from(`${key}:${secret}`).toString("base64");
const response = await fetch(url, {
method: "POST",
headers: {
Authorization: `Basic ${auth}`,
"Content-Type": "application/json"
},
body: JSON.stringify(orderData)
});
if (!response.ok) {
throw new Error(`Order creation failed: ${response.status}`);
}
return await response.json();
}
WooCommerce can call your bolt.new backend when events occur, like new orders. In WooCommerce Admin → Settings → Advanced → Webhooks, add a webhook pointing to your bolt.new route (for example https://your-bolt-project/api/webhook).
A minimal webhook handler looks like:
// api/webhook.js
export default async function handler(req, res) {
// WooCommerce sends webhook data as JSON
const body = req.body;
// You should verify webhook signatures if you enable them
console.log("Received WooCommerce webhook:", body);
res.status(200).send("ok");
}
This is the correct, real, production-valid way to integrate bolt.new applications with WooCommerce: create API keys, store them in environment variables, call WooCommerce REST endpoints, and optionally accept webhooks. Nothing magic — just clean, standard API plumbing.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.