Getting Started

This article will briefly cover the events and payloads called during a webhook event.

Event Name When will it be triggered?
add-member When any new user subscribes to the free plan or when a new team member is added.
update-member When an existing member updates their email or name.
remove-member When a user is removed from the member list
add-subscription When a user purchases any paid plan
update-subscription When any paid member downgrades to a free plan or changes from annually to monthly or vice versa
cancel-subscription When a user cancels their subscription

Member Added

An add-member event is fired when new users subscribe to the free plan.

Information sent in the payload for an add-member webhook is summarised in the table below.

Payload

Property Type Description Example
name String The name of the added member “John”
email String The email address of the added member [email protected]
userId String The added member’s User ID 644094d7f939e67758
eventName String Name of the event add-member
eventId String The unique ID of the event add-member-fj30fer
membership Object This object will contain the value of the membership information (E.g customerId, subscriptionId) membership:{**`customerId: "cus_43fdf43nkkdf",
subscriptionId: "subs_4eru9djfknv",
planId: "plan_34r34nr`**"
}

membership object properties:

Property Type Description Example
customerId String The customer ID of the member added cus_43fdf43nkkdf
subscriptionId String The Subscription ID of the member subs_4e**** or null(if free member)
planId String The Plan ID of a member added will be Free or null(if free member)
status String Status of the subscription
renewAt Date Date when the subscription is to be renewed
cancellationEffectiveDate Date Date when the cancellation will be effective

Member Updated

An update-member event is fired when an existing member updates their email or name.

Information sent in the payload for an update-member webhook is summarised in the table below.

Payload

Property Type Description
name String The updated name of the existing member
email String The updated email address of the existing member
userId String The member’s User ID
eventName String Name of the event
eventId String The ID of the event
membership Object This object will go to a payload containing the value of the membership

membership object properties:

Property Type Description
customerId String Customer ID of the member
subscriptionId String Subscription ID of the member
planId String The ID of the plan the user has subscribed to
status String Status of the subscription
renewAt Date Date when the subscription is to be renewed
cancellationEffectiveDate Date Date when cancellation will be effective

Member Removed

A member-removed event is fired when a user is removed from the member list.

Information sent in the payload for a member-removed webhook is summarised in the table below.

Payload

Property Type Description
name String The name of the removed member
email String The email address of the removed member
userId String The removed member’s User ID
eventName String Name of the event
eventId String The ID of the event
membership Object This object will go into a payload containing the value of the membership

membership object properties:

Property Type Description
customerId String Customer ID of the member
subscriptionId String Subscription ID of the member
planId String The ID of the plan the user had subscribed to
status String Status of the subscription
renewAt Date Date when the subscription is to be renewed
cancellationEffectiveDate Date Date when the cancellation will be effective

Subscriber Added

An add-subscription event is fired when a user purchases any paid plan

Information sent in the payload for an add-subscription webhook is summarised in the table below.

Payload

Property Type Description
name String The name of the new subscriber
email String The email address of the subscribed member
userId String The new subscriber’s User ID
eventName String Name of the event
eventId String The ID of the event
membership Object This object will go into a payload containing the value of the membership

membership object properties:

Property Type Description
customerId String Customer ID of the new subscriber
subscriptionId String Subscription ID of the new subscriber
planId String The ID of the plan the user had subscribed to
status String Status of the subscription
renewAt Date Date when the subscription is to be renewed
cancellationEffectiveDate Date Date when the cancellation will be effective

Subscriber Updated

An update-subscription event is fired when any paid member updates to a free plan or changes from an annual to a monthly subscription or vice versa.

Information sent in the payload for an update-subscription webhook is summarised in the table below.

Payload

| --- | --- | --- |

membership object properties:

| --- | --- | --- |

Subscription Cancelled

An add-subscribtion event is fired when a user cancels their subscription.

Information sent in the payload for an add-subscribtion webhook is summarised in the table below.

Payload

| --- | --- | --- |

Related articles