Once you've configured Snipcart to post to your webhook URL, each of the following will be triggered by the relevant customer action.
Orders::EVENT_BEFORE_REQUEST_SHIPPING_RATES
Receives ShippingRateEvent (opens new window) with order
and package
properties.
Triggered in response to a shippingrates.fetch
webhook event, but before shipping rates are requested from a shipping provider. This offers a chance to modify the order before shipping rates are requested, or do some validation and throw an error by setting the event's isValid
property to false
and optionally setting the errors
property to an array of ['key' => 'error key', 'message' => 'error message']
associative arrays.
Shipments::EVENT_BEFORE_RETURN_SHIPPING_RATES
Receives ShippingRateEvent (opens new window) with order
, package
and rates
properties.
Triggered before any custom shipping rates are returned to Snipcart so that they may be filtered or modified. You can also do validation and throw an error (for instance if no rates
were returned) by setting the event's isValid
property to false
and optionally setting the errors
property to an array of ['key' => 'error key', 'message' => 'error message']
associative arrays.
Webhooks::EVENT_BEFORE_PROCESS_COMPLETED_ORDER
Receives OrderEvent (opens new window) with an order
property.
Triggered by the order.completed
webhook immediately after an order is completed and dispatched before any further action is taken, like sending to ShipStation or making inventory adjustments.
Products::EVENT_PRODUCT_INVENTORY_CHANGE
Receives InventoryEvent (opens new window) with element
and quantity
properties.
Triggered after an order has been completed, and contains references to each relevant Element and a numeric value that can be used to adjust its quantity.
Webhooks::EVENT_ON_ORDER_STATUS_CHANGED
Receives OrderStatusEvent (opens new window) with order
, fromStatus
, and toStatus
properties.
Triggered when an order status has changed.
Webhooks::EVENT_ON_ORDER_PAYMENT_STATUS_CHANGED
Receives OrderStatusEvent (opens new window) with order
, fromStatus
, and toStatus
properties.
Triggered when an order's payment status has changed from the dashboard or API.
Webhooks::EVENT_ON_ORDER_TRACKING_CHANGED
Receives OrderTrackingEvent (opens new window) with order
, trackingNumber
, and trackingUrl
properties.
Triggered when an order's tracking number has changed.
Webhooks::EVENT_ON_ORDER_REFUND_CREATED
Receives OrderRefundEvent (opens new window) with a refund
property.
Webhooks::EVENT_ON_ORDER_NOTIFICATION_CREATED
Receives OrderNotificationEvent (opens new window) with a notification
property.
Webhooks::EVENT_ON_SUBSCRIPTION_CREATED
Receives SubscriptionEvent (opens new window) with a subscription
property.
Triggered when a subscription has been created.
Webhooks::EVENT_ON_SUBSCRIPTION_CANCELLED
Receives SubscriptionEvent (opens new window) with a subscription
property.
Triggered when a subscription has been cancelled.
Webhooks::EVENT_ON_SUBSCRIPTION_PAUSED
Receives SubscriptionEvent (opens new window) with a subscription
property.
Triggered when a subscription has been paused.
Webhooks::EVENT_ON_SUBSCRIPTION_RESUMED
Receives SubscriptionEvent (opens new window) with a subscription
property.
Triggered when a subscription has been resumed.
Webhooks::EVENT_ON_SUBSCRIPTION_INVOICE_CREATED
Receives SubscriptionEvent (opens new window) with a subscription
property.
Triggered when a subscription invoice has been created.
Webhooks::EVENT_ON_TAXES_CALCULATE
Receives TaxesEvent (opens new window) with order
and taxes
properties.
Triggered when an order is ready for tax calculation, and only called if you've explicitly enabled the Webhook Taxes Provider option in the Snipcart control panel.
Webhooks::EVENT_ON_CUSTOMER_UPDATE
Receives CustomerEvent (opens new window) with customer
property.