jprouty / mint-amazon-tagger

Tool for labeling Mint transaction from Amazon purchases
MIT License
224 stars 36 forks source link

Use Amazon Payment Transactions Data to Improve Matching #125

Open Mock1 opened 1 year ago

Mock1 commented 1 year ago

I didn't know this until today, but there is a page within Amazon that will show you each literal transaction, with amount, payment method, and Order Number. This seems like it would make the whole matching process significantly easier. https://www.amazon.com/cpe/yourpayments/transactions Sadly, there is no export option, but if the headless browser was primed and logged in, it could navigate to this, scrap each page within a range...

There is also a page like this for Gift Cards, that shows how much GC balance was used on which order: https://www.amazon.com/gc/balance

jprouty commented 1 year ago

Thanks @Mock1 for the pointer! I didn't know about that.

There are a few challenges I see with introducing this transactions page:

  1. Amazon has pretty aggressive rate limiting throughout their properties. (I've verified this on order invoice pages, but not specifically this transactions page you linked). This would make the process either slow, error prone, or both. Worst case Amazon could start flagging accounts or IPs with temporary bans/etc.
  2. This is a new data source that needs to be maintained (ie layout changes, url changes, data modeling changes).
  3. This doesn't simplify the order to transaction process - one order number can have one or more payments.
  4. This doesn't simplify the mint account selection (to reduce candidate transactions) - There is no ready notion to associate Amazon's notion of a payment instrument with Mint's.

The biggest pro is that it appears to have the exact merchant string used to process the payment (which is what you mean by the literal transaction?).

Let me think about it, as I'll likely need to scrape the gift card page to address https://github.com/jprouty/mint-amazon-tagger/issues/59.

Mock1 commented 1 year ago

Sorry for the massively long delay in responding. Thank you for looking at this! 100% agree on 1 and 2. Though for #1, it would be no worse than the option to have the app collect your reports through selenium (vs supply the csv exports directly). For 3 and 4, I disagree. The value I see with this page, it is a _transaction _list__, specifically not an order list. Each transaction is listed, with the appropriate order number and total. That means if you had multiple transactions for a single order, you would see both transactions listed here, both referencing the same order number - which is what is needed to close the gap. It's the perfect bridge between Mint (transaction based) and Amazon (order based). The same transaction matching logic (amount, time frame) then gives you the order number, regardless of how the transactions were split or happened. Including credits (gift cards now show up on this page as well, no need to check the other page). And for relating the charge to a Mint account, the page shows the last 4 of the credit card; which many accounts in Mint are captured the same way. It's not exact, but can be an extra source for any ambiguity with multiple candidate transactions in Mint.

Mock1 commented 1 year ago

Well, I also just caught up on Amazon pulling the plug on the order history reports... The transaction page still works, and seems to be all they are leaving in their wake. It think this can still match Mint transactions to Amazon orders. But sadly not a replacement for the export to know what was in each order. I am super interested in your idea for a new, broader app

jprouty commented 1 year ago

Thanks for your comments @Mock1. I have an interim version of the existing tool that now works with the "Request your data" Amazon export to bridge the gap until the revamped tool is available. Check out release 1.65 and later. Thanks