Polymart is now Voxel Shop! We're upgrading many features of the site, and during this open beta you will experience 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": 1779962014,
"nonce": "akjmLCXcNyWxmXqd",
"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: 3de43e8fd5035a5a9f725582d8deb5b3f472a8f5ac9b7c5ad5e2b7de6bce42f1
Content-Type: application/json
Content-Length: 166
{
"event": "testEvent",
"time": 1779962014,
"nonce": "5DEang7Klk8L5OHI",
"payload": {
"webhook": "https://example.com/polymartWebhook"
}
}
{
"event": "ping",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"webhook": {
"url": ""
}
}
} {
"event": "ping",
"time": 1779962014,
"nonce": "3K_54zFziGWB4bWQ",
"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": 1779962014,
"nonce": "sMigvWDHMZzJuwHH",
"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": 1779958414,
"size": "716624",
"fileType": "jar",
"branch": "snapshot"
},
"update": {
"version": "3.0",
"id": "107",
"time": 1779962014,
"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": 1779962014,
"nonce": "MCxrldms6dhq_s6a",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 150248
}
}
} {
"event": "product.user.purchaseRemoved",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.purchaseRemoved",
"time": 1779962014,
"nonce": "_auFB1aAGLTC6PEX",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 140318
}
}
} {
"event": "product.user.firstDownload",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.firstDownload",
"time": 1779962014,
"nonce": "AOli42JqwfdDUO7j",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 155620
}
}
}