简体   繁体   中英

Adding IBAN defaults to stripe's PaymentElement

The react-stripe-js IbanElement offers options like supportedCountries and placeholderCountry :

<IbanElement
  ...
  options={{
    supportedCountries: ["SEPA"],
    placeholderCountry: "DE",
  }}
/>

but the recently published PaymentElement does not :

<PaymentElement
  ...
  options={{
    ???
  }}
/>

Is there a way to add these defaults to a PaymentElement whose clientSecret is configured with sepa_debit in its payment_method_types ?

For Payment Element, supportedCountries does not need to be defined as Payment Element automatically determines which payment methods to display [0], based on:

  • The customer's location.
  • The product's currency.
  • Your Dashboard settings on which payment methods to accept [1].

The placeholderCountry is not available for customisation.

[0] https://stripe.com/docs/payments/payment-element
[1] https://dashboard.stripe.com/settings/payment_methods

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM