invertase / stripe-firebase-extensions

Repository of Firebase Extensions built by Stripe.
https://firebase.google.com/products/extensions
Apache License 2.0
437 stars 164 forks source link

Invoice issue in the 'firestore-stripe-payments' extension when setting trial period for product price #505

Closed vishishttiwari closed 1 year ago

vishishttiwari commented 1 year ago

Bug report

Describe the bug

I recently updated the above extension from 0.2.3 to 0.3.2 and I am now getting errors related to invoice.paid, invoice.payment_succeeded and invoice.upcoming.

The exact errors in firebase console are:

❗️[Error]: Webhook handler for Stripe event [*] of type [invoice.payment_succeeded] failed: Value for argument "documentPath" is not a valid resource path. Path must be a non-empty string.

❗️[Error]: Webhook handler for Stripe event [*] of type [invoice.paid] failed: Value for argument "documentPath" is not a valid resource path. Path must be a non-empty string.

❗️[Error]: Webhook handler for Stripe event [*] of type [invoice.upcoming] failed: Value for argument "documentPath" is not a valid resource path. Path must be a non-empty string.

This is happening because the invoice.paid and invoice.payment_succeeded webhook events do not contain an payment_intent in the object

Its important to note that this occurs in case when there is free trial period with the price.

vishishttiwari commented 1 year ago

Any update when this issue will be resolved? Thanks

vishishttiwari commented 1 year ago

@jsteele-stripe The issue with invoice.upcoming still exists. The error is same as before: "❗️[Error]: Webhook handler for Stripe event [*] of type [invoice.upcoming] failed: Value for argument "documentPath" is not a valid resource path. Path must be a non-empty string."

hasan-abul commented 6 months ago

@jsteele-stripe Is this issue still exists. Any help on this please.

Stripe event log says:

{ "error": "Webhook handler failed. View function logs in Firebase." }

Firebase says

❗️[Error]: Webhook handler for Stripe event [evt_1Ov58AGrlUrEAthFjs5yTvit] of type [invoice.upcoming] failed: Value for argument "documentPath" is not a valid resource path. Path must be a non-empty string."

aar-stripe commented 6 months ago

@hasan-abul please take a look at https://github.com/invertase/stripe-firebase-extensions/issues/616#issuecomment-2003764250