Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-09T04:35:32.220Z
Answers.Text: it's just what I was looking for. Thank you!
Answers.UserDisplayName: juanjosezg
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-21T04:33:32.483Z
Answers.LastActivityDate: 2021-01-21T04:33:32.483Z
Answers.UserDisplayName: Jeremy Daalder
Body: <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>
  
Tags: <craft3><plugin-craftcommerce>
Title: Update a remote stock database
ThreadText: # 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!  
  
  ---
  
  