{% 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 %}

Use incoming webhooks to get real-time updates

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.

Logo

Why use webhooks

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?

How Popina Order uses webhooks

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.

webhook-schema

Steps to receive webhooks

You can start receiving event notifications in your app using the steps in this section:

  1. Identify the events you want to monitor and the event payloads to parse.
  2. Create a webhook endpoint as an HTTP endpoint (URL) on your local server.
  3. Handle POST requests from Popina Order by parsing each event object and returning 2xx response status codes.
  4. Test that your webhook endpoint is working properly.
  5. Deploy your webhook endpoint so it’s a publicly accessible HTTPS URL.
  6. Register your publicly accessible HTTPS URL in the Popina Order dashboard.

Built-in retries

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.

Popina Order webhooks configuration

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.

{% endblock %}