Topics
Saves and removes by guests (shoppers who aren’t signed in) are not sent to webhooks.
Request
Every event is an HTTPSPOST with a JSON body.
Envelope
Every topic shares one envelope:A UUID for this event. Retries of the same delivery carry the same
id, so use it to ignore duplicates.Product object
Used bywishlist.item_added, wishlist.item_removed and the items of wishlist.purchase. Only variantId is guaranteed: the other fields are included when Loveful has the variant’s details synced.
wishlist.item_added and wishlist.item_removed
wishlist.item_added
wishlist.shared
wishlist.shared
wishlist.purchase
Sent once per order: an order is never sent twice within 30 days.wishlist.purchase
wishlist.test
wishlist.test
Verifying signatures
Each endpoint has its own signing secret, startingwhsec_. It is shown once, when the endpoint is created. Regenerate signing secret makes a new one, shown once, and the old one stops working at once.
X-Loveful-Signature is the HMAC-SHA256 of the raw request body, keyed with the whole secret string (including whsec_), as lowercase hex. To verify:
- Read the raw body as bytes, before any JSON parsing.
- Compute the HMAC-SHA256 of it with your secret, as hex.
- Compare it with the header using a constant-time comparison, and reject the request if they differ.
id you’ve handled and ignore repeats, and check createdAt is recent.
Responding and retries
Return any2xx status to acknowledge an event. The response body is ignored.
- Each attempt times out after 10 seconds.
- A delivery is tried up to 3 times in all. It is retried after a timeout or network error, or a
408,425,429or5xxresponse. Other4xxresponses are not retried. - Retries wait 0.5 seconds, then 1 second, or the time in a
Retry-Afterheader when the endpoint sends one. - Redirects (
301,302,303,307,308) are followed up to 3 times, each target checked by the same URL rules.
wishlist.test event with a real signature to check your endpoint.
Endpoint URLs
- Must start with
https://. - Must be a public address: Loveful won’t send to private or internal networks.
- The URL can’t be changed after the endpoint is created. To use a different URL, add a new webhook, which gets its own secret. The topics can be changed at any time.