#jogui_error

1 messages ยท Page 1 of 1 (latest)

lofty stagBOT
#

๐Ÿ‘‹ 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/1228257085905567784

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

muted smeltBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

agile lance
#

hi there!

inner dune
#

Hey soma, long time no see (like 2 years ago i think) haha

agile lance
#

what payment method are you using here? just cards?

inner dune
#

yup

#

im limiting to cards

#

both from stripe dashboard panel and by code

agile lance
#

for cards payment method, phone number is not required at all. so you can set fields.billing_details.phone to auto (or not set it at all) and it should work.

inner dune
#

then I can send it an empty string? or better i put it to auto and put a devNote there warning of the real logic

agile lance
#

then I can send it an empty string?
I don't think this would work, but you can try. I would recommend to just not set fields.billing_details.phone at all. and if later you decide to accept more payment method, the Payment Element will adapt automatically.

inner dune
#

Okay, let me check then ๐Ÿ™‚

#

Sorry for the follow up, but as i feared, it also asks for:

Error creating confirmation token IntegrationError: You specified "never" for fields.billing_details.address when creating the payment Element, but did not pass params.payment_method_data.billing_details.address.postal_code when calling stripe.createConfirmationToken(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.createConfirmationToken().

#

stripe
            .createConfirmationToken({
                elements,
                params: {
                    payment_method_data: {
                        billing_details: {
                            name: nameInput,
                            email: email,
                            address: {
                                country: vueInstance.form.countryIso,
                                postalCode: vueInstance.form.postalCode,
                            },
                        },
                    },
                },
            })
#

I'm already passing the country and postalCode, the two parts of address i was already providing with cardElement because of Stripe Tax and such

#

but we cannot ask for a physical address as this is a digital subscription product

#

if i put the

 const paymentElementOptions = {
            fields: {
                billingDetails: {
                    name: "never",
                    email: "never",
                    phone: "auto", //We need to put it in auto to make stripe.createConfirmationToken() work, but Stripe Devs told us that if we limit to only cards will never be asked. WARNING: If we open to more methods we have to take this into account.
                    address: "never",
                },
            },

BillingDetails.address to auto, it asks for the country and/or the zipcode, but this input forms are already implemented in my frontend because i need them always, due to spanish tax reporting requirements, and therefore cannot use stripe ones

#

ops, sorry, i see is postal_code not postalCode, give me a sec.

agile lance
#

nice catch!

inner dune
#

im so embarassed lol

#

anyway, it also happens with:

You specified "never" for fields.billing_details.address when creating the payment Element, but did not pass params.payment_method_data.billing_details.address.state when calling stripe.createConfirmationToken(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.createConfirmationToken().

#

params.payment_method_data.billing_details.address.state

agile lance
#

this information is not needed for card payments. so fields.billing_details.address should be set to auto (or not set at all), and it should work.

inner dune
#

If I put it to auto, a "country" selector appears

agile lance
#

then you should only disable the country: fields.billing_details.address.country: never, and pass the country when confirming the PaymentIntent.

inner dune
#

Thanks, that work. You are the real MVP here soma

agile lance
#

happy to help ๐Ÿ™‚

#

but yeah the auto and never are not really intuitive here, so I understand the confusion.

inner dune
#

just a little feedback, for your dev team: in the fields.billing_details.address.postalCode is postalCode

#

but in stripe.createConfirmationToken is billing_details.address.postal_code

#

i supose you are aware of it

agile lance
#

just a little feedback, for your dev team: in the fields.billing_details.address.postalCode is postalCode
I'm not sure I follow. do you have a link where you see this mistake? or you mean the autocomplete?

inner dune
#

postalCode != postal_code, but both comes from an "address" object. I understand they are different arguments for different functions, but it's strange the naming

#

was just some feedback, i really appreciate your help