Webhooks
Introduction
Webhooks allow your application to receive real-time notifications about events in your merchOne orders. When specific events occur (order cancellation, shipment, tracking updates, etc.), merchOne sends a POST request to your configured webhook URL with event details in JSON format.
Configuration
The webhook URL is stored with the order at creation time. If you change or remove the webhook URL after an order is created, the changes will not apply to existing orders. Make sure your webhook URL is correctly configured before placing orders.
Webhook Delivery
Request Format
Method:
POSTContent-Type:
application/jsonTimeout: 60 seconds
Retry Policy
If your webhook endpoint fails to respond with a 2xx status code, merchOne will automatically retry the delivery:
1st retry
1 minute
2nd retry
5 minutes
3rd retry
10 minutes
4th retry
20 minutes
5th retry
30 minutes
If your endpoint accumulates 10 or more failed webhook deliveries in a single day, you will receive a notification email.
Expected Response
Your endpoint should return a 200 OK (or any 2xx) status code to acknowledge receipt. The response body is ignored.
Webhook Events
merchOne supports the following webhook event types:
shipment_sent
Triggered when an order shipment is dispatched
shipment_tracking_event
Triggered when a tracking status update is received
order_canceled
Triggered when an order is canceled
order_failed
Triggered when an order encounters an error
order_commented
Triggered when a comment is added to an order
Event-Specific Data Fields
Each webhook event includes the full order object plus event-specific data:
shipment_sent
shipment
Shipment details with tracking info and items
shipment_tracking_event
event
Tracking status, location, details, and date
order_canceled
author
Who canceled the order (API, System, or user name)
order_failed
reason
Error message describing why the order failed
order_commented
comment
The comment text added to the order
Event Payloads
Shipment Sent (shipment_sent)
shipment_sent)Triggered when an order shipment is dispatched from the fulfillment center.
Shipment Tracking Event (shipment_tracking_event)
shipment_tracking_event)Triggered when a tracking status update is received for a shipment.
Possible tracking statuses:
in_transit- Package is on the wayout_for_delivery- Package is out for deliverydelivered- Package has been deliveredexception- Delivery exception occurredreturned- Package returned to sender
Order Canceled (order_canceled)
order_canceled)Triggered when an order is canceled.
Possible author values:
"via API"- Canceled via API request"by System (Automatic)"- Automatically canceled by the system"by John Doe"- Canceled by a user"by our administrator, John Doe"- Canceled by an admin
Order Failed (order_failed)
order_failed)Triggered when an order encounters an error during processing.
Order Commented (order_commented)
order_commented)Triggered when a comment is added to an order by merchOne staff.