Stripe Payment Links - How to make prefilled_email read-only?

74 Views Asked by At

I have integrated stripe payment links in my Next JS(v14.0.4) application and passing the user email in the link using prefilled_email parameter as described in the stripe documentation: Customize checkout with URL parameters.

As per the documentation, the prefilled_email is editable. But I want this field to be read-only so that a user can not edit it. I have read through all the related stack overflow questions but all of the answers are related to stripe.checkout.Session.create. Is there any way to make the email field in the payment page read-only while using stripe payment links?

Payment link format that I am using: https://buy.stripe.com/[email protected]

1

There are 1 best solutions below

1
alex On

This isn't possible with prefilled_email.

If you really want to prevent your customer from editing the email, there are two options, both of which will require that you create a Customer object first :