Webhooks created via API are not triggering

Hi all,

I’m building a custom app for a store and I need to get notifications when there’s a new order. I have done this before, but for some reason when I create a webhook via the API, I don’t receive the notifications.

What I’ve done in a test store:

  • Create an app in settings → Apps & sales channels-> Develop Apps → Create an App.
  • Configured the permissions write_resource_feedbacks, read_resource_feedbacks, read_returns, read_orders
  • Created an API access token.
  • Using the GraphQL API, called the mutation webhookSubscriptionCreate with these variables (I’m using webhook.site for testing):
{
      "topic": "ORDERS_CREATE",
      "webhookSubscription": {
        "callbackUrl": "https://webhook.site/xxxxxxxxxxxxxxx",
        "format": "JSON"
      }
    }
  • Go to the test store and place a purchase using the bogus gateway.

I’m expect to see the webhook call, but it never arrives.
If I manually create the webhook in Settings → Notifications → Webhooks, I do receive the webhooks.

I’m wondering if I’m doing something wrong or if the API tokens created by custom apps have slightly different behaviour that tokens generated in other ways.

Bumping this as it was waiting for moderator approval for a week.