invertase / stripe-firebase-extensions

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

extension double-charging customers for old invoices?! #613

Open kayleigh222 opened 6 months ago

kayleigh222 commented 6 months ago

Bug report

Describe the bug

Firestore docs in our database contain the correct order info, a list 'items' of items ordered. However, some customers are receiving invoices that include the items in that order list AND all items they've purchased in previous orders (so the invoices are for way too much money).

To Reproduce

I'm actually not sure how to do this without sharing our database sorry, because there is no code - it's just the db doc, and the Stripe extension is supposed to take it from there. Please let me know if you have an idea how I can better give steps to reproduce :)

Expected behavior

Stripe sends an invoice for the items in the 'items' list in the firestore doc.

(instead, found behaviour: Stripe sends an invoice for the items in 'items' list and all previously ordered and paid for items)

Screenshots

Here's an example of a list of items stored in an order doc in our db (some of these screenshots overlap but bear with me - there are only 6 products in this list):

image image image image image

And this is the invoice the customer received:

image

System information

Additional context