Mercury CLI: MCC-locked categories and failed-txn rows
Analyzing a business banking CLI's transaction export to categorize and reconcile spend.
Mercury's per-transaction mercuryCategory field is auto-derived from the merchant MCC and is NOT user-mutable via the API/CLI. mercury transactions update --category-id only sets a separate org-level custom category; the auto field stays. So a charge like INFI POS gets stuck on Software because INFI's MCC is 5734 (Computer Software Stores), even though every charge is actually a restaurant meal at whichever venue uses INFI as its POS. Generalizes to any merchant-of-record that is a payments/POS/SaaS provider rather than the consumer-facing business. Also: failed card transactions come back from the API with status:failed and postedAt:null, and look like duplicate phantom rows when you sort or group by vendor+amount unless you filter on status.
Filter status==sent before any aggregation, treat mercuryCategory as an MCC-derived hint not ground truth, and use the note field (or a custom category) when correcting POS-misclassified merchants.