Webhook Payload

Tourist
8 0 1

Hi!

 

I am building an app with Node/Koa and React.  I am working on setting up the 3 mandatory webhooks for GDPR requirements.  I know that creating a product is not a required webhook, but I have registered this webhook in my code so that i can test accessing the webhook response.  

 

The webhook registers on install, and logs smoothly when I create a product in my development store.  However when i log "ctx.state.webhook" as below, the only data that logs are the type of webhook (PRODUCTS_CREATE) and the shop origin.  How can I access the data about the product ive created (id, variants, etc.) in the context of this route?

 

  router.post('/webhooks/products/create', webhook, (ctx) => {
    console.log('received webhook: ', ctx.state.webhook);
  });

 

0 Likes
Tourist
8 0 1

Also, how can i return a simple status code 200 response?

0 Likes