async setupWebhook(id, secret, opts = {}) {
        if (!id || !secret || opts.forceCreate) {
            if (id && !opts.skipDelete) {
                try {
                    await this.api.deleteWebhookEndpoint(id);
                } catch (err) {
                    // Continue
                }
            }
            const webhook = await this.api.createWebhookEndpoint(
                this.config.webhookHandlerUrl,
                WebhookManager.events
            );
            return {
                id: webhook.id,
                secret: webhook.secret
            };
        } else {
            try {
                await this.api.updateWebhookEndpoint(
                    id,
                    this.config.webhookHandlerUrl,
                    WebhookManager.events
                );

                return {
                    id,
                    secret
                };
            } catch (err) {
                if (err.code === 'resource_missing') {
                    return this.setupWebhook(id, secret, {skipDelete: true, forceCreate: true});
                }
                return this.setupWebhook(id, secret, {skipDelete: false, forceCreate: true});
            }
        }
    }
Setup a new Stripe Webhook Endpoint.
- If the webhook exists, delete it and create a new one
- If the webhook does not exist, create a new one

@param {string} [id]
@param {string} [secret]
@param {object} [opts]
@param {boolean} [opts.forceCreate]
@param {boolean} [opts.skipDelete]

@returns {Promise<{id: string, secret: string}>}