Skip to content

prestaalba/ps_webhooks

Repository files navigation

Minimum PHP Version Minimum PrestaShop Compatibility GitHub release

PrestaShop Webhooks

Trigger real-time notifications on PrestaShop events attaching object data in JSON format to the request.

Install

Donwload a zip release and install it like any other module.

Use

Go to the module configuration page in your PrestaShop back office. Create as many webhooks as needed by selecting the PrestaShop action and entity you want to monitor, and defining the target URL. Whenever the event is triggered, the related data will be sent in real time via a POST request, using the following JSON format example:

{
  "action": "update",
  "entity": "Customer",
  "data": {
    "id": 42,
    "id_gender": 1,
    "id_default_group": 3,
    "id_lang": null,
    "company": "Rolige",
    "firstname": "Wilson",
    "lastname": "Alba",
    "email": "wilson@example.com",
    "passwd": "$2y$10$abc123...",
    "birthday": "1990-05-20",
    "newsletter": true,
    "optin": false,
    "active": true,
    "is_guest": false,
    "deleted": false,
    "date_add": "2023-01-15 10:00:00",
    "date_upd": "2025-08-20 05:50:00"
  }
}

If you need to programmatically add or update custom data to the PrestaShop entity before the webhook is sent, you can use the actionObjectWebhookSendBefore hook. The hook is called in the origin file as follows:

Hook::exec('actionObjectWebhookSendBefore', ['object' => $object]);

Contribute

Any contributions are very welcome :)

License

This module is released under an AFL license.

About

PrestaShop webhooks for actions real-time notifications

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages