Build Your First Remote Plugin
Step-by-step guide to creating your first ThreeU plugin.
Step 1: Create Developer Account
Apply at developer.threeu.app. Once approved, activate via the invitation email.
Step 2: Create the Project
A plugin is a service you host. Start a Node project and install the SDK (the CLI has no generator today):
Setup
Shell
mkdir fastship && cd fastship
npm init -y
npm install threeu-sdk expressStep 3: Define Manifest
Edit threeu.config.ts:
threeu.config.ts
TypeScript
import { definePlugin } from "threeu-sdk/plugin";
export default definePlugin({
name: "FastShip",
slug: "fastship",
type: "plugin",
category: "shipping",
permissions: ["orders:read", "shipping:write"],
provider: {
type: "remote_http",
baseUrl: "https://api.fastship.com/threeu",
actions: {
"shipping.get_rates": { method: "POST", path: "/rates" },
"shipping.create_shipment": { method: "POST", path: "/shipments" }
}
}
});Step 4: Implement /health
Every plugin needs a health endpoint:
Health Endpoint
TypeScript
const express = require("express");
const app = express();
app.get("/health", (req, res) => {
res.json({ status: "ok", version: "1.0.0",
timestamp: new Date().toISOString() });
});
app.listen(3000);Step 5: Implement Action
Add the action endpoint:
Action Endpoint
TypeScript
app.post("/rates", (req, res) => {
verifySignature(req, process.env.WEBHOOK_SECRET);
const { order, destination } = req.body;
res.json({
success: true,
rates: [
{ service: "standard", price: 15, currency: "QAR", estimated_days: 5 },
{ service: "express", price: 35, currency: "QAR", estimated_days: 2 }
]
});
});Step 6: Configure & Test
Log into developer.threeu.app, paste your manifest JSON in the Integration tab, test health check, trigger a gateway action, and inspect logs.
Step 7: Submit for Review
Click "Submit for Review" when your plugin is ready. ThreeU reviews for security, reliability, and quality.