<p>There is a first party web hooks plugin available here:</p>
<p><a href="https://plugins.craftcms.com/webhooks" rel="nofollow noreferrer">https://plugins.craftcms.com/webhooks</a>
<a href="https://github.com/craftcms/webhooks" rel="nofollow noreferrer">https://github.com/craftcms/webhooks</a></p>
<p>That may well do what you need, but I have no personal experience of it, and of course any pre-built plugin will have some limitations.</p>
<p>Alternatively, you can write your own module to do this of course (<a href="https://craftcms.com/docs/3.x/extend/module-guide.html" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/extend/module-guide.html</a>)</p>
<p>In essence, in that, you would listen to Commerce events (see <a href="https://craftcms.com/docs/commerce/3.x/extend/events.html" rel="nofollow noreferrer">https://craftcms.com/docs/commerce/3.x/extend/events.html</a> for information on those) - and take whatever action you like when the event is triggered.  Of course you have the full power/scope of PHP to do anything you like at that point.</p>
<p>It's highly likely you'll end up needing at least some custom module code in a typical Commerce project, so this might be a good place to get started!</p>

CC BY-SA 4.0
2021-02-09T04:35:32.220Z
it's just what I was looking for. Thank you!
juanjosezg
CC BY-SA 4.0
2021-01-21T04:33:32.483Z
2021-01-21T04:33:32.483Z
Jeremy Daalder
<p>I am building an online store with craft commerce, but I have a problem, I need to update a remote stock on every purchase, this stock is located in a remote server, do you know if  exist a plugin that makes this task easier for me?</p>
<p>Maybe a plugin that sends a POST API on every purchase or something.</p>

<craft3><plugin-craftcommerce>
Update a remote stock database
# Update a remote stock database

(Asked by: username_0 on 2021-01-21)

I am building an online store with craft commerce, but I have a problem, I need to update a remote stock on every purchase, this stock is located in a remote server, do you know if exist a plugin that makes this task easier for me?

Maybe a plugin that sends a POST API on every purchase or something.

**Tags:** craft3, plugin-craftcommerce


---

## 1 answers

### Answer by username_1 on 2021-01-21. Score: 2 | Accepted answer

There is a first party web hooks plugin available here:

<https://plugins.craftcms.com/webhooks>
<https://github.com/craftcms/webhooks>

That may well do what you need, but I have no personal experience of it, and of course any pre-built plugin will have some limitations.

Alternatively, you can write your own module to do this of course (<https://craftcms.com/docs/3.x/extend/module-guide.html>)

In essence, in that, you would listen to Commerce events (see <https://craftcms.com/docs/commerce/3.x/extend/events.html> for information on those) - and take whatever action you like when the event is triggered. Of course you have the full power/scope of PHP to do anything you like at that point.

It's highly likely you'll end up needing at least some custom module code in a typical Commerce project, so this might be a good place to get started!

> **Comments:**
> **username_0**: it's just what I was looking for. Thank you!  

---

