#bootsy-paymentelement-name
1 messages · Page 1 of 1 (latest)
@exotic fossil PaymentElement focuses on collecting the minimum data required. So it will collect a name but only where required for specific payment methods and not card unfortunately.
What you need to do is collect this in your own field on your page and then you can pass it when you call confirmPayment() under the billing_details parameter: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details
bootsy-paymentelement-name
did you try to look at the docs I linked? There's the exact same shape/parameter for confirmSetup() right there in the same docs: https://stripe.com/docs/js/setup_intents/confirm_setup#confirm_setup_intent-options-confirmParams-payment_method_data-billing_details
I'm sorry those are just two pictures with no details? Those are 2 completely separate methods, one is confirmSetup() and the other is confirmCardSetup()
Yes. I'm using confirmSetup(), but i don't see anywhere in the docs to pass in a name
but I just linked you to the exact parameter, twice
We don't show an exact code example for your use-case (there are dozens of parameters, that wouldn't make sense) but we list every parameters and that link I gave you shows the exact path
elements: elements,
confirmParams: {
return_url: 'https://example.com',
payment_method_data: {
billing_details: {
address: {
city: 'city',
line1: 'line1',
line2: 'line2',
postal_code: '90210',
country: 'FR'
},
email: 'myemail@example.com',
name: 'my name',
}
},
},
});```
here's a full example
but you only want name and not the rest if I understood your ask correctly