#Euclid-firebase
1 messages ยท Page 1 of 1 (latest)
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?
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...
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.
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
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?
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
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?
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 ?
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.
I'm not sure off-hand.
Thanks for your help with this
Is a new cloud function for unauth user the best option for this ?
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
@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