#RockstarsNFT-payment-element

1 messages · Page 1 of 1 (latest)

trail wagon
#

Hi 👋 no, currently the Payment Element will only collect additional fields such as address if it's strictly required by the selected payment method type. To collect additional information you would need to add custom to fields to do so, and then you'd likely want to suppress the address collection from the Payment Element.
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-fields-billingDetails

Regarding your second question, can you elaborate on what you're asking about?

calm river
#

Thanks for your reply.

to collect additional information you would need to add custom fields
so I'm assuming that type auto below means that (for example) address.line1 will only ever show up if it's strictly needed to process a payment?

shut shuttle
#

Hi there! Stepping in for @trail wagon as they needed to step away.

#

Yes that's correct, auto means we only collect it if it is necessary.

calm river
#

got it

#

(thanks for stepping in and not letting this thread drop btw)
regarding my second question, if a customer has a card issued from country A but is paying from country B, I assume that's reflected on the form? (screenshot below, for example, where customer location is US but card is Turkey).

  • I see the postal code is removed from the form. If we, for compliance reasons, always need to collect the postal code, how will we know whether or not it's being displayed by the PaymentElement (in React)
#

Or would we, alternatively, use a CardNumberElement
CardExpiryElement
CardCvcElement
and (a custom) postal code element, and send along a postal code whether it's needed or not

shut shuttle
#

The form localizes based on customer location but they would enter their Billing Details associated with the card. There isn't a way to know whether Postal Code would be shown. If you need to always collect it then you suppress it and add your own Postal Code form collection.

calm river
#

got it

#

to summarize:

  • PaymentElement only renders items strictly needed to charge a card, and the text/format of the input fields gets localized
  • A user with a card issued from a different country from which he's viewing the form would see a localized form, but would enter the billing details (country, potentially postal code) associated with the card
  • If we always want to collect a field, like the postal code, we would render our own component and suppress that from showing in the PaymentElement
shut shuttle
#

Yep pretty much. The only caveat is that we collect what we know is minimal but best for the charge. So for instance CVC and Postal aren't always required, but we usually collect them because we know it is best for authorization

#

But yeah, overall you got it.

calm river
#

last question - do the individual elements (like CardNumberElement) also localize?

shut shuttle
calm river
#

wonderful

#

bismark - thank you!