title: How to require email on Stripe Element JS
body: <p>I am creating a payment intent with stripe element however I do need to catch email and name from customers to grant access to products after purchase, here's my code:</p>
  <pre><code>async function initialize() {
    const { clientSecret } = await fetch(&quot;../create.php&quot;, {
      method: &quot;POST&quot;,
      headers: { &quot;Content-Type&quot;: &quot;application/json&quot; },
      body: JSON.stringify({ items }),
    }).then((r) =&gt; r.json());
  
    elements = stripe.elements({ clientSecret });
  
    const paymentElement = elements.create(&quot;payment&quot;, {
      fields: {
        billingDetails: {
          name: 'auto',
          email: 'auto',
        }
      }
    });
    paymentElement.mount(&quot;#payment-element&quot;);
  }
  </code></pre>
  <p>the payment element is created and it gets the CC info, there options are set to auto or off, there is no option in the documentation to make the fields required, how can I still get that info on the payment intent?</p>