#llh_code

1 messages · Page 1 of 1 (latest)

lone otterBOT
#

👋 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/1336366331976482837

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

stark mist
#

Hey there, are you attaching a billing address via address element on these sessions?

vocal bramble
#

I don't but I was under the impression that PaymentElement handles that. The doc seems to indicate it figures out whether it needs to collect full address vs zipcode automatically

stark mist
#

Which doc are you following, specifically?

#

I've used this integration, but it is still in preview so I might need some time to dig in

vocal bramble
#

Collect a billing address
By default, a Checkout Session collects the minimal billing details required for payment through the Payment Element.

#

@thick oracle I think you're in the wrong thread 😛

stark mist
#

@vocal bramble so i think what you're seeing is this behaviour about partial billing address:
https://docs.stripe.com/payments/collect-addresses?payment-ui=embedded-components#collect-partial-billing-addresses

**Collect partial billing addresses
**To collect partial billing addresses, such as just the country and postal code, pass billing_address_collection=auto.

**When collecting partial billing addresses, you must collect addresses manually. **By default, Payment Element is configured to automatically collect the minimal billing details required for payment. To avoid double collection of billing details, pass fields.billingDetails=never when creating the Payment Element. If you only intend to collect a subset of billing details (such as the customer’s name), pass never for only the fields you intend to collect yourself.

vocal bramble
#

ok so I should turn off billingDetails in payment element and use AddressElement separately?

stark mist
#

Yes, that sounds like that's what's recommended here for the case you have.

#

I suspect you need more billing details for the automatic tax calculation

vocal bramble
#

gotcha thanks ill give it a try!

lone otterBOT
vocal bramble
#

ok so I've tried a couple of things and it's not working

#
  1. I tried adding AddressElement, after filling that out, canConfirm is still false
  2. I tried adding onChange to AddressElement and updateBillingAddress when it's complete, on submission I got You called confirm() while the Address Element is mounted, but you previously also called updateBillingAddress(). If you intend to use the value from the Address Element, you should not call updateBillingAddress(). If you intend to use a different value, ensure the Address Element is not mounted by the time you call confirm().
  3. I tried changing billing_address_collection=required but that doesn't work either
slender tusk
#

Hi hi! I'm taking over for synthrider. Can you share the code you're using?

vocal bramble
#

yup 1sec

slender tusk
#

Awesome. Thanks! Are you also working with Stripe via email?

vocal bramble
#

I am yeah

slender tusk
#

Awesome. Your best bet here is to work with them on this - they're on it.

#

They've already looped in the folks that work on this particular feature to help, and once they've got it sorted, they'll get you up and running - there's nothing I can do here to make it go faster for you.

vocal bramble
#

cool sgtm thanks!