Webhooks

Launch Cart support various type of webhooks. Webhooks can be used to get notification about new orders .

To register an webhook you need to call POST /api/v1/store/{store_id}/webhooks endpoint with form params: callback and hook.

callback is an url where Launch Cart will send POST notification
hook is an event name

Supported hooks

Hook nameDescription
order/createdSent when order is successfully created
product/createSent when product is created
product/updateSent when product is updated
client/unauthorizeSent when user disable app from Super Powers page.
newsletter/subscribeUser subscribed to newsletter
newsletter/mailchimp/subscribeUser subscribed to mailchimp-supported form
newsletter/mailchimp/accounts

When webhook is sent, request payload contains information about context (product, order, store).

Webhook can be removed using DELETE /api/v1/store/{store_id}/webhooks/{webhook_id}

Each webhook call is signed by hmac. You can find hmac signing hash in X-LaunchCart-Hmac-SHA256 header.

We are using this formula to create base64 encoded binary hash:

hmac = base64_encode(hash_hmac('sha256', content, client_secret, isBinary: true))

content contains json payload of request.