Topics covering webhook creation & management, event handling, Pub/Sub, and Eventbridge, in Shopify apps.
Hello,
I'm using Koa-shopify-webhook to register and recieve webhook. I did:
const customersWebhookRegistration = await registerWebhook({ address: `${HOST}/webhooks/customers/create`, topic: 'CUSTOMERS_CREATE', accessToken, shop, }); if (customersWebhookRegistration.success) { console.log('Successfully registered customers webhook!'); } else { console.log('Failed to register customers webhook', customersWebhookRegistration.result); }
const webhook = receiveWebhook({ secret: SHOPIFY_API_SECRET_KEY }); router.post('/webhooks/customers/create', webhook, (ctx) => { console.log('received webhook: ', ctx.state.webhook);
Solved! Go to the solution
This is an accepted solution.
Okay, i've tried to ouput ctx.response
status: 202, message: 'Accepted', header: [Object: null prototype] {}, body: undefined
But body is undefined here. Why?
This is an accepted solution.
hey @davydovct,
webhook content you can find in
ctx.request.body