#CalebR-paymentelement
1 messages · Page 1 of 1 (latest)
Sorry for the wait! Looking now...
I don't know of a way to force the Payment Element to always collect the cardholder name, but instead you can set fields[billing_details][name]: never (see https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails-name) when you create the Payment Element so that it never asks for the customer name and you can collect it yourself
Hmm, the US Bank Account option still asks for the name even with that config option set
With this setup:
const paymentMethod = elements.create("payment", {
style: this.options.style,
business: {
name: accountName,
},
fields: {
name: 'never',
},
});
I still get a name field:
Ah! Completely forgot that you mentioned you were in the US bank account beta - it's possible that may be a bug on their end, but I also see in the code you sent over you need a slight change:
const paymentMethod = elements.create("payment", {
style: this.options.style,
business: {
name: accountName,
},
fields: {
billingDetails: {
name: 'never',
}
},
});
^^ try that
Ah, that fixed it! Thanks