title: Firebase Cloud Functions - Stripe Connect Webhook not firing
body: <p>I'm trying to set up my stripe webhooks to fire invoking a firebase cloud function automatically whenever a Stripe Connect account is created, updated, or anything at this point. It only fires if I manually go to the Stripe Dashboard > Webhooks and hit the "send test webhook button".</p>
  
  <p><img src="https://i.stack.imgur.com/mn5ta.png" width="180" height="100"></p>
  
  <p>so far what I've done:</p>
  
  <p>1) created a Stripe Connect Webhook: </p>
  
  <p><a href="https://i.stack.imgur.com/Kx7Qg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Kx7Qg.png" alt=" Stripe Webhooks Dashboard"></a></p>
  
  <p>2) set up Webhook endpoint with firebase URL</p>
  
  <p><a href="https://i.stack.imgur.com/AxPz4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AxPz4.png" alt="enter image description here"></a></p>
  
  <p>3) set up node.js Firebase Cloud function to fire whenever stripe's webhook pings the Firebase URL.</p>
  
  <pre><code>const admin = require('firebase-admin');
  const functions = require('firebase-functions');
  admin.initializeApp(functions.config().firebase);
  const stripeToken = require('stripe')(functions.config().stripe.token);
  const stripeWebhooks = require('stripe')(functions.config().keys.webhooks);
  const express = require('express');
  const cors = require('cors');
  const endpointSecret = functions.config().keys.signing;
  const request = require('request-promise');
  const app = express();
  
  // Automatically allow cross-origin requests
  app.use(cors({ origin: true }));
  
  exports.stripeCreateOathResponseToken = functions.https.onRequest(cors((req, res) =&gt; {
  
      res.send("cloud function fired");
  
  }));
  </code></pre>
  
  <p>What am I missing that doesnt let the Stripe Webhook fire automatically?</p>
  
  <p>here are some of the tutorials I've been following:</p>
  
  <p><a href="https://medium.com/@koss_lebedev/stripe-webhooks-in-connect-applications-a7d71bdd44e1" rel="nofollow noreferrer">https://medium.com/@koss_lebedev/stripe-webhooks-in-connect-applications-a7d71bdd44e1</a></p>
  
  <p><a href="https://github.com/GaryH21/Stripe-Webhooks-Tutorial/blob/master/functions/index.js" rel="nofollow noreferrer">https://github.com/GaryH21/Stripe-Webhooks-Tutorial/blob/master/functions/index.js</a></p>
  
  <p><a href="https://medium.com/@GaryHarrower/working-with-stripe-webhooks-firebase-cloud-functions-5366c206c6c" rel="nofollow noreferrer">https://medium.com/@GaryHarrower/working-with-stripe-webhooks-firebase-cloud-functions-5366c206c6c</a></p>