Events (Webhooks)

Moltin observes several events that you can attach webhooks to. With a webhook you can attach custom code that performs actions outside of the Moltin ecosystem.

You may want to send a discount code or a NPS survey email a few days after an order is fulfilled. You can do this via a webhook that sends event data to your custom function.

Webhooks operate on an "at least once" delivery policy, and we aim to deliver messages within 30mins or less. Please take care to design your receiving app accordingly.

Webhooks that return anything other than a 2XX status code will be considered failed.

Event object

Attribute

Type

Description

id

string

The unique identifier for the event

type

string

This represents the type of object being returned

name

string

The name of the event

description

string

A description for this event

integration_type

string

This will be webhook

enabled

boolean

This will enable the event to fire

observes

An array of observable events

configuration

Example response

{
  "data": {
    "id": "328b4e0b-4032-48d0-8c85-04cc4c0a331d",
    "type": "integration",
    "name": "Order shipping notification",
    "description": "Send a shipping notification via email with discount code.",
    "integration_type": "webhook",
    "enabled": true,
    "observes": [
      "order.fulfilled"
    ],
    "configuration": {
      "url": "https://ilovelamp.now.sh/send-shipped-email",
      "secret_key": "SOME_SECRET_KEY"
    }
  }
}

Last updated