Apparently by the description of your doubt this is done with a webhook;
What Are Webhooks?
Every time an event happens in your application, it is responsible for how this information is received in real time.
How it works?
In general webhooks will post the data to you (such as JSON, XML or even form data).
The service provider will do the Handling of this information often allowing you to choose how this information is received by your application.
NOTE: nowadays most web frameworks already come with a predefined configuration and will make your work easier(search by echo Standard).
Simple care when using a webhook
Webhooks are responsible for data delivery, in case there is any error in your application this data may be lost.
Learn how to interpret error messages and how your provider handles the responses to each action, so you can tailor your program to handle any application errors.
Keep in mind that a webhook can handle multiple simultaneous requests, make sure your application can support scalability without losing quality.
Good overall that’s it, in case you still have any doubts take a look at this link:
From the description it appears to be webhook.
– Woss