How to get buyers location information before payment?

Hello,

I am just learning the ropes of Square API. I am currently using google pay api and then sending the token to the backend using square API. I am a bit lost on the topic of applying tax correctly. I am from Canada. From my current understanding, I only charge tax on canadian buyers (and also based on their province), else I don't charge tax. (I don't have a nexus in US)

Now to figure out which province they are from, I believe I need to get it from the google token, but I can't figure out how. I think I can get it from client side and I guess I could send it to server, but you can't trust anything sent from the client side unless its cryptographically signed like the google token from google pay. So I was thinking to decode it and get the billing address from there, but I can't figure out how.

Does anyone have any advice for this?

609 Views
Message 1 of 3
Report
2 REPLIES 2
Square Community Moderator

Hi @Sneaky! Thank you for reaching out. Welcome to the Square Community!

 

This is a great question. I went ahead and got this escalated over to our API team to see if they have any guidance on this. As soon as I hear back from them, I will reach back out here. 

 

I am going to tag in a couple of our Canadian Square Champions, as well. Do you all have any insight on this, @LukeNieuw or @Michael_L?

Sammie_C
Community Moderator, US, Square
Sign in and click Mark as Best Answer if my reply answers your question :sparkles:
584 Views
Message 2 of 3
Report
Square Champion

Sorry guys I don't have any experience in this case. 

Luke Nieuwland
Owner/Operator
https://www.whiskyrun.com/
Co-Founder
https://www.lakeeffect.ca/
580 Views
Message 3 of 3
Report