Voxel Shop beta is live. Expect occasional bugs. Learn more
X-Polymart-Webhook-Version: 1
X-Polymart-Signature will be a signature that verifies that the webhook request is in-fact valid. This is a
SHA256 HMAC hash, where the data is the data that was POSTed, and the key is your webhook secret. Your webhook secret generated when you
create a new webhook. YOU MUST VALIDATE THAT THIS IS CORRECT. If you do not, attackers will
easily be able to send random or malicious webhooks to your server
{
"event": "",
"time": "",
"nonce": "",
"payload": {
"": "",
"": "",
"<...>": "<...>"
}
} So, the top-level information might look something like this
{
"event": "product.update",
"time": 1791408010,
"nonce": "0mClOloYolY3xieN",
"payload": "<...>"
} Putting it all together, this is what a full valid request to https://example.com/polymartWebhook might look like, given the webhook secret
POST /polymartWebhook HTTP/1.1
X-Polymart-Webhook-Version: 1
X-Polymart-Signature: c4ece09b3fe25384c7a2dc9251c3b96676ee1f08edab321e8b7b2a697b06eb75
Content-Type: application/json
Content-Length: 166
{
"event": "testEvent",
"time": 1791408010,
"nonce": "R0gTbXooR46zGmuQ",
"payload": {
"webhook": "https://example.com/polymartWebhook"
}
}
{
"event": "ping",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"webhook": {
"url": ""
}
}
} {
"event": "ping",
"time": 1791408010,
"nonce": "Uw8Il33HyHLoWpoW",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"webhook": {
"url": "https://example.com/polymartWebhook"
}
}
} {
"event": "resource.update",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"previous": {
"version": "",
"id": "",
"time": "",
"size": "",
"fileType": "",
"branch": ""
},
"update": {
"version": "",
"id": "",
"time": "",
"size": "",
"fileType": "",
"branch": "",
"title": "",
"description": ""
}
}
} {
"event": "product.update",
"time": 1791408010,
"nonce": "OJyS2V8kP38pQUOz",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"previous": {
"version": "2.19.5",
"id": "91",
"time": 1791404410,
"size": "716624",
"fileType": "jar",
"branch": "snapshot"
},
"update": {
"version": "3.0",
"id": "107",
"time": 1791408010,
"size": "718232",
"fileType": "jar",
"branch": "release",
"title": "Automatic Resource Pack Generation",
"description": "This version adds an automatic resource pack generator to CustomItems!"
}
}
} {
"event": "product.user.purchase",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.purchase",
"time": 1791408010,
"nonce": "DHi1NQDuA3kfHvsv",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 111464
}
}
} {
"event": "product.user.purchaseRemoved",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.purchaseRemoved",
"time": 1791408010,
"nonce": "aHAfWBEGo5EU0xgr",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 54828
}
}
} {
"event": "product.user.firstDownload",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.firstDownload",
"time": 1791408010,
"nonce": "XIRYFWhKnTkUtRoI",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 65072
}
}
}