Help Center

Web Hooks

Chris Muench
Chris Muench

PHP Point Of Sale can interact with other applications via webhooks. Webhook requests are configured in store config. We have web hooks available for many actions such as creating a customer.

Once you configure a URL in store config for a web hook. An http request is sent with all the data that was just created in the POS. Here is an example way to parse the web hook request

 

<?php
$jsonStr = file_get_contents("php://input");
$json = json_decode($jsonStr);
?>

Was this article helpful?

2 out of 3 found this helpful

Have more questions? Submit a request

Comments

7 comments

  • Comment author
    Jeff
    • Edited

    Are there any plans to add a security token on the web hooks?

    It would be nice to have the peace of mind knowing that any updates to our transactions, customers etc. are valid updates and not a potential vulnerability.

    I have some ideas on how to harden the security on my own, but an SHA256 hashed body payload matched to a secret unique user key would be nice too :)

    1
  • Comment author
    Chris Muench

    No plans as of now, but I will put in feature requests 

    0
  • Comment author
    Greg

    Is there a web hook for sale edit?

    0
  • Comment author
    Chris Muench

    At this time we just have new_sale. I will put this on our roadmap for 17.2

    0
  • Comment author
    Greg

    Thank you Chirs! A modified date would also be helpful when editing sales.

    0
  • Comment author
    Cameron Dixon

    I love this idea of web hooks and am slowly trying to figure out how to successfully utilize it with our scheduling program. Is there a decent tutorial out there that you would recommend that will show me how to get this operable? I consider myself a decent hobbyist to low intermediate coder who likes to learn so it would be fantastic if you could lead me in the right direction or were planning on creating a quick tutorial video about how web hooks can be used with PHPPos.

    0
  • Comment author
    Chris Muench

    Webhooks are called when an event takes place in the system such as adding a new customer.

    data is immediately sent to the url you specify and you can decide what to do with data

    0

Please sign in to leave a comment.