Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

waleedviews's avatar

How can i get cardholder name?

I am trying to store a card holder name when purchasing a product, it does work however it shows model User name not the actual card holder name that we type in the form, any help please?

name: cardHolderName.value -> shows user model name

const { setupIntent, error } = await stripe.confirmCardSetup(
                cardButton.dataset.secret, {
                    payment_method: {
                        card: cardElement,
                        billing_details: {
                            name: cardHolderName.value
                        }
                    }
                }
            )
0 likes
1 reply
martinbean's avatar

@waleedviews Well why are you trying to access it in the first place? It’s the name on the card. It’s payment data. It shouldn’t be touching your server, otherwise you then become liable for PCI compliance, which defeats the point of using a payment processor like Stripe. They assume the PCI compliance burden on your behalf.

1 like

Please or to participate in this conversation.