title: How to implement stripe subscriptions using cloud functions and firebase RTDB
body: <p>I'm a novice of firebase RTDB and I need to integrate stripe subscriptions using cloud functions.</p>
  <p>I've found <a href="https://github.com/firebase/functions-samples/blob/main/stripe/functions/index.js" rel="nofollow noreferrer">this semple</a> but I'm not sure it's using firebase RTDB. I've tried to search a bit but there is a lack of information about this implementation and all the resources I've found are using firestore and my team isn't using it for the app we are working on.</p>
  <p>Mainly the problem is that when we register a new user in RTDB we are using the <code>push()</code> method of the js client library that will create an unique id for each entry. At the moment we have a node in RTDB called <code>Users</code> and all the new registered users are added to it as child nodes. To be able to integrate stripe I see from the example that I need to add some informations for each user that will pay for a subscription, but before I can proceed, since I can't rely on the <code>uid</code> I need to search into the RTDB database first.</p>
  <p>Is there any good tutorial that use firebase RTDB I can follow or what I need to modify from the example code to be able to achive my scope?</p>
  <p>The structure of the RTDB node for users is something like this at the moment:
  <code>Users/-Mx1hais_aih1j/stripeData</code></p>