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": 1794832674,
"nonce": "L-MCtMbaLkTM0Nk3",
"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: 7a10cde2b252f627a64410bc722554aae587cbc92a69a27ba680b8388bb4f8a0
Content-Type: application/json
Content-Length: 166
{
"event": "testEvent",
"time": 1794832674,
"nonce": "jnrlrExaxIEQJ6la",
"payload": {
"webhook": "https://example.com/polymartWebhook"
}
}
{
"event": "ping",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"webhook": {
"url": ""
}
}
} {
"event": "ping",
"time": 1794832674,
"nonce": "5Io6u1d08iPPuqEJ",
"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": 1794832674,
"nonce": "1VBy95YuWAJEbfzE",
"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": 1794829074,
"size": "716624",
"fileType": "jar",
"branch": "snapshot"
},
"update": {
"version": "3.0",
"id": "107",
"time": 1794832674,
"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": 1794832674,
"nonce": "zzgkz1MSMJ3o4CGt",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 174809
}
}
} {
"event": "product.user.purchaseRemoved",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.purchaseRemoved",
"time": 1794832674,
"nonce": "rfZV1-2wsJFIzZ7A",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 161511
}
}
} {
"event": "product.user.firstDownload",
"time": "",
"nonce": "",
"payload": {
"product": {
"id": "",
"title": "",
"subtitle": "",
"url": ""
},
"user": {
"id": ""
}
}
} {
"event": "product.user.firstDownload",
"time": 1794832674,
"nonce": "Rd8jbiomzUTyb4pN",
"payload": {
"product": {
"id": "1",
"title": "CustomItems",
"subtitle": "Design new Custom items and blocks!",
"url": "https://voxel.shop/resource/1"
},
"user": {
"id": 84467
}
}
}