payload['type']) { case 'customer.subscription.created': case 'customer.subscription.updated': self::handleSubscriptionUpsert($event); break; case 'customer.subscription.deleted': self::handleSubscriptionDelete($event); break; } } private static function handleSubscriptionUpsert(WebhookReceived $event) { /// } private static function handleSubscriptionDelete(WebhookReceived $event) { /// } }