skip to Main Content

I have set Webhook notification on Shopify platform when a new order is placed. I send the data to the URL of a PHP app I am currently working on and I want to print the incoming data in real-time on my browser. It is the first time I am working with Webhooks so any advice will be helpful. Thank you!

2

Answers


  1. Consider using Request Bin, Webhook Site or Ngrok

    All these tools allow you to generate a unique end point and see webhooks recieved in real time.
    However there are several benefits of using Ngrok opposed to online tools. It runs locally and allows you to forward data to your local application. So Ngrok will allow you to see webhooks data on local web page and you can also send the same data to your local PHP application simultaneously.

    Ngrok Documentation

    Login or Signup to reply.
  2. if you still need help with this:
    on the file you have set your webhook on use the following code to catch any incoming posts, you can print them or trigger them into your terminal.

    $json = file_get_contents('php://input');
    $data = json_decode($json,1);
    

    i hope this helps you!
    Good day!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search