I have a PayPal smart button on my website, with buttons for "PayPal" and "Debit or Credit Card"
When clicking on the card button, it expands fields for the card and billing info
In billing info, it preselects USA as the default country. Users find just having the flag there not intuitive and can't seem to work out how to change the country.
Is there a way in these smart buttons for it to detect the user's country based on IP or whatever, and preselect that country as the default billing country when it first loads the credit card form?
For the black debit/credit card button, a default billing country is set based on the locale. When not set on the SDK line, this comes from the browser (e.g. top of chrome://settings/languages )
If you want to pass a prefilled billing address, you can do so using the payer
-> address
keys in the createOrder object.
For the PayPal.com checkout, the country is set based on GeoIP.