Order Placed Payload
Reference example only — Coi is the caller here, your endpoint is the receiver. Fired once, as a POST with a JSON body, right after an order completes.
Configure the target URL at: Store > Store Settings > “Purchase” tab > “Webhook להזמנות”.
IMPORTANT — Cart is not only real products. Alongside actual purchased items, Cart carries pseudo-line-items using negative ProductID as a type tag, so every discount/fee affecting the order total is visible in one array instead of requiring separate fields:
-1 Delivery
-2 Coupon
-3 PayPal commission
-4 Payment/installment fee
-5 VAT
-6 Promotion (store discount rule)
Any consumer that looks up “ProductID” against your own catalog MUST first filter out ProductID <= 0, or it will crash or silently mis-book a discount as a purchased product. A negative-ID line has Sku: null and an empty Options array.
Cart[].Options is a real JSON array (not a double-encoded string) — each entry is {“Name”: …, “Price”: …}.
CouponCode is the code of the coupon applied to this order, or null when none was — it is always present. The discount AMOUNT is not in that field: it is the ProductID -2 line in Cart, whose Price is the negative amount taken off. CouponCode only saves you walking the array to learn which code was used.
A code the customer typed but which was not applied — expired, under the coupon’s minimum order, or beaten by a promotion marked “no coupon on top” — leaves CouponCode null and produces no -2 line at all.
No authentication header — treat the URL itself as the secret and keep it out of client-side code.
Payload
Customer's phone number, as entered (no fixed format — matches the input mask configured in Store Settings).
Coi's own order number/identifier. Use this as your idempotency key — the same order is never re-sent with a different number.
Every line in the order — both real purchased products and pseudo-lines (delivery, coupon, promotion, VAT, payment fee). Always check ProductID before treating a line as a purchased product.
The customer's entire submitted checkout form, as name/value pairs — one entry per field the merchant's form actually collects. Field names are whatever the merchant configured (typically Hebrew labels), not a fixed set, so read this array rather than assuming specific keys.
Shipping/billing address as free text, if the checkout form collected one.
Free-text order note from the customer, if the checkout form has a notes field.
Code of the coupon applied to this order, or null when none was. Always present.
The discount itself is not here — it is the ProductID -2 line in Cart, whose Price is the negative amount taken off. This field only saves you walking the array to learn which code was used.
Note it reflects a coupon that was actually APPLIED. A code the customer typed but which was rejected (expired, under the minimum order, or beaten by an exclusive promotion) leaves this null and produces no -2 line.
