#ing-lucas_checkout-existing-customer
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1239560264186204280
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
I've tried quite a few things, but the billing address doesn't get pre-filled in the CheckoutSession, I'm creating the customer beforehand, and I'm passing the data somewhat like such
customer = Customer.create(
name=workspace.name, email=workspace.billing_email, address=address
)
where I use line1, postal_code, state and country in address
Of course, I pass the customer.id in the customer= part when creating the CheckoutSession (python btw)
Stripe itself does seem to see it as a valid address when I look at the specific customers themselves btw
Hi there ๐ Checkout Sessions prefill payment method and billing details in very specific scenarios, which are discussd here:
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=stripe-hosted#handling-existing-customers
Additionally, the allow_redisplay field on the Payment Method, where the billing address details would be pulled from, must also be set accordingly.
https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay
ing-lucas_checkout-existing-customer
I'm specifically looking to prefill in a subscription mode checkout session, so I am unsure whether this fits in this scenario
I'll try though
Gotcha, then you'll want to look at the part of that section that discusses when Checkout Sessions prefill payment method and billing details when the mode is set to subscription.
It seems to only be for pre-filling card details, I am however specifically looking at pre-filling the billing address, which I have stored in a Customer.address beforehand. This, as I already have that information beforehand.
Or maybe I've stored it in the wrong place?
You can't prefill just billing address.