GoFlow Integration Docs
Connect your online store to GoFlow so new orders come in automatically. When a customer buys, the order appears in GoFlow. We ship it. Your customer gets a tracking code.
How It Works
GoFlow uses a webhook model. Your store sends an HTTP POST to our endpoint when an order is placed. We validate it, create the order, and return a tracking code.
Customer places an order on your store
Your platform fires a webhook on new order creation.
Your store sends a signed POST to GoFlow
The payload contains customer and shipping details, signed with your API secret.
GoFlow creates the order and returns a code
We assign a GoFlow order code (e.g. GF-4821) and return it in the response.
Your customer tracks the delivery
Share the GoFlow code. They can track at /track or ask on WhatsApp.
Endpoint
POST https://zudjllgouthpgoljklqk.supabase.co/functions/v1/woocommerce-webhook Content-Type: application/json X-GoFlow-Signature: <hmac-sha256-hex>
Authentication
Every request must include a valid HMAC-SHA256 signature in the X-GoFlow-Signature header. This tells us the request came from your store and has not been tampered with.
Signing a Request
async function signPayload(body, secret) { const key = await crypto.subtle.importKey( 'raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'] ); const sig = await crypto.subtle.sign('HMAC', key, new TextEncoder().encode(body)); return Array.from(new Uint8Array(sig)).map(b => b.toString(16).padStart(2,'0')).join(''); }
$signature = hash_hmac('sha256', $body, $api_secret);
Payload Format
All platforms send the same JSON structure to GoFlow.
{
"event": "order.created",
"order_id": "12345",
"customer": {
"name": "Adaeze Okonkwo",
"phone": "08012345678",
"email": "adaeze@example.com"
},
"shipping": {
"address_1": "45 Adeola Odeku",
"city": "Lagos",
"state": "Lagos",
"country": "NG",
"shipping_fee": 3500
},
"notes": "Call before delivery"
}Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
| event | string | Required | Must be order.created |
| order_id | string | Required | Your platform's order ID |
| customer.name | string | Required | Recipient's full name |
| customer.phone | string | Required | Recipient's phone number |
| shipping.state | string | Required | Nigerian state name |
| shipping.address_1 | string | Required | Street address |
| shipping.shipping_fee | number | Optional | Fee in Naira |
| notes | string | Optional | Delivery notes |
Response
// 201 Created { "success": true, "order_code": "GF-4821" } // 401 Unauthorized "Unauthorized"
WooCommerce
Install the GoFlow Delivery plugin on your WordPress site. Customers select their Lagos zone or interstate state at checkout, the fee calculates live, and every new order is sent to GoFlow automatically.
What it does
| Feature | Detail |
|---|---|
| Lagos delivery | 29 zones with smart city autocomplete — customer types a street or area and the correct zone resolves automatically |
| Interstate delivery | All 36 states + FCT with Park Pickup (default) and Home Delivery options |
| Checkout types | Works with Classic Checkout (shortcode) and Blocks Checkout |
| Order sync | Each order is sent to GoFlow automatically on placement, with 5-attempt retry queue |
| Tracking | GoFlow Tracking ID shown on Thank You page, My Account, and order emails |
| Status sync | GoFlow pushes status updates back into WooCommerce (Picked Up, In Transit, Delivered, etc.) |
| Sandbox mode | Test the full checkout flow without sending live orders to GoFlow |
Installation
Download and upload the plugin
Download goflow-woocommerce.zip above, then go to Plugins → Add New → Upload Plugin and install it.
Activate and add to a shipping zone
Activate the plugin, then go to WooCommerce → Settings → Shipping → [Your Zone] and add GoFlow Delivery as a shipping method.
Enter your credentials
Go to WooCommerce → GoFlow Delivery → API & Settings. Fill in your Webhook URL, API Key, Webhook Secret, and pickup address.
Share your inbound webhook URL
Copy the Inbound Status Webhook URL shown on the settings page and send it to GoFlow so delivery status updates flow back into your orders.
Disable sandbox and go live
Place a test order first with Sandbox Mode ON. Once confirmed, uncheck sandbox and you are live.
Required Settings
| Field | Where to get it |
|---|---|
| Webhook URL | Provided by GoFlow β request yours |
| API Key | Provided by GoFlow alongside the webhook URL |
| Webhook Secret | A shared secret you choose β tell GoFlow the same value |
| Tracking URL Base | https://goflowlogistics.netlify.app/track |
| Pickup Address | Your warehouse or store address where GoFlow collects orders |
Shopify
There is no native Shopify app yet. You can connect Shopify to GoFlow using a small middleware script deployed to any free Node.js host like Vercel, Railway, or Render.
Shopify Webhook Setup
Deploy the middleware script
Push to Vercel or Railway. Set GOFLOW_SECRET and SHOPIFY_SECRET as environment variables.
Go to Shopify Admin β Settings β Notifications
Scroll to the Webhooks section at the bottom.
Create a webhook
Event: Order creation. Format: JSON. URL: your middleware URL.
Test with a real order
Place a test order. Check your GoFlow admin β the order should appear within seconds.
Custom Website
If you have a custom-built site or backend, send orders directly to GoFlow from your server. Sign the payload with your API secret and POST to our endpoint.
Node.js
const crypto = require('crypto'); async function sendToGoFlow(order) { const payload = { event: 'order.created', order_id: String(order.id), customer: { name: order.name, phone: order.phone, email: order.email }, shipping: { address_1: order.address, city: order.city, state: order.state, country: 'NG', shipping_fee: order.fee }, notes: order.notes || '' }; const body = JSON.stringify(payload); const sig = crypto.createHmac('sha256', process.env.GOFLOW_SECRET).update(body).digest('hex'); const res = await fetch('https://zudjllgouthpgoljklqk.supabase.co/functions/v1/woocommerce-webhook', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-GoFlow-Signature': sig }, body }); return res.json(); // { success: true, order_code: 'GF-4821' } }
PHP
$body = json_encode($payload); $signature = hash_hmac('sha256', $body, getenv('GOFLOW_SECRET')); $ch = curl_init('https://zudjllgouthpgoljklqk.supabase.co/functions/v1/woocommerce-webhook'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => $body, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'X-GoFlow-Signature: '.$signature] ]); $result = json_decode(curl_exec($ch), true);
Nigerian States Reference
Use these exact state names in the shipping.state field.
| State | Zone | Delivery Time | From Price |
|---|---|---|---|
| Lagos | Same Day | Same day | β¦2,000 |
| Ogun / Oyo / Osun / Ondo / Ekiti / Kwara | South West | 1 working day | β¦3,500 |
| FCT Abuja / Rivers / Kano / Enugu + all others | Nationwide | 2β3 working days | β¦5,000 |
Error Codes
| HTTP Status | Body | Meaning |
|---|---|---|
| 201 Created | {"success":true,"order_code":"GF-XXXX"} | Order created successfully |
| 200 OK | {"received":true} | Event ignored (not order.created) |
| 401 Unauthorized | Unauthorized | Signature mismatch β check your secret |
| 405 Method Not Allowed | Method not allowed | Only POST accepted |
| 500 Server Error | Error message | Contact us |
JSON.stringify(payload) once and reuse that exact string for both signing and sending.Get Your API Key
API keys are free. We issue them to verified businesses and developers within 24 hours of request.
GoFlow