API function to detect visitor country

Cash App Pay currently only works in the US, and AfterPay only works in the US, CA, AU & UK. Both ‘Cash App Pay’ and ‘AfterPay’ should not appear as payment options for customers outside of the aforementioned geographies.
so, is there any API function to detect the visitor country or web-payment-sdk callback function for it?

Are customers seeing the button in unsupported regions? :slightly_smiling_face:

Yes, the customers seeing the button in unsupported regions.

I believe this is the expected behavior. For example a seller can offer Cash app pay in a region where Cash app isn’t supported. However the customer can be a customer from a region where it is supported and have Cash app to complete the payment. :slightly_smiling_face:

Thank you for the reply @Bryan-Square
No, the buttons appear in every country when it is enabled.
My question is, did you have an API function or web-payment-sdk callback to detect the visitor’s country?

At this time we don’t have a callback that will detect the customers country. :slightly_smiling_face: