#.cyberscribe
1 messages · Page 1 of 1 (latest)
right
the jsx that renders the form is:
<CheckoutForm stripePromise={props.stripePromise} clientSecret={props.clientSecret} loggedIn={props.loggedIn} />
</Elements>```
I'm not sure if that is "Embedded form" or "Custom flow"
and do you see a name field in the Payment Element?
you are using this, which is the Payment Element indeed: https://stripe.com/docs/stripe-js/react
yes that looks like what we are using
and which payment method are you using? for example for cards payment there would be no name field at all.
ah, I see the issue now--we had Google Pay also active, so it was displaying a name field for Google Pay but for cards it could be left blank
Can we request the cardholder name in the form? or do we have to request it outside the form?
I see a customer name field in risk insights -- is this coming from a field in the payment or in the customer?
if you always want to collect a name, then you would need to add your own input field on the page.
ok, I see
and this gets sent with the rest of the form if wrapped in the <Elements> ?
not by default no, but you can set it when confirming the PaymentIntent here: https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data
got it, thanks. so like:
'{CLIENT_SECRET}',
{
payment_method: {
card: cardElement,
billing_details: {
name: 'soma'
}
}
}
);```
correct! note that for some payment method the Payment Element will ask for the name field. so to avoid seeing two name field on your page, you might want to completely disaply the name field here: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields
great, thanks
now that I know it was Google Pay showing the name field I can make it work and make it required for credit cards
perfect!
thanks so much!