> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pcnaid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Outbound webhooks and Shopify topics

> Shopify webhook topics Order Merge Pro handles and the signed events it emits.

# Outbound webhooks and Shopify topics

## Inbound Shopify topics

`POST /webhooks` receives Shopify webhook payloads and authenticates them with HMAC signature verification before any topic side effect. The shop header is not trusted for authorization; the canonical order GID is resolved through persisted merge-job ownership and must match the server-owned tenant.

| Topic | Handler action |
| - | - |
| `ORDERS_CREATE` | Evaluate Pro automation rules and start a merge |
| `ORDERS_UPDATED` | Detect cancellation confirmations, update the database, and notify the Durable Object |
| `REFUNDS_CREATE` | Record an exact refund and order-GID audit |
| `FULFILLMENTS_CREATE` | Fail only an early, reversible merge if fulfillment starts |
| `APP_SUBSCRIPTIONS_UPDATE` | Persist plan and status changes to `ShopSubscription` |
| `SHOP_UPDATE` | Refresh persisted Admin GraphQL primary-domain data |
| `APP_UNINSTALLED` | Clean up sessions and fail pending jobs |
| `CUSTOMERS_DATA_REQUEST` | GDPR: export held order and merge references to R2 |
| `CUSTOMERS_REDACT` | GDPR: delete matching job, event, Durable Object, and audit data |
| `SHOP_REDACT` | GDPR: delete shop data, retaining only the creation-blocking tombstone |

Compliance and account-state topics execute synchronously, so a 200 response means their effects are complete. Order, fulfillment, and refund topics are durably enqueued to the merge queue before the Worker returns 200. Completed duplicate delivery IDs return 200 without repeating work.

The three compliance topics verify the HMAC against the unchanged raw bytes before JSON parsing. A supplied `X-Shopify-Webhook-Id` is the retry-deduplication key. Without it, `customers/data_request` derives a deterministic key from the topic and a SHA-256 hash of the raw body; headerless `customers/redact` and `shop/redact` requests get a fresh per-request key and rely on idempotent handlers.

Webhook subscriptions are declared in `shopify.app.toml` for `orders/create`, `orders/updated`, `refunds/create`, `fulfillments/create`, `app/uninstalled`, `app_subscriptions/update`, `shop/update`, and the three compliance topics, all pointing at `/webhooks`.

## Outbound events

Pro merchants can subscribe to these events. Each subscription receives a signed `POST` to the registered URL, and each delivery carries the `X-OrderMerge-Signature`, `X-OrderMerge-Event`, and `X-OrderMerge-Shop` headers described in the [API overview](https://docs.pcnaid.com/nodes/shopify/order-merge-pro/developer/api/index.md#outbound-webhooks).

| Event | Fires when |
| - | - |
| `merge.completed` | A merge job finishes successfully |
| `merge.failed` | A merge job fails |

The event payload carries `version`, `event`, `shop`, `jobId`, `primaryOrderId`, `secondaryOrderIds`, `status`, `shippingRefundAmount`, and `occurredAt`.

Subscription endpoints must use HTTPS and a public destination; registration and delivery reject loopback, private, link-local, reserved, and documentation IP literals, single-label hosts, and local or internal DNS suffixes.

[Pcnaid Documentation](https://docs.pcnaid.com/namespace/index.md) › [Shopify Ecosystem](https://docs.pcnaid.com/hubs/shopify-ecosystem/index.md) › [Order Merge Pro](https://docs.pcnaid.com/nodes/shopify/order-merge-pro/index.md) › [Developer](https://docs.pcnaid.com/nodes/shopify/order-merge-pro/developer/index)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.