I had a play with Receipts in Email and Attaching them to Receipts

(NM) #1

I had a play with email receipts primarily, steam receipts and extracting a receipt through an Email Parser.
And I’ve come up with this,The screenshots are attached.
The next question however it how I get this to play nice with the Receipt API does anyone know if the Receipt API is read for this type of thing.

Also I get there is an annoying symbol before the pound sign and the VAT repeats

(Jordan Taylor) #2

The weird character issue will most likely be down to encoding.
Make sure you convert to UTF-8 :slight_smile:
Not looked into the receipts API yet, but I presume the price will likely be a type set as decimal and then a currency code is passed, to stop issues like this.

(NM) #3

Unfortunately I can’t specify the encoding as I’ve deliberately done it as a jpg in order to directly attach it and I’m using a third party parser to parse the email so can’t specifiy the encoding(back to the drawing board :rofl::sunglasses::weary:

(Tony, Secret Lemonade Drinker) #4

Monzo Receipt API:

(Tim) #5

Hey :wave: We haven’t quite added the new receipts API to our public developer documentation yet. I’ve just submitted a Pull Request for this, hopefully it will be reviewed this week :blush:

(Jolin) #6

If it’s like the rest of the Monzo API, it will be an integer expressing pence (so total for the above receipt would be 574).

If the parser is consistently prefixing £ with Å, then it should be simple to filter out after you have the text. I don’t have time to look into this at the moment, but what parser are you using, and what language to tie it all together?

(NM) #7

I actually borrowed the parser from Zapier in order to data scrape the receipt. And yes it might be worth just to grep the symbol out of the jpg.

(Jolin) #8

Just had a quick search, and this blog post on Zapier provides some other options for email parsing:

(NM) #9

Ah thank you :slight_smile:

(Tom Halloran) #10

This idea could tie in nicely to Monzo’s talk of offering insurance products.

e.g you buy a TV from John lewis, forward the receipt to your Monzo account which gets synced to the transaction, then the TV is recorded as covered by your Monzo home insurance / device insurance etc

(NM) #11

The question would be how you link the transaction IDs across platforms…as an external transaction ID I don’t think would match a Monzo one. You probably could do it off transaction time and amount etc.

(Tim) #12

Here we go! :open_book:

(Tom Halloran) #13


(Tom Halloran) #14

Yeah you would have to guess the transaction to match with using amount. But that should be doable as they’d be exactly the same and very specific e.g. £23.42

(NM) #15

True then again I don’t know if the two become linked in the one transaction