Skip to navigation

Overview

View as Markdown

Reference only. These are endpoints Coi calls on YOUR server, not something you call here.

  • Order Placed Payload — fired once per completed order.
  • Customer Registered Payload — fired once per new registered customer.
  • Contact Form — fired once per submitted contact/lead form. Unrelated to the store.

Delivery

Every webhook is sent in the background within seconds of the event - the order, signup or form never waits for your server.

  • Any 2xx answer counts as delivered. Otherwise it is retried 3, 15, 30, 60, 120 and 180 minutes after the event (seven attempts within three hours). A 4xx answer other than 408 and 429 stops at once.
  • An attempt that gets no answer within 60 seconds counts as failed and is retried.
  • Webhooks are never sent to internal addresses (localhost, 10.x, 192.168.x and the like).

Headers

HeaderValue
X-Coi-Eventorder.created, customer.registered or lead.created
X-Coi-DeliveryAn ID that stays the same on every retry of one event - use it to drop a duplicate.
X-Coi-Signaturet=<unix seconds>,v1=<hex> - see below.

Verifying the signature

v1 is the HMAC-SHA256, in lowercase hex, of <t>.<content> keyed with the site’s signing secret (“סוד חתימה” in the site settings > “קודים וסקריפטים”). The content is the raw request body for a POST, and the query string without the ? for a GET.

To verify: compute the same value, compare it in constant time, and reject a t older than 5 minutes. Checking it is optional, but without it treat the URL itself as the secret and keep it out of client-side code. Replacing the secret in the admin stops the old one at once.