#Dakata-EU-Card only

1 messages · Page 1 of 1 (latest)

gusty smelt
#

Hi there, are you using card element in your integration?

torpid creek
#

@gusty smelt yep, @stripe/react-stripe-js to be more precise

gusty smelt
torpid creek
#

So we create the payment method despite its issuer, but we issue payment only if the card is from given country (or not)

#

can we avoid the creation completely, like executing createPaymentMethod and tell stripe: save only cards from this type, country etc

gusty smelt
#

You can check the card country first before creating the paymentIntent creation

#

In summary

  1. Call stripe.createPaymentMethod to get the PaymentMethod object
  2. if the card.country is a EU country, create a PaymentIntent with the payment method, otherwise inform the customer to use another card.
  3. Call stripe.confirmPayment to confirm the PaymentIntent
torpid creek
#

Thank you, makes perfect sense, will try it right away

#

cheers!

gusty smelt
#

Happy to help 🙂