Learn how to integrate Bolt.new AI with Worldpay in 2025 using this clear step-by-step guide for smoother payments and smarter automation.

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 Worldpay, you don’t “connect Bolt to Worldpay”. What you actually do is: inside Bolt.new you scaffold a backend (Node/Express or similar), add REST calls to the official Worldpay API (the “Worldpay Online Payments API” or the “Worldpay JSON API”, depending on your account), store your API keys as environment variables in the Bolt.new sandbox, and expose endpoints that your Bolt UI or external systems can call. Bolt is simply the workspace where you write and test the integration; the integration itself is a standard HTTPS API integration using secret keys provided by Worldpay.
You integrate by building code that calls Worldpay's REST endpoints from inside your Bolt.new backend. Worldpay provides endpoints for actions like creating a payment, capturing a payment, refunding, or tokenizing cards. You authenticate using your Service Key (server-side only) and optionally your Client Key (for frontend tokenization if your flow requires it). Bolt.new provides you with a runtime where you store those keys in environment variables and call the external API using fetch or axios.
The steps below describe the only correct way to do this: by calling Worldpay’s documented REST API.
This uses the /orders endpoint from Worldpay’s JSON API. Replace placeholder values with your actual tokens and test card numbers from Worldpay’s docs.
// server.js
// Example Express backend inside Bolt.new
import express from "express";
import fetch from "node-fetch";
const app = express();
app.use(express.json());
app.post("/pay", async (req, res) => {
try {
// Example payload from frontend: amount, currency, token
const { amount, currency, token } = req.body;
const response = await fetch("https://api.worldpay.com/v1/orders", {
method: "POST",
headers: {
"Authorization": process.env.WORLDPAY_SERVICE_KEY, // Service key only on server
"Content-Type": "application/json"
},
body: JSON.stringify({
amount: amount,
currencyCode: currency,
token: token, // This token comes from client-side tokenization
orderType: "ECOM"
})
});
const data = await response.json();
res.json(data);
} catch (err) {
res.status(500).json({ error: err.message });
}
});
app.listen(3000, () => {
console.log("Worldpay integration backend running on port 3000");
});
Worldpay does not allow raw card numbers to touch your backend. The frontend must first request a temporary card token using your Worldpay Client Key. This depends on which product you use:
You then send only the token to your Bolt backend endpoint (/pay).
Worldpay calls your backend via HTTPS webhook to report events like payment captured, payment failed, dispute, etc. In Bolt.new, you add an Express route like /worldpay-webhook and log or process the JSON payload. You configure the webhook URL in the Worldpay Dashboard.
// Example webhook handling
app.post("/worldpay-webhook", async (req, res) => {
// Always verify signature if enabled in your account
console.log("Webhook event:", req.body);
res.status(200).send("ok"); // Worldpay expects 200 OK
});
After validating everything inside Bolt.new, you deploy the backend to your actual environment. You must:
This is the complete, valid, real-world pattern: inside Bolt.new you write and test code that issues HTTPS requests to Worldpay’s official APIs using their documented authentication model. There is no special Bolt‑specific connector — you build a standard REST integration exactly as Worldpay intends.
When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.