4

How to disable or hide email in checkout.js in Stripe Payment

onStripeUpdate(e) {
    this.stripehandler.open({
      name: "",
      description: "",
      panelLabel: "Pay {{amount}}",
      allowRememberMe: false,
      email: "", //--->how to hide this email?
    });
    e.preventDefault();
  }
Ywain
  • 16,854
  • 4
  • 51
  • 67
Brendon
  • 461
  • 1
  • 5
  • 10

1 Answers1

5

It is not possible to disable the email field entirely. You can pass a value for the email configuration option, but it must be a valid email address. If it's a valid address, the field will be replaced by a static label with the value you provided.

If you don't provide the email option, or if you provide an invalid value (such as an empty string in your example code), then the email field will still be displayed.

Ywain
  • 16,854
  • 4
  • 51
  • 67