Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pre-populate email in the Stripe payments dialog popup

I cannot seem to find a way to pre-populate the email address in the stripe payment popup. However this weekend I signed up for two accounts on websites that use stripe payments and I realized those websites had my email pre-populated in the stripe dialog iframe box. So I know there must be a way but I am unsure of how to do that. The docs don't define that property. Can someone explain how this is done using the javascript API and the basic Stripe dialog?

like image 309
Subtubes Avatar asked Nov 08 '15 02:11

Subtubes


People also ask

Does Stripe send a confirmation email?

Stripe sends a receipt to the email address that's specified for receipt_email in the PaymentIntent object depending on your account email settings.

How do I customize my Stripe payment page?

Apply branding You can customize the look and feel of Checkout in the Stripe Dashboard. Go to Branding Settings where you can: Upload a logo or icon. Customize the Checkout page's background color, button color, font, and shapes.

What is the difference between Stripe and Stripe checkout?

You may be wondering what the difference is between Stripe and Stripe Checkout. While our “regular” Stripe Payments integration allows users to enter credit card payment information directly on your form, Stripe Checkout seamlessly redirects users to the Stripe website to process payment.


1 Answers

If you're using Simple Checkout you pass the email in data-email like this:

<form action="/charge" method="POST">   <script     src="https://checkout.stripe.com/checkout.js" class="stripe-button"     data-key="pk_test_6pRNASCoBOKtIshFeQd4XMUh"     data-image="/img/documentation/checkout/marketplace.png"     data-name="Stripe.com"     data-description="2 widgets"     data-amount="2000"     data-email="[email protected]"     data-locale="auto">   </script> </form> 

If you're using Custom Checkout you pass the email in the email parameter to handler.open():

handler.open({   name: 'Stripe.com',   description: '2 widgets',   amount: 2000,   email: "[email protected]" }); 
like image 91
koopajah Avatar answered Sep 19 '22 10:09

koopajah