#mickiewicz
1 messages · Page 1 of 1 (latest)
Hi there
So we explain what is required for this here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
In payment mode, the customer’s most recent card payment method will be used to prefill the email, name, card details, and billing address on the Checkout page. In subscription mode, the customer’s default payment method will be used if it’s a card, and otherwise the most recent card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.
So all of that has to be true
Otherwise the customer has to enter a new PaymetnMethod
Hmm currently we are passing only customerId
so email is also required to payment information be prefilled?
Yes but that info all has to be associated with the PaymentMethod itself. It is a bit tricky in that way
Ok, so I will try to pass email together with the customer ID
Yeah but you also need to make sure those things are collected on the PaymentMethod, not the Customer
So specifically in the PaymentMethod's billing details: https://stripe.com/docs/api/payment_methods/object#payment_method_object-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
hmm so if a customer create a payment method in the stripe customer portal those informations are not assigned to this payment method?