Skip to main content
Cubbo sends an HTTPS POST to your endpoint when something changes on your account. Use webhooks instead of polling list endpoints.

Events

The event name travels in the X-Webhook-Event header. Route on that header, not on the URL. The full payload of each event is in the API reference under Webhooks.
shippingUpdated does not include the Cubbo order id. Correlate it with order_number and store_id.

Set up your endpoint

Your endpoint must use https and a domain name. IP addresses are rejected. Configure it in the Cubbo app: open Integrations, find your Open API integration and click Configure Webhooks. There you turn on the orders, inventory and inventory replenishment webhooks, set their URLs, add custom headers, test the URL and copy the shared secret. See Set up your integration. If your endpoint requires OAuth client credentials, ask your Cubbo contact to configure them. The inventory feed only sends while the orders feed is enabled. The replenishments feed is independent.

Connectivity test

When Cubbo checks your URL it sends this body, without signature headers and without X-Webhook-Event:
Answer 2xx within 10 seconds. Accept this ping even though it is unsigned, or the check fails.

Headers

Static headers configured for your integration are added as well.

Verify the signature

Every event is signed with HMAC-SHA256 using your webhook secret. Verify it before you trust the body.
1

Read the raw body

Use the exact bytes you received. Do not parse and re-serialize the JSON: key order and spacing must match.
2

Build the signed string

Join four values with a literal dot: message ID, isa, exp and the raw body.
3

Compute and compare

Compute the HMAC-SHA256 of that string. Use the secret as a plain UTF-8 string, without decoding it. Compare the lowercase hex digest with X-Cubbo-Hmac-SHA256 in constant time.
4

Check expiration

Reject the request if the current time is past exp. Allow a few seconds of clock skew.
All feeds of one integration use the same secret. When Cubbo renews it, the new secret applies to every delivery from that moment, including retries of older events.

Respond and retry

Answer with any 2xx status as soon as you have stored the event, then process it asynchronously. Slow responses risk a timeout and a retry. Inventory and replenishment events are delivered one at a time per integration, in order. A failing delivery holds back the events behind it until it succeeds or runs out of retries.
Do not answer 400 or 401 while your endpoint is being deployed or misconfigured. Cubbo treats those as final and drops the event. Answer 503 instead so the event is retried.

Handle duplicates

Retries resend the same body, but with a new message ID, isa, exp and signature. Never deduplicate on X-Cubbo-Webhook-Message-Id. Keep processed keys for at least 26 hours, the longest retry window. sequence values grow but can skip numbers, so do not expect them to increase by one.