I’m developing a small (read: used by family & friends) web application to manage personal expenses, and would like to add the ability for users to upload receipts emailed to them from Square. It’s easy enough to read the HTML from a forwarded email to get the merchant, purchase date, and total, but because Gmail changes class names when an email is forwarded, it’s harder to parse out individual items. (Getting items from the original email is easy, because the table tag class names have a nice pattern.)
That said, it’d be much more elegant to call an API to get this information. E.g., one of my receipts is https://squareup.com/r/arZs00XpxHj9F32FfVhhqgkHw7uaB. It’d be great to pass arZs00XpxHj9F32FfVhhqgkHw7uaB
as the argument to the API and to get out a JSON of total, items, tax, etc.
Is this or something like it possible if I don’t myself process square transactions?
Thanks in advance!