#charlche_error
1 messages ยท Page 1 of 1 (latest)
๐ 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/1229888537084690473
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello ๐
Give me a moment to look
Actually, can you double check the PaymentIntent ID?
It seems to be missing a few characters
oh my bad, let me double check the ID
it was, sorry about that
pi_3P60NUFdV4bT3T5F10r0rpit
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Is there a reason you're passing the shipping address twice?
Initially, you're setting shipping address at creation which uses your secret key. The confirmation request uses your Publishable key since it's happening client-side.
Since you've already set the address at creation, you don't need to pass it again at confirmation.
Is the issue that shipping address should only be set once and if we pass it in the confirmation request it will give us a 400?
Kind of. If you try to pass it in with the confirmation request, we try to update it on the PaymentIntent.
However since confirmation request uses Publishable key, the API throws this error.
oh i see
There isn't any reason in particular that we are passing it twice, or another way to put it is we aren't doing it intentionally. I am new to all of this, just started at my new job and am taking on a bug ticket for this error. I don't see a way to not pass the shipping information in the call we are making with the SDK. We only started encountering this when we started to add the shipping information to our payment intent creation so that we can have that information to use for Radar rules for fraud mitigation.
we're using this method here: https://docs.stripe.com/js/payment_intents/confirm_payment
and sorry for my lack of knowledge, but it seems like the shipping address information is contained in the elements object?
All good. You're using Express Checkout Element. So you likely have something like this in your code somewhere which collects the shipping address and submits it at confirmation time
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#collect-shipping
shippingAddressRequired: true,