#rtj-paymentmethod-country
1 messages · Page 1 of 1 (latest)
rtj-paymentmethod-countr
rtj-paymentmethod-country
@devout pawn what do you mean "certain country" Like based on their billing details? Something else?
I want the setup intent to succeed only if the payment method's billing address is US
Based on billing address - yes
okay so are you collecting the billing address? Because we don't for card payments
we collect the country and postal code, but the full billing address, and that's assuming you use PaymentElement
is that what you're using?
Yes that's right. I am collecting the country and postal code.
are you? Or do you mean you use PaymentElement and we do it
I use the payment element to collect the billling details - card information + country + postal code.
Let me ask a question that is more up my alley - is there some field in the setup intent API using which I can block creation of intents for non-US payment method?
no
There are many different ways to do this, which is fundamentally based on how you integrate
@devout pawn if you explain why you're trying to block non-US payment methods, it'll be clearer how to achieve what you want to do
I don't think the why is important
There are 3 options
1/ Switch to https://stripe.com/docs/payments/accept-a-payment-deferred?type=payment#create-pm and look at the PaymentMethod and its billing_details[country] and only call confirmSetup() if it has the right country
2/ Just let it through, block after
3/ Use Radar and do a custom rule to block cards with the wrong country
#1 is the easiest 🙂