With webhooks you can enter a URL of your application that is available to the Internet, to receive notifications regarding status changes of payments and transfers from Pagstar.
Fields with * are required. The others are considered optional.
{"message":"Conta atualizada com sucesso","data": {"notification_url":"https://futurama.com/api/webhook/pagstar","notify_type":2 }}
{"message":"O campo notification url deve começar com um dos seguintes valores: https://"}
Events
All events are sent via a HTTP/HTTPS POST request with the JSON format in the payload.
We recommend for security reasons to only accept notifications from IP 3.128.119.90
Your endpoint must return a success status code in the response, where (2xx) is a valid format, so we will consider it as delivered. Otherwise, we will retry to deliver the notification 2 more times, after which we will no longer attempt to deliver the notification for this event.
A notification that has already been sent can be sent via the panel, or if the settlement bank sends us the approval event again.
The example below is an example of an event payload that we sent.
Payments
Webhook containing information update of a payment transaction
Example of approved payment, using the old format
{"status":"approved","transaction_id":"60a43f10-1703-4f9f-bc86-53ad357e8e32","type":"pay","value":100,"end2end":"Não se aplica","user_id":"0","admin_id":477}
Example of a canceled payment, using the old format
{"status":"canceled","transaction_id":"60a43f10-1703-4f9f-bc86-53ad357e8e32","type":"pay","value":100,"end2end":"Não se aplica","user_id":"0","admin_id":477}