Receive a webhook notification
Once a webhook has been configured, ProAbono will send an HTTP POST request to the specified URL each time one of the events associated with the webhook occurs.
Each POST request contains JSON data describing the event which occurred.
Reply to a webhook notification
Your application must reply with a 200 OK response.
Any response outside the 200 range will indicate to ProAbono that you did not receive the webhook notification.
ProAbono will send the notification several times hoping to get a 200 OK response.
Verify that a webhook comes from ProAbono
Webhook notifications sent by ProAbono can be verified by calculating a digital signature.
In the headers of the HTTP POST received by your application, you can find :
- x-proabono-key (This key is unique to each webhook notification)
Verification method :
- concatenate x-proabono-key and the Business Key1
- Hash it (avec SHA-256)
- Encode the hash (base64).
If the result is identical to x-proabono-signature, the notification comes from ProAbono.
PHP Sample which check the notification comes from ProAbono or not
1 To retrieve the business key, go to the ProAbono backoffice. Then click, on the top right, on your profile > Integration > Webhooks tab.