#plzbepatientihasautism
1 messages · Page 1 of 1 (latest)
Hello! The only way you can prefill address fields on the Checkout payment page is by using an existing Customer object: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#handling-existing-customers
So you'd need to make an API call to create a Customer with the collected data, then pass that cus_xxx to your session creation call
I guess in a pickup scenario you want to disable shipping address collection on the page?
yes but i hardly see it possible
as the user selects local pickup it doesn't make sense asking the user to fill out the shipping address regardless
Then you'd just have some logic in your code that omits the shipping_address_collection parameter on session creation if your customer selected 'local pickup'
i have the shipping_address_collection set to ["US" ] as the products can only be shipped to US for now
Ok, then just remove that from your API requests if your customer selects 'local pickup' in your application
That will prevent the fields from showig on the payment page
ok thanks for the tip I'll give that a shot