stripe/react-stripe-js

[BUG]: Collect full billing address on a single page checkout

wesleyyee opened this issue · 2 comments

What happened?

When using the PaymentElement (specifically a credit card), The billing information only includes country and postal_code. We need to collect full billing address. We've also tried to use an additional AddressElement in billing mode. But the API only allows a single AddressElement. I can't find another way to collect the full billing address on a single page checkout. Any way forward would be greatly appreciated!

Environment

No response

Reproduction

No response

hey @wesleyyee assign it to me, I would like to give it a try and I will be grateful if you provide me with more information on this issure.

Hey @wesleyyee -- your question asked about a full Billing address with Address Element is well suited for, but this comment suggests there are more constraints on your integration:

But the API only allows a single AddressElement.
I infer from this that you're already using an Address Element to collect a shipping address, then? It's true that currently you can have only a single Address Element, though we are exploring options to make this more flexible.

For now, you can include both billing and shipping AEs by using an addition Elements group (via <Elements /> provider), like this example:
https://codesandbox.io/p/sandbox/react-stripe-js-forked-5ky78z?file=%2Fsrc%2Findex.js%3A38%2C51

react-ae