#cassidy_api

1 messages ¡ Page 1 of 1 (latest)

woeful lavaBOT
#

👋 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.

white rampartBOT
hidden bone
#

As far as I am aware, that error message is correct but I will double check.

noble cradle
#

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

hidden bone
#

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

noble cradle
#

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]);
        }
    }```
hidden bone
#

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

noble cradle
#

Basically, we always have to ask for Zip? Is this documented somewhere? It seems like it should be possible according to the docs

hidden bone
#

Can you link me to that doc?

noble cradle
#

And billingDetails: 'never' hides the zip code and country

#

yeah, let me find it again

hidden bone
#

When you hide them that way do you still get the name error?

noble cradle
#

yeah

#

Here's a payment intent number: pi_3OzLi0GXLBvI27gk1l8otbID

hidden bone
#

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.

noble cradle
#

Ah, I see

hidden bone
#

Name shouldn't be required here as far as I know, still looking in to that

noble cradle
#

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

hidden bone
#

As a billing detail it is often used by the issuing bank to confirm the cardholder's identity.

noble cradle
#

Yeah, I understand. However, it seems pretty common across the web to not ask for zip code and country

hidden bone
#

That may be our choice due to helping auth rates. I will double check with my colleagues

noble cradle
#

Thanks!

#

And anywhere it's documented that I can show my boss would be super helpful

hidden bone
#

Sounds good, still looking, will send the link when I can find it

noble cradle
#

Thanks!

white rampartBOT
hidden bone