MyNearStoresPartners
Lightspeed

Lightspeed webhook receiver

POST
/lightspeed/webhook

Called by Lightspeed (registered automatically on connect), or by a Lightspeed business rule. Accepts raw JSON or a form-encoded payload=<json> body. When X-Lightspeed-Signature is present it must be the hex HMAC-SHA256 of the raw body.

The store is found from domain_prefix (also read from domainPrefix, store, storeId, retailer.domain_prefix or sale.domain_prefix). Events are stored, then processed in the background: sale.created, sale.updated, sale.ready_for_payment, sale.line_items.added and sale.customer.changed save the sale and issue a receipt link; inventory.created and inventory.updated save the inventory change; other events are stored only.

A receipt is added to a MyNearStores member's account when the member ID is in the Lightspeed customer's customer_code, or in a top-level mns_member_id or reference_id.

Header Parameters

X-Lightspeed-Signature?string

Request Body

  1. body

Lightspeed's event body. Only the fields MyNearStores reads are listed.

event_type?string
domain_prefix?string
retailer?
customer?
sale?
mns_member_id?string

Alternative to customer.customer_code for business-rule webhooks.

reference_id?string
[key: string]?any

Response Body

Received. Unknown stores are acknowledged with a warning and not stored.

application/json
  1. response
received*unknown
webhook_event_id*integer
domain_prefix*string
curl -X POST "https://example.com/lightspeed/webhook" \  -H "Content-Type: application/json" \  -d '{}'
{  "received": true,  "webhook_event_id": 0,  "domain_prefix": "string"}