This document describes the Shopa callback endpoint for creating orders and logging comments as history events.
POST /shopa/callback
Content-Type: application/jsonx-mofavo-api-key: <api key>x-mofavo-signature: <signature>Authorization: Bearer <jwt>Two layers are required:
x-mofavo-api-key.x-mofavo-signature.Authorization: Bearer <jwt>.merchantId and senderId.import { createHmac } from "crypto";
const body = JSON.stringify({
ref: "shopa-1732",
name: "Tedst Test",
phone: "+21690909090",
comments: [
{
content: "First comment",
time: "2026-01-06T11:19:13+01:00",
},
],
});
const apiSecret = process.env.SHOPA_API_SECRET;
const signature = createHmac("sha256", apiSecret)
.update(body, "utf8")
.digest("base64");
console.log(signature);
{
"ref": "shopa-1732",
"name": "Tedst Test",
"phone": "+21690909090",
"comments": [
{
"content": "First comment",
"time": "2026-01-06T11:19:13+01:00"
}
]
}
ref (string, required): External reference for the order.name (string, required): Customer name.phone (string, required): Customer phone number.comments (array, required): List of comments.
content (string, required)time (datetime, required): ISO 8601 timestamp.{
"id": 12345
}
Returned when:
Returned when the API key is not recognized or is inactive.
Returned for unexpected errors.
ref is new.ref, the API does not create a
duplicate order.content and time match.curl -X POST "https://api.mofavo.com/shopa/callback" \
-H "Content-Type: application/json" \
-H "x-mofavo-api-key: $SHOPA_API_KEY" \
-H "x-mofavo-signature: $SHOPA_SIGNATURE" \
-H "Authorization: Bearer $SHOPA_JWT" \
-d '{
"ref": "shopa-1732",
"name": "Tedst Test",
"phone": "+21690909090",
"comments": [
{
"content": "First comment",
"time": "2026-01-06T11:19:13+01:00"
}
]
}'