invertase / stripe-firebase-extensions

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

Metadata missing with line item payments #619

Open kschmott opened 3 months ago

kschmott commented 3 months ago

Bug report

Describe the bug

Not sure if this is intended behavior, but metadata for checkouts with line items is not transferred to a user's payments collection docs.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a checkout session with line items and metadata
  2. Observe that the metadata field is an empty map

Expected behavior

I would expect that the metadata from the checkout session be copied over to the payment doc like it does with single item payments.

justAdevTV commented 2 months ago

I have the same issue. The metadata field in payments is {}

I see that it's trying to get the metadata here: https://github.com/invertase/stripe-firebase-extensions/blob/6c5966da3bab16d4a7d55116eb458d35b6c3e0bf/firestore-stripe-web-sdk/src/payment.ts#L301

bcanedo4 commented 2 months ago

I also have this issue.

dylan0356 commented 1 month ago

Still having this issue

const docRef = await addDoc(checkoutSessionRef, { price: yearlyPriceID, success_url: window.location.origin + '/dashboard' , cancel_url: window.location.origin + '/upgrade', allow_promotion_codes: true, trial_period_days: 7, trial_from_plan: true, metadata: { userID: user.uid, }, });

        Except the metadata is empty on the strip object in the logs