#arti-villa_error

1 messages ¡ Page 1 of 1 (latest)

haughty fableBOT
#

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

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

quiet lava
#

hi! can you share the exact code you're using?

azure locust
#

The rest has been removed since it works fine. When I comment in some of these options it throws.

        <AddressElement
          options={{
            mode: 'shipping',
            // allowedCountries: allowedCountriesShipping,
            allowedCountries: ['US', 'CA', 'GB'],
            // blockPoBox: false,
            // fields: {
            //   phone: 'always',
            // },
            // validation: {
            //   phone: {
            //     required: 'always',
            //   },
            // },
          }}
        />
#

using these versions. in addition this is the loadStripe section

    "@stripe/react-stripe-js": "^3.0.0",
    "@stripe/stripe-js": "^5.2.0",
const stripe = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!, {
  betas: ['custom_checkout_beta_5'],
});
#

Is there a sample repo using all fields like address, shipping, payment etc you provide online I can mirror?

quiet lava
#

no. Hmm, that feels corect like it should work, not sure why it's not. Do you happen to have a link to a public page where this happening so I can have a look?

azure locust
#

I don't. maybe I can create a dev repo or a sandbox and share a smaller isolated snippet.

#

let me work on that

quiet lava
#

your code works fine for me

#

where exactly do you see the error, it is an actual console/runtime error or a TS warning

azure locust
quiet lava
azure locust
#

got it. this is a bit confusing so many variations. so i need to specify shipping/billing, payments, tax, discounts etc. all this is done via be options then? how do i prefill an existing customer who's already paid on my site or via link?

#

I mean its in beta so it makes sense. if I want to limit the customer payment types to bank or crypto can that be if > $x, can I configure this via payment methods on session creation?

quiet lava
#

the idea of this product is you use the CheckoutSession to manage the cart and overall checkout process but can use the Elements UIs to more closely integrate into your existing layouts; so most of the configuration is done on the CheckoutSession object.

how do i prefill an existing customer who's already paid on my site or via link?
not sure, let me look.
. if I want to limit the customer payment types to bank or crypto can that be if > $x, can I configure this via payment methods on session creation?
see https://docs.stripe.com/payments/payment-method-rules

azure locust
#

got it/ will try to take a stab at this tomorrow am.