Receive outgoing webhooks
Subscribe an external service to store activity and process each delivery once.
Create a destination#
Give the operator Manage outgoing webhooks permission. In Store settings → Webhooks, add a public HTTPS endpoint, choose its events, and copy the one-time signing secret into your receiver's secret storage.
Subscribe to order.paid or order.refunded for payment changes, parcel.shipped for each parcel, or order.shipped for completed physical fulfillment. Other available topics cover low or exhausted stock, received returns, product downloads, and cancellations.
Verify a delivery#
Read the raw request bytes before decoding JSON. Compute v1= followed by the hex HMAC-SHA256 of the timestamp, a period, and the raw body, using the endpoint secret. Compare it with Sellissimo-Signature in constant time. Accept a recent Sellissimo-Timestamp and deduplicate on Sellissimo-Delivery.
The following PHP expression computes the expected header once the raw body, timestamp, and secret are available:
$expected = 'v1=' . hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret);
$signatureMatches = hash_equals($expected, $signature);
Return a 2xx response after accepting the event durably. Test by placing and settling a development order and running php artisan sellissimo:reconcile. Check the recorded destination outcome. The scheduler retries failed attempts with increasing delays. Staff can pause an endpoint, rotate its secret, or requeue a failed delivery.