stripe-firebase-extensions
stripe-firebase-extensions copied to clipboard
Readonly Email Address with customerEmail
Feature request
firestore-stripe-subscriptions
Is your feature request related to a problem? Please describe.
We do not want the users to change their email address in checkout.
Describe the solution you'd like
It seems that when you provide customerEmail prop with the create checkout session the email field is readonly.
- https://stripe.com/docs/api/checkout/sessions/create
So I would suggest that if the checkout session document has a field customer_email, this field will be added to the checkout session params.
- https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-subscriptions/functions/src/index.ts#L96-L113
- https://github.com/stripe/stripe-firebase-extensions/blob/next/firestore-stripe-subscriptions/functions/src/index.ts#L136-L153
Describe alternatives you've considered
Alternatively the checkout_session documents field customer_email could be a boolean and if it is true the users email address will be provided as customerEmail.
I have to decide if I implement an own solution for the checkout url handling or wait for you guys to support our change requests. Sadly I don't see any reaction on this.
@EdwardBock sorry for the delay! The customer email is already being pre-filled from the customer object, therefore setting customer_email
is not possible. customer_email
can only be set when no customer object is being supplied, and then Stripe Checkout will create a new customer object which wouldn't work with the extension.
I've flagged this with the team and they are working on enabling this when setting a customer object, and once possible we can update this in the extension.
Thank you for this explanation! Then I'll have to wait patiently 👍
@thorsten-stripe Is it possible to hide the email address input from the user in the checkout form?
I think this is related... I just updated the extension and now the email field on the stripe checkout page is editable, where as before it was read-only. Can we force that to be read-only again or hide it like @EdwardBock suggested?
Thanks!
Yes, it would be very useful if the email field could be hidden (or be read-only).
When creating a Checkout Session with the customer
parameter (which is the default behaviour for this extension), the email
field from the associated Customer object will be pre-filled and uneditable. This is confirmed on our documentation here.
It is not currently possible to remove/hide the email field on the payment page.
Hi, how can I make the email readonly in the normal Payment links generated from the UI? Currently it let to edit.