#Davste-UK
1 messages · Page 1 of 1 (latest)
Hi there, what do you mean by restrict payments to UK only ? is it about accepting only UK cards?
yes. Adding to that, if only UK cards are accepted I need a way to either disable the country dropdown and hardcode it to UK, or hide it entirely
So you want to collect the card details first, and decide whether to create charge or not?
I'm using this: https://stripe.com/docs/payments/payment-element
The card details are collected by the component itself, which "Automatically adjusts input fields to collect information based on the payment method and country."
can I force a specific country as the user is entering their card details? In other words can I just restrict to UK cards?
The payment elements doesn't have an option to accept only UK cards
I'll suggest you to use card element instead.
You can use card element to create the payment method (https://stripe.com/docs/js/payment_methods/create_payment_method), and based on the card's country(https://stripe.com/docs/api/payment_methods/object?lang=curl#payment_method_object-card-country) you can decide if you want to proceed with the payment