HioBuy Webhooks Demo
Receive, verify and handle HioBuy fulfillment events in a real application.
⚡ Real-time Events
Send a test event from HioBuy Developer Portal and inspect the result here.
No events yet.
Get Started in 5 Minutes
1
Copy the webhook endpoint
Paste this demo URL into HioBuy Developer Portal.
2
Open HioBuy Developer Portal
Webhooks → Add endpoint, then subscribe to events.
3
Store the signing secret
Set HIOBUY_WEBHOOK_SECRET on the server only.
4
Send a test event
Use Send test in the portal (livemode: false).
5
Inspect the result
This dashboard polls /api/events every few seconds.
Verify SignatureTypeScript
import crypto from "node:crypto";
const TOLERANCE_SEC = 300;
export function verifyHioBuyWebhook({
rawBody,
signature,
secret,
}: {
rawBody: string;
signature: string | null;
secret: string;
}) {
const match = /^t=(\d+),v1=([0-9a-f]+)$/i.exec(signature || "");
if (!match) return false;
const timestamp = Number(match[1]);
const expected = match[2].toLowerCase();
if (!Number.isFinite(timestamp)) return false;
const now = Math.floor(Date.now() / 1000);
if (Math.abs(now - timestamp) > TOLERANCE_SEC) return false;
const signedPayload = `${timestamp}.${rawBody}`;
const digest = crypto
.createHmac("sha256", secret)
.update(signedPayload, "utf8")
.digest("hex");
const a = Buffer.from(digest, "utf8");
const b = Buffer.from(expected, "utf8");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}Learn More
Event TypesFrom HioBuy docs
procurement.failed
Warehouse procurement failed.
Procurement
handleProcurementFailed()
procurement.out_of_stock
SKU unavailable during procurement.
Procurement
handleProcurementOutOfStock()
package.received
Package received at HioBuy warehouse.
Warehouse
handlePackageReceived()
package.exception
Inbound package exception reported.
Warehouse
handlePackageException()
consolidation.completed
Packages consolidated for outbound.
Consolidation
handleConsolidationCompleted()
shipment.created
International shipment created.
Shipping
handleShipmentCreated()
shipment.ready_for_payment
Packing finished; international shipping payment is available.
Shipping
handleShipmentReadyForPayment()
shipment.dispatched
Shipment handed to the carrier.
Shipping
handleShipmentDispatched()
shipment.delivered
Shipment delivered to the recipient.
Shipping
handleShipmentDelivered()
shipment.exception
Outbound shipment exception reported.
Shipping
handleShipmentException()
balance.low
Warehouse wallet is below the configured threshold.
Account
handleBalanceLow()