Notification kinds

The notification kind, returned by calling kind on the notification object, reveals what triggered the webhook. The webhookNotification.getKind() for Payment Method webhooks will be one of the following:

  • WebhookNotification.Kind.PAYMENT_METHOD_REVOKED_BY_CUSTOMER

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

Notification Type Description
payment_method_revoked_by_customer

A payment instrument that was previously enabled has been revoked by the customer.
Currently this webhook will only be sent when a customer cancels their PayPal billing agreement.

Attributes

getKind() enum

The kind of webhook notification.

getTimestamp() date

The UTC time at which the webhook was triggered.

getRevokedPaymentMethodMetadata()

Metadata referencing the revoked payment method.

getToken() string

An alphanumeric value that references a specific payment method stored in your Vault.

getCustomerId() string

A value representing an existing customer stored in your Vault. Use Customer.find() call to look up a single customer.

getRevokedPaymentMethod()

The PaymentMethod object associated with the revoked payment method.