#ripitried
1 messages · Page 1 of 1 (latest)
I'm looking at this link: https://stripe.com/docs/api/checkout/sessions/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Shipping info isn't a required field in checkout, but I don't think there's a way to prefill it in the UI
So if I have an existing customer they will have to fill out their shipping address again?
Customer as in the stripe Customer object
If you have shipping_address_collection enabled then yes, I'm pretty sure they'd need to re-specify it.
and shipping address as the address associated with that Stripe Customer object
But definitely test it out just to be sure
Ok so its unknown whether its possible to initialize a checkout session with a shipping address for an existing Customer
Turns out I was wrong (I tested it out just now) - looks like it does prefill with the customer's existing shipping details if they have them
It would just happen automatically if you enable shipping_address_collection and you pass in a Customer when you create the Checkout Session
Perfect
thanks for checking that Karbi
1 more quick question
This parameter set would also enable prefilling previous payment information as well right (passing in the Customer)
or is that a separate set of params
seems like its the same?
Previous payment information is similar, but has some stricter validations - we'll only show a prefilled payment method if it has a valid billing address, billing name and billing email
hypothetically Stripe would only save a payment method to the customer if its valid?
or when does that validation occur
We'd check for all those things when you create a new Checkout Session w/ customer set
and yes, if you're going through Checkout Sessions we'd only attach/save the payment method to the customer if it was successful
Great