English
English
Appearance
English
English
Appearance
Pawdo can call an endpoint of yours when something happens to your orders, so you do not have to poll.
| Event | Sent when |
|---|---|
order.status_changed | Something about one of your orders changed — see below. |
webhook.ping | You click Send test event in the seller app. |
In the Pawdo seller app, open Integrations → Webhooks and click Add Webhook:
| Field | |
|---|---|
| Endpoint URL | Your URL. It receives POST requests with a JSON body. Use HTTPS. |
| Description | Optional label. |
| Events | Tick order.status_changed. Left empty, the webhook receives every event of the store, event types added later included. Either way, read X-NextFF-Event and ignore the types you do not handle. |
After saving, the app shows the webhook's secret (shpat_…) once. Store it on your server: it signs every delivery. Lost it? Delete the webhook and add a new one.
On the same page, Send test event sends a webhook.ping to your URL, and Delivery Logs list every attempt with your answer's HTTP status and body. A webhook added while API access is not enabled for the store is created inactive.
Every delivery is one POST with the event as the JSON body — no envelope — and these headers:
POST /hooks/pawdo HTTP/1.1
Content-Type: application/json
X-NextFF-Event: order.status_changed
X-NextFF-Delivery: d31fbcfb-0fa8-42d0-b347-76f36ebe9414
X-NextFF-Timestamp: 1794320216
X-NextFF-Signature: sha256=e3beac478f0f6cc276d63a55f93492f49d6d90f1b14a9db06d89a5a995db7088
{"type":"order_update","reference_id":"DOCS-185527-A","order_id":"f4a795d5-8c5b-4c33-a987-b5640f87857b"}| Header | |
|---|---|
X-NextFF-Event | The event type. |
X-NextFF-Delivery | The event id (UUID). The same on every retry of that event: use it to drop duplicates. |
X-NextFF-Timestamp | Unix time, in seconds, when this attempt was signed. |
X-NextFF-Signature | sha256= and the hex HMAC-SHA256 of the body (below). |
X-NextFF-Signature = "sha256=" + hex( HMAC-SHA256( secret, X-NextFF-Timestamp + "." + raw_body ) )raw_body is the body exactly as received, before any JSON parsing: JSON parsed and serialized again may not match byte for byte.Node.js (Express):
const crypto = require("crypto")
app.post("/hooks/pawdo", express.raw({ type: "application/json" }), (req, res) => {
const ts = req.get("X-NextFF-Timestamp") || ""
const sig = req.get("X-NextFF-Signature") || ""
const expected = "sha256=" + crypto.createHmac("sha256", process.env.PAWDO_WEBHOOK_SECRET)
.update(ts + ".").update(req.body).digest("hex")
const ok = sig.length === expected.length && crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected))
if (!ok || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return res.sendStatus(401)
res.sendStatus(200) // answer first …
queue.push(JSON.parse(req.body.toString())) // … then do the work
})Python:
import hashlib, hmac, time
def verify(secret: str, timestamp: str, raw_body: bytes, signature: str) -> bool:
mac = hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest("sha256=" + mac, signature) and abs(time.time() - int(timestamp)) <= 300Go:
func verify(secret, timestamp string, rawBody []byte, signature string) bool {
mac := hmac.New(sha256.New, []byte(secret))
mac.Write([]byte(timestamp + "."))
mac.Write(rawBody)
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
return hmac.Equal([]byte(expected), []byte(signature))
}Check your code against the request above. It was signed with this secret, of a test environment:
| secret | shpat_ltm0rh_UPGso4t7JeCh2PEnZOLgQVXjt7rwjN4p2vck |
X-NextFF-Timestamp | 1794320216 |
| body | {"type":"order_update","reference_id":"DOCS-185527-A","order_id":"f4a795d5-8c5b-4c33-a987-b5640f87857b"} |
X-NextFF-Signature | sha256=e3beac478f0f6cc276d63a55f93492f49d6d90f1b14a9db06d89a5a995db7088 |
(The timestamp check fails on it, of course: it is in the past.)
X-NextFF-Delivery, then read the order with Get one order and store what it says: the event itself does not carry the order's state.order.status_changed Sent for an order of the store — of any source (API, CSV, Shopify…) — when one of these happens:
invalid, exception, unavailable) or its artwork (design_status error, missing, invalid_dim);PATCH /orders/{id}.json changes it without sending it back to validation.It is not sent for every change — not for payment, production progress or delivery, for example — and the body does not carry the order's new state. On each event, read the order with GET /orders/query.json?id=… and store what it says; to see changes the event does not cover, keep reading GET /order.json on a schedule.
The body's type is order_update, the event's older name: branch on the X-NextFF-Event header (order.status_changed), not on type.
{"type":"order_update","reference_id":"DOCS-185527-A","order_id":"f4a795d5-8c5b-4c33-a987-b5640f87857b"}| Field | |
|---|---|
type | Always order_update. |
reference_id | The order's order_number — yours, as sent or imported. |
order_id | Pawdo's order id: read the order with it. |
webhook.ping Sent by Send test event in the seller app, signed like every other delivery:
{
"message": "This is a test webhook delivery",
"type": "webhook.ping"
}If you have any questions about the API, please contact the Pawdo support team via Facebook.