in Education by
I'm currently using Cloud Firestore as my backend for a mobile app. I've got basic payments working with Stripe with cloud functions programmed with node.js, however, when setting up for Stripe Connect, the process requires a redirect uri (which I input in the settings of my Stripe account). I have very little experience with redirects and callbacks. What is the address that I can use as a redirect uri? How does this address get established? It would also be great to hear your thoughts on how I would go about capturing the information from the redirect through a firestore trigger (node.js). Any help would be much appreciated! Thank you. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
One solution is to use an HTTPS Cloud Function. As explained in the doc, "after you deploy an HTTPS function, you can invoke it through its own unique URL.". The URL will look like: https://us-central1-.cloudfunctions.net/stripeWebhook and you just have to declare it in your Stripe settings. In the Cloud Function, you will be able to get the values passed to the body of the HTTP request, as follows: exports.stripeWebhook = functions.https.onRequest((req, res) => { const orderId = req.body.data.object.metadata.orderId; const sourceId = req.body.data.object.id; const sourceType = req.body.data.object.type; .... }); and also to write to Firestore, in order to update the record corresponding to the paiement. You may watch the following official video for an example:https://www.youtube.com/watch?v=7IkUgCLr5oA&t=1s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=3

Related questions

0 votes
    I tried to find out how to use firestore local emulator for python and for testing purpose. But I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I have this operation EventModel data = EventModel(_nameEvent, _passEvent, _localEvent, _dateEventString); HashMap ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    In Firestore documentation said: There are no additional costs for using cursors, page tokens, and limits. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    In Firestore documentation said: There are no additional costs for using cursors, page tokens, and limits. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 8, 2022 in Education by JackTerrance
0 votes
    Right now my firebase cloud firestore looks like this: const db = fire.firestore(); db.collection(" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 7, 2022 in Education by JackTerrance
0 votes
    When I attempt to load data into BigQuery from Google Cloud Storage it asks for the Google Cloud Storage URI ... Developers Console? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I have a dynamic website on my domain made using the codeigniter framework. I don't know how cpanel ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 27, 2022 in Education by JackTerrance
0 votes
    How can we connect to database in a web application? (a) oracle sql developer (b) toad (c) JDBC template ... & Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    I'm currently developing a web application using asp.net c#. I got a server where I today was ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 12, 2022 in Education by JackTerrance
0 votes
    I want to use python to connect to a MySQL database, how can I do that? Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    If you connect to a database or a file in a program you should always __________ it when you’re finished using it. Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    How can we connect to database in a web application? (a) oracle sql developer (b) toad (c) JDBC ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...