With INFINARIO webhooks you can notify arbitrary HTTP-based service from a scenario with custom data. Webhook is a simple HTTP POST request sent from INFINARIO web application to a custom endpoint containing a list (array) of all targeted players and custom data specified in the webhook.
The customers array contains all targeted players. Webhooks targeted at more than 1000 players are split into multiple requests with same custom data and customers array containing up to 1000 players.
Proper response must be sent back to the INFINARIO web application for webhook to work correctly. In case the endpoint answers in incorrect format or doesn’t answer at all, the webhook tries to send the request again with exponential backoff. Proper answer is a JSON with following structure with HTTP status code 200.
Sample endpoint implementation in PHP
For easier integration of INFINARIO webhooks into your application, we provide you with the simplest implementation of the endpoint. The following code sample receives and decodes webhook data and responds with properly formatted response.