I've a web app (React) which uses Firebase as the backend. I'm integrating Stripe for subscriptions to my app. To sync a user's subscription details to Firestore, I installed this Run Payments with Stripe extension on Firebase. The extension says the following on how to create a subscription.
To subscribe the user to a specific pricing plan, create a new doc in the
checkout_sessions
collection for the user.
However, I'm trying to use Payment Links in my web app (which gives me greater flexibility and lesser maintainence going forward). I created a Payment Link and completed a purchase in Test Mode. But the user's subscription related data is not synced in Firestore.
I looked into the logs of the ext-firestore-stripe-payments-handleWebhookEvents
function and found the following error.
❗️[Error]: Webhook handler for Stripe event [evt_xxxxxxxxxxxxxxxxxx] of type [customer.subscription.created] failed: User not found!
Now, I would like to know if it is possible to use Payment Links with this firebase extension? If yes, how can I sync the user id between Firebase and Payment Link, so that the user details are updated in Firestore and auth claims are set as described.
PS: The failed event doesn't show up in Stripe dashboard. Only successful webhook events are list item even though there is a separate tab for failed events.