Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stripe Checkout Modal : Prefill billing address

Is there a way to prefill the billing address form in the Stripe Checkout Form?

I have a form where a customer needs to fill in their address, so I would like to automatically fill the billing address in the Stripe form. However, I am asked by my client to provide the option for their visitors to change the billing address, for instance when they use their personal credit card for a payment they make as a business.

I tried to use the opened() function, but that doesn't seem to affect the Checkout box. Other than that, I don't have an idea what to do..

like image 681
Aurelin Avatar asked Jan 16 '14 18:01

Aurelin


3 Answers

I e-mailed the Stripe support and got the following reply :

Unfortunately it's not currently possible to pre-fill Checkout with any details beyond the customer's email. I'll make note of the request and pass it along to our team for consideration(...).

like image 112
Aurelin Avatar answered Oct 22 '22 04:10

Aurelin


20 August 2018 update/reply from Stripe:

TLDR: Nope, only email

I have taken a look into this for you and unfortunately, only the email address can be pre-filled in the Checkout. If you already have the customer’s email address, you can use it to pre-fill the email field in Checkout. The default email address can be pre-filled with data-email:

http://jsfiddle.net/gkjqcrLp/

The only other way to pre-fill data is actually on the customer's side of things with the Remember Me feature. Customers can enable the “Remember Me” feature when they complete a payment on websites that use Stripe Checkout. If this option is selected and a phone number is entered, a confirmation code is sent via SMS to that mobile device. Because the information would be saved with Stripe, this feature would allow you to make future payments quickly using this mobile verification process.

I appreciate this isn't the answer you were looking for, but I hope that I have been able to shed some light on this, and have given you some information that might be useful going forward.

like image 29
Andriod Avatar answered Oct 22 '22 04:10

Andriod


Stripe told me also on 15 Oct 2015 that only the email can be pre-filled.

However they say we can update the Card with the billing address on the server and get an address verification. They referenced this page (but example code is for an older API version): https://stackoverflow.com/a/27176532

In "test" mode I found it possible to create a Card from a Token and then perform a card update operation with address details added to get an address verification performed. However a Customer object needs to exist first. I could not get a combined card-create-with-address-verification in one step to work though.

4000 0000 0000 0028 - simulate address line1 fail
4000 0000 0000 0036 - simulate zip check fail

Card update response included these additional properties:

{
     ...
     "address_zip_check": "pass",  // or "fail" etc
     "address_line1_check": "pass",
     ...
}
like image 1
reggoodwin Avatar answered Oct 22 '22 05:10

reggoodwin