#jogui_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/1228257085905567784
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- jogui_best-practices, 18 hours ago, 39 messages
- jogui_code, 1 day ago, 24 messages
- jogui_best-practices, 2 days ago, 8 messages
hi there!
Hey soma, long time no see (like 2 years ago i think) haha
what payment method are you using here? just cards?
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.
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
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 setfields.billing_details.phoneat all. and if later you decide to accept more payment method, the Payment Element will adapt automatically.
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.
nice catch!
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
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.
If I put it to auto, a "country" selector appears
then you should only disable the country: fields.billing_details.address.country: never, and pass the country when confirming the PaymentIntent.
Thanks, that work. You are the real MVP here soma
happy to help ๐
but yeah the auto and never are not really intuitive here, so I understand the confusion.
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
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?