skip to Main Content

I am using stripe to receive payments and I am following this guide to get the address of the my buyers, but the guide seems to be wrong wrong:

  • when importing import {AddressElement} from '@stripe/react-stripe-js';, the library doesnt seem to have the AddressElement anywhere in there (I also searched manually for it) and AddressElement is undefined

Do you any idea if the guide is actually wrong?

2

Answers


  1. Chosen as BEST ANSWER

    The problem was easy to solve - I had an older version of @stripe/react-stripe-js. Installing the latest one solved the issue


  2. Instead of using

    AddressElement

    Stripe now provides a

    BillingAddressFields

    component that you can use to collect a customer’s billing address.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search