ORDER_CREATED webhook is not triggered by Shopify

Sanchari
Shopify Partner
6 0 2

I have created custom app with all privacy webhooks and order_created webhook. 

Shopify is not triggering the order_created webhook when a order is placed.

I have checked the webhook handler code by triggering them via CLI. The code is working fine. 

I have checked that all the webhooks are subscribed at the time of app installation.

The URL endpoint is also a stable HTTPS link with valid SSL certificate.

I have checked the webhook log in Shopify Partner Dashboard. There is show no webhook delivered.

 

Can anyone help me to fix the issue?

Replies 3 (3)

Samia_Akram22
Shopify Partner
60 9 13

@Sanchari 

Certainly, here's guidance on resolving the issue with Shopify's order_created webhooks not triggering:

1. Review Webhook Configuration: Ensure the order_created webhook is correctly subscribed within your app settings in Shopify. Sometimes, a simple misconfiguration in the event subscription can cause this issue.

2. Check Endpoint & URL Validate that the URL endpoint where the webhook should be received is correctly set and uses HTTPS with a valid SSL certificate. Mistakes in the endpoint URL or SSL configurations can hinder webhook delivery.

3. Examine Shopify Partner Dashboard: Explore the webhook logs in the Shopify Partner Dashboard. If there's no record of webhook deliveries, it might indicate an issue with subscription or delivery.

4. Endpoint Availability: Verify your server logs to confirm that there haven't been downtimes or connectivity problems preventing Shopify's webhooks from reaching your endpoint. Ensure that your endpoint is accessible and not blocked by any security measures.

5. Test Using External Tools: Utilize external services designed for testing webhooks. These tools, like RequestBin or ngrok, can help verify if Shopify's webhooks are reaching your server. This test can distinguish if the problem lies in delivery or receipt.

6. Check Security Measures: Review any firewall settings or IP whitelisting on your server that might be blocking incoming connections from Shopify servers.

7. Contact Shopify Support: If the issue persists, despite checking the configuration and testing, consider reaching out to Shopify's support. Provide comprehensive details about your setup and the steps you've taken to troubleshoot. They may offer further assistance or insights into potential platform-specific issues.

Keep in mind that even minor misconfigurations can impede webhook deliveries, so thoroughness in checking each aspect of the setup is crucial for identifying and resolving the issue.

Problem Solved? ✔Accept and Like solutions to help future merchants.
Sanchari
Shopify Partner
6 0 2

"Review Webhook Configuration: Ensure the order_created webhook is correctly subscribed within your app settings in Shopify. Sometimes, a simple misconfiguration in the event subscription can cause this issue." -  it should get subscribed when the app is installed on a store. 

If you know any other process to do it please help me with this.

I am not able to understand which endpoint is it taking for webhook subscription.

Samia_Akram22
Shopify Partner
60 9 13

@Sanchari 

When your app is installed on a Shopify store, webhooks are typically subscribed during the installation process using the Shopify API. However, if there are issues with webhook subscriptions or you want to manually check and manage the subscriptions, you can use the Shopify Admin or the API to view and manage webhook subscriptions.

Here's how you can check webhook subscriptions in the Shopify Admin:

1. Shopify Admin:
- Log in to the Shopify Admin of the store where your app is installed.
- Go to "Settings" and then select "Notifications" or "Notifications > Webhooks."
- Here, you should see a list of existing webhooks, including their topics (events), URLs, and status. Look for the "order_created" webhook to ensure it's subscribed. If it's missing or inactive, you might need to resubscribe or activate it.

If you prefer using the Shopify API to manage webhooks, you can:

1. Use Shopify API:
- Authenticate with the Shopify store using API credentials.
- Fetch the list of webhooks associated with the store using the Webhooks API endpoint (`GET /admin/api/202X/webhooks.json`). Replace "202X" with the API version.
- Look through the response to check if the "order_created" webhook is listed and active. If it's missing or inactive, you might need to create or reactivate it using the same API.

Here's an example of how you can create a webhook for order creation via the Shopify API:

```json
POST /admin/api/202X/webhooks.json

{
"webhook": {
"topic": "orders/create",
"address": "https://your-app-webhook-endpoint.com/webhook-handler",
"format": "json"
}
}
```

Replace `"https://your-app-webhook-endpoint.com/webhook-handler"` with your actual webhook endpoint URL.

Remember to ensure that the endpoint URL you provide is accessible, correctly handles incoming webhook payloads, and has the necessary SSL configurations in place to receive HTTPS requests.

By using either the Shopify Admin interface or the API, you can inspect, create, activate, or modify webhook subscriptions, including the "order_created" webhook, ensuring that it's properly set up to receive notifications for newly created orders.

Problem Solved? ✔Accept and Like solutions to help future merchants.