MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
952 stars 280 forks source link

Format of params for webhook.create #118

Closed gregorvand closed 7 years ago

gregorvand commented 7 years ago

I'm a little confused what the format for params should be in this context, since the method already has create, and normally the topic would be something like "customers\/create". Can someone clarify? My app can create webhooks fine (using another package), but using this package I just keep getting a 422 when trying to create.

lpinca commented 7 years ago

When in doubt take a look at the tests :)

https://github.com/MONEI/Shopify-api-node/blob/711fe192f88c103c93e41dc1142b9027c6e558c6/test/webhook.test.js#L87-L88

input.webhook in that test is

{
  topic: 'orders/create',
  address: 'http://whatever.hostname.com/',
  format: 'json'
}
gregorvand commented 7 years ago

got it, thank you!