{% extends 'Layouts/Doc/default.html.twig' %} {% block title %}{{ 'app.documentation.menu.webhook.overview'|trans }}{% endblock %} {% block headerPageTitle %}WEBHOOK {{ 'app.documentation.menu.webhook.overview'|trans|upper }}{% endblock %} {% block body %}
Listen for events on your Popina Order account so your integration can automatically trigger reactions.
Popina Order uses webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like when a customer’s bank confirms a payment, a customer disputes a charge, a recurring payment succeeds, or when order's state changes.
Let’s say you’ve registered to receive the order.payed event and a customer clicks the “Pay” button in your app or website. A webhook between Popina Order and your app tells your app whether the customer’s payment is successful or not. After your webhook endpoint receives the order.payed event, your webhook function can then run backend actions to fulfill an order–such as calling your kitchen's interface APIs to inform your staff. Using an API for this workflow is like calling the API every millisecond to ask, was the payment successful?
A webhook enables Popina Order to push real-time notifications to your app. Popina Order uses HTTPS to send these notifications to your app as a JSON payload. You can then use these notifications to execute actions in your backend systems. To learn more, see POPINA ORDER Order events and POPINA ORDER Sync events.
You can start receiving event notifications in your app using the steps in this section:
Popina Order webhooks have built-in retry methods for 3xx, 4xx, or 5xx response status codes.
If Popina Order doesn’t quickly receive a 2xx response status code for an event (after the configured retries number), we mark the event as failed and stop trying to send it to your endpoint. After multiple days, we email you about the misconfigured endpoint, and automatically disable it soon after if you haven’t addressed it.
In order to configure your app's endpoint and the retries, you must contact Popina Order support team.
Popina Order can attempt reties attempts up to 3 times.