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": 1780702852,
"nonce": "AKRfkEREoNO-lLqp",
"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: c2e5dcc01290adaa25de86819dbf0217e20bd9af7fee7e2cf8ae877f0c49c3e1
Content-Type: application/json
Content-Length: 166
{
"event": "testEvent",
"time": 1780702852,
"nonce": "wB2CDKy2JLe606lB",
"payload": {
"webhook": "https://example.com/polymartWebhook"
}
}
{
"event": "ping",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"webhook": {
"url": ""
}
}
} {
"event": "ping",
"time": 1780702852,
"nonce": "VMaxGxCTzbJ1vOnH",
"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": 1780702852,
"nonce": "wuA8hdhitZ9-Q1X_",
"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": 1780699252,
"size": "716624",
"fileType": "jar",
"branch": "snapshot"
},
"update": {
"version": "3.0",
"id": "107",
"time": 1780702852,
"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": 1780702852,
"nonce": "FxMs6Hn_66MM6N8o",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 149435
}
}
} {
"event": "product.user.purchaseRemoved",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.purchaseRemoved",
"time": 1780702852,
"nonce": "vJhJM00JxKVK_ba4",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 101202
}
}
} {
"event": "product.user.firstDownload",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.firstDownload",
"time": 1780702852,
"nonce": "JtllJCmKFUEleHlX",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 30919
}
}
}