#Euclid-firebase

1 messages ยท Page 1 of 1 (latest)

edgy wedgeBOT
wispy snow
#

Hi there ๐Ÿ‘‹ the email address field for Checkout Sessions cannot be hidden. It can be prefilled though, but I'm not sure whether that is possible via the Firebase Extension. Is that similar to what you're looking for?

warm swan
#

Yes - it is appearing prefilled now as the authenticated user, but this address is incorrect as I am allowing my users create and sell products but their direct email is showing on checkout

#

I have tried and failed to change the prefilled email in the create.checkout.session using customer and customer_email

#

let me know if you need more details...

wispy snow
#

Sorry, I'm not sure I understand what you're trying to accomplish. The email fields on the Checkout Session is for collecting the customer's address, but from your previous message I'm getting the impression that you're displaying a vendor/merchant email there.

warm swan
#

yes correct

#

As I am allowing not signed in users to buy products from my frontend

#

using the store owners uid who set up on my platform

#

at the moment I am using the firebase extension for this rather than cloud functions

wispy snow
#

I'm not sure I'm understanding the logic behind that, why are you associating these Checkout Sessions with a Customer object that doesn't represent the customer completing them?

warm swan
#

because the extension will only allow authenticated users...

#

the only way I found to use the extension was to pass the profile uid to the frontend...

#

but in this case the sellers email is displaying on checkout

#

I hope that helps with this issue

wispy snow
#

I don't know too much about the Firebase Extension, but based on what you're describing it sounds like creating Customers for your customers is going to be the best approach if that flow forces authenticated access.

Have you tried creating a Checkout Session that isn't associated with a Customer object?

warm swan
#

It seems from the docs the extension can only be used for authenticated users

#

So in my case my users are being passed as the buyers but are really sellers on my platform....

#

Have you tried creating a Checkout Session that isn't associated with a Customer object? Is this possible with the extension ?

wispy snow
#

If you're passing a Customer that represents your seller when creating the Checkout Session, then it is expected for that Customer's email to be shown on the Checkout Session.

warm swan
#

Thanks for your help with this

#

Is a new cloud function for unauth user the best option for this ?

wispy snow
#

I'm trying to find the docs that you're referencing for setting up the extension, but am having trouble doing so. I'm not sure how much work it is to set up an unauthenticated flow, and I'm not sure if that will work if the extension requires authentication.

#

Euclid-firebase

compact grove
#

@warm swan Hey there ๐Ÿ‘‹

#

The function that the extension ships with the create sessions with Stripe automatically pulls there Stripe cus_xxx from the associated Firestore user document, and passes it to the customer parameter. You can see how this works here: https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-payments/functions/src/index.ts#L151

GitHub

Repository of Firebase Extensions built by Stripe. - stripe-firebase-extensions/index.ts at next ยท stripe/stripe-firebase-extensions