#cassidy_api
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/1222943178223517748
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
As far as I am aware, that error message is correct but I will double check.
Here's the full error message: v3/?.js:1 Uncaught (in promise) IntegrationError: You specified "never" for fields.billing_details when creating the payment Element, but did not pass confirmParams.payment_method_data.billing_details.name when calling stripe.confirmPayment(). If you opt out of collecting data via the payment Element using the fields option, the data must be passed in when calling stripe.confirmPayment().
Not sure why it say "name" there
It looks like postal code is always required even for the other versions of our card element like the split card element
I am also surprised that it said that about name. I don't think the cardholder name should be required. Can you send me your exact payment element setup and confirm payment intent code
I'm using the Payment element
Yes, one sec
const $stripeMount = $('#js-stripe-mount-card');
if ($stripeMount) {
stripeInstance = window.Stripe(CH.stripeApiKey);
stripeElements = stripeInstance.elements({
mode: 'payment',
currency: 'usd',
amount: window.CH.checkout.paymentIntentInitialAmount,
paymentMethodTypes: ['card', 'link'],
setup_future_usage: 'off_session',
fields: {
billingDetails: {
name: 'never',
email: 'never',
phone: 'never',
},
},
style: {
base: {
'::placeholder': {
color: '#c0c0c0',
},
},
invalid: {
color: '#9F3A38',
},
},
});
stripePaymentElement = stripeElements.create('payment', {
fields: {
billingDetails: 'never',
},
});
stripePaymentElement.mount($stripeMount[0]);
}
}```
Right, I meant to communicate that the payment element does not support this. I checked in to whether using our other elements would be a workaround, but they don't support confirming without a ZIP either.
Thanks for the code, testing myself
Basically, we always have to ask for Zip? Is this documented somewhere? It seems like it should be possible according to the docs
Can you link me to that doc?
And billingDetails: 'never' hides the zip code and country
yeah, let me find it again
When you hide them that way do you still get the name error?
That simply means you can prevent the payment element from collecting those details yourself. If they are required by the payment method you still need to pass them in
These are commonly used for things that you might be collecting on your page otherwise. So like if you collect the full address yourself you can specify never and pass the zip in that way, rather than the cardholder typing it in twice.
Ah, I see
Name shouldn't be required here as far as I know, still looking in to that
I'm not too worried about that since that only appears if I hide the zip code from payment element, which you just confirmed means I have to ask for it somewhere else anyway
I would love to be able to avoid asking for the zip code period. It's not a shippable product so we're not asking for it anywhere else
As a billing detail it is often used by the issuing bank to confirm the cardholder's identity.
Yeah, I understand. However, it seems pretty common across the web to not ask for zip code and country
That may be our choice due to helping auth rates. I will double check with my colleagues
Thanks!
And anywhere it's documented that I can show my boss would be super helpful
Sounds good, still looking, will send the link when I can find it
Thanks!
Hey @noble cradle apologies but we are still having trouble finding a doc on this. For the payment element we do require zip because it helps so much with auth rates. It turns out that you can confirm intents without a zip with the card element or split card element, you just need to hide the postal code for those. Though even then we do reccommend collecting ZIP because of auth rates. https://docs.stripe.com/js/elements_object/create_element?type=card#elements_create-options-hidePostalCode