Notification kinds

The notification kind, returned by calling kind on the notification object, reveals what triggered the webhook. The $webhookNotification->kind for Subscription webhooks will be one of the following:

  • BraintreeWebhookNotification::SUBSCRIPTION_CANCELED
  • BraintreeWebhookNotification::SUBSCRIPTION_EXPIRED
  • BraintreeWebhookNotification::SUBSCRIPTION_TRIAL_ENDED
  • BraintreeWebhookNotification::SUBSCRIPTION_WENT_ACTIVE
  • BraintreeWebhookNotification::SUBSCRIPTION_WENT_PAST_DUE

The following table describes the conditions that trigger each kind of webhook.

Notification Type Description

A subscription is canceled.


A subscription successfully moves to the next billing cycle. This will also occur when either a new transaction is created mid-cycle due to proration on an upgrade or a billing cycle is skipped due to the presence of a negative balance that covers the cost of the subscription.


A subscription already exists and fails to create a successful charge.
This will not trigger on manual retries or if the attempt to create a subscription fails due to an unsuccessful transaction.


A subscription reaches the specified number of billing cycles and expires.


A subscription's trial period ends.


A subscription's first authorized transaction is created, or a successful transaction moves a subscription from the Past Due status to the Active status. Subscriptions with trial periods will not trigger this notification when they move from the trial period into the first billing cycle.


A subscription has moved from the Active status to the Past Due status. This will only be triggered when the initial transaction in a billing cycle is declined. Once the status moves to past due, it will not be triggered again in that billing cycle.


kind enum

The kind of webhook notification.

timestamp date

The UTC time at which the webhook was triggered.


A Subscription object.

Contains an array of the 20 most recent transactions associated with the subscription.