#mikkelvenni_firestore-webhook-urls
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1256282315940954122
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
Okay, what does the browser console say when the button is clicked to generate a Checkout Session URL?
Error from console:
service.ts:206
POST https://europe-west3-advisorai-a50a4.cloudfunctions.net/createStripeCheckoutSession 500 (Internal Server Error)
VM58:112 Error starting checkout session:
FirebaseError: Unable to create Stripe Checkout Session
Please check the attached image to see my current code for the cloud function. To try and find the error, I went back to my test API key, and now that does not work either
We don't have a lot of context on Firebase errors unfortunately. We can only really handle the Stripe side of things. If you're getting an error that says "unable to create Checkout Session", then most likely you don't have any developer logs in the Stripe Dashboard to check what might be going on, so you'll need to step through the code on your own
Okay, I understand.
Here is an update (if that changes things):
I went back to the same code on the payment site (where I redirect users to the payment site), which previously worked. But the error is that the user is not redirected to Stripe.
And now this is all I see in the console:
uc.js:2 A preload for 'https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=6458bb1a0672b8357d152ba2' is found, but is not used due to an integrity mismatch.
dequeueNonAsyncScripts @ uc.js:2
VM323:34 User is logged in: UserImpl
VM323:56 Price ID from admin document: price_1PTsrVRwAlhbjCNqNfpIg19i
VM323:57 Product ID from admin document: prod_QKXxbB2IkzN3s5
VM323:37 Uncaught (in promise) ReferenceError: updatePageContent is not defined
at <anonymous>:37:7
h1-check.js:107 in detectStoreNew
VM323:110
Unfortunately that doesn't illuminate anything for me. I'm not sure what updatePageContent is
The updatePageContent is not the issue. I've just uncommented that code, and the error persists which is that I'm not redirected to the Stripe payment page
Got it. I wish I could help further here, but I'm sort of at a loss for what to advise.
Okay, the thing is that I went back to test mode and it does not work. One of the things I've changed in Stripe is that I've duplicated the webhook from test to live.
I'm not sure if there could be an error here.
Previously when everything was working I had this endpoint URL:
https://europe-west3-advisorai-a50a4.cloudfunctions.net/ext-firestore-stripe-payments-l8ex-handleWebhookEvents
But at the same time, the endpoint URL I had in Firestore was this:
https://europe-west3-advisorai-a50a4.cloudfunctions.net/ext-firestore-stripe-subscriptions-handleWebhookEvents
Now, nothing works when I try using the first or the second URL. Could the error be that I'm using the wrong endpoint URL?
In Firestore I see this:
Use the URL of your extension’s function as the endpoint URL. Here’s your function’s URL: https://europe-west3-advisorai-a50a4.cloudfunctions.net/ext-firestore-stripe-subscriptions-handleWebhookEvents
You would have separate endpoints for live mode and test mode, so you would need to re-register a new webhook endpoint with Stripe to use in livemode, which would have its own ID, signing secret, configuration, etc.
Got it. Since I constantly see this in Firestore:
"In Firestore I see this:
Use the URL of your extension’s function as the endpoint URL. Here’s your function’s URL: https://europe-west3-advisorai-a50a4.cloudfunctions.net/ext-firestore-stripe-subscriptions-handleWebhookEvents"
Where should I look exactly to find the correct endpoint url?
Hi đź‘‹
I'm stepping in as my colleague needs to go soon
Is the URL you listed the one that will receive Stripe webhook events?
Hi
Thank you.
I'm not sure, it's just the URL I see in Firestore.
Sorry for being such a noob
Unfortunately I cannot help with Firestore issues. You need to determine how to connect a specific URL to your webhook handling code and then register that URL with Stripe.
I understand. But can't you tell med where I find that URL?
I"m not sure what you mean. If you are asking where you can find the URL you registered with Stripe, you can locate in your dashboard settings here: https://dashboard.stripe.com/test/webhooks
If you are asking about where to find Firestore URLs, that I cannot help with.
Ok.