#dmitry-card

1 messages ยท Page 1 of 1 (latest)

kindred willow
#

So in your case it would need to happen after step 6, which I guess would be too late. So you have two options:

  • Ask the customer up front what is the card country
  • Or instead of using a PaymentIntent (to make a charge and save the card), use a SetupIntent (to only save the card). Then make a charge only if the card match your criteria.
charred copper
#

Earlier in this chat, I was advised against using SetupIntent in this case, because it could lead to two charges in quick succession (one $1 charge for confirming the card, and the other for the actual payment), and that can lead to higer decline rates

#

As for asking the customer upfront, this doesn't seem reliable. What's preventing the customer from providing false information?

kindred willow
#

When creating a SetupIntent, no charge should be created.
In general, if you have the choice between doing a PaymentIntent with setup_future_usage and a SetupIntent followed by a PaymentIntent, then yes we would recommend the former. But since you want to check the card country, you should do the later.

charred copper
kindred willow
#

Oh right, this may happen, but this is a temporary charge that will disappear from their statement.

charred copper
#

Plus, using SetupIntent + confirming the card might trigger a 3DS challenge. And then, when we take the actual payment, in may trigger another 3DS challenge. Two 3DS challenges on one page may be super-confusing for the customer

minor oxide
#

Hi ๐Ÿ‘‹ jumping in as my colleague needed to step away.

#

The smoothest way that I can think of to achieve this, is to leverage Radar for Fraud Teams to build block rules that block payments from countries you don't permit.
https://stripe.com/docs/radar/rules#block-rules

But I'm also looking for alternative approaches.

Write fraud prevention rules specific to your business.

charred copper
#

We want to add validation based on our backend business logic (ie enable some countries for certain customers)

minor oxide
#

Gotcha. I'm doing some testing and it looks like the country of a card payment method is populated as soon as the payment method is created, but I'm not sure how likely it is that it will be updated during validation.

If you want to be sure the information has been validated before using it to make a payment, then starting with a Setup Intent is going to be the best approach. It is possible that doing so could result in two 3DS popups, but you can leverage this flow to minimize the chance of that occurring by making the Payment Intent off_session.
https://stripe.com/docs/payments/save-and-reuse
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session

Learn how to save card details and charge your customers later.