Webhooks

Listen to events within your application.

You can enable webhooks in the Devtools section in the dashboard.

You can verify incoming webhooks with the [verifySignature] method.

Members:

member.created

Fires after a new member has been created.

Response:

  • event string The type of event

  • timestamp number The time at which the event was fired.

  • payload object The Member object

Response Example:

{
  event: "member.created",
  timestamp: 1633486880169,
  payload: {
    id: "mem_...",
    auth: {
      email: "john@doe.com"
    },
    metaData: { ... },
    customFields: { ... }
  }
}
member.updated

Fires after a member has been updated.

Fires on email change, custom fields, and metadata.

This does not fire on password change.

Response:

  • event string The type of event

  • timestamp number The time at which the event was fired.

  • payload object The Member object

Response Example:

{
  event: "member.updated",
  timestamp: 1633486880169,
  payload: {
    id: "mem_...",
    auth: {
      email: "john@doe.com"
    },
    metaData: { ... },
    customFields: { ... }
  }
}
member.deleted

Fires after a member has been deleted.

Response:

  • event string The type of event

  • timestamp number The time at which the event was fired.

  • payload object An object containing the deleted member's id

Response Example:

{
  event: "member.deleted",
  timestamp: 1633486880169,
  payload: {
    id: "mem_..."
  }
}

Plan Connections:

member.plan.created

Fires after a new plan connection has been created for a member. If using the DOM package this fires once if multiple plans are created at the same time. The plans array would contain all the plans the member signed up for.

V2 allows for multiple plans for members and this fires each time a plan is added to a member.

Response:

  • event string The type of event

  • timestamp number The time at which the event was fired.

  • payload object An object containing the member's id, and the plan connection.

Response Example:

{
  event: "member.planConnection.created",
  timestamp: 1633486880169,
  payload: {
    id: "mem_...",
    planConnection: {
        id: "con_...",
        active: true,
        status: "ACTIVE",
        type: "SUBSCRIPTION",
        planId: "pln_..."
        memberId: "mem_..."
    }
  }
}
member.plan.updated

Fires after a plan connection has been updated, anytime the status of the plan updates, or payment period updates.

Response:

  • event string The type of event

  • timestamp number The time at which the event was fired.

  • payload object An object containing the member's id, and the plan connection.

Response Example:

{
  event: "member.planConnection.updated",
  timestamp: 1633486880169,
  payload: {
    id: "mem_...",
    planConnection: {
        id: "con_...",
        active: true,
        status: "ACTIVE",
        type: "SUBSCRIPTION",
        planId: "pln_..."
        memberId: "mem_..."
    }
  }
}
member.plan.canceled

Fires when a member cancels a plan.

Response:

  • event string The type of event.

  • timestamp number The time at which the event was fired.

  • payload object An object containing the member's id, and the canceled plan connection id.

Response Example:

{
  event: "member.planConnection.canceled",
  timestamp: 1633486880169,
  payload: {
    id: "mem_...",
    planConnectionId: "con_..."
  }
}

Last updated