Bridging Up Bank with Woolworths purchases.
up_woolies
Retrieve an itemised breakdown of transactions at Woolworths made with your Up Banking Account. This is a proof-of-concept & the graphic below is a fantasy of how I imagine digital receipts could be presented in-app:
motivation
"My bank app tells me I spent $19.00 at the grocery store... I wonder what I bought..."
I predict that banking apps will one day provide customers with itemised receipts in-app. It's a big call but when I look into my crystal ball I see that;
- Point-of-Sale and payment providers will host the digital receipts/invoices of the transactions you've made with your
- Square, Tyro, Stripe, PayPal, etc. will offer secure APIs to pull invoice data as part of the
- Banks, financial-wellbeing services, & other FinTechs will bridge invoice data with banking data - thanks to CDR &
The FinTech space is generating a lot of interesting products around the idea of financial-wellness. Up, Douugh, Frollo, WeMoney, and other platforms offer tools to track spending habits - some using "AI" & data-driven tools to help consumers. Surely, these platforms would benefit from having greater granularity to purchases; it is hard to distinguish purchase behaviour from knowing only the vendor & not the items.
I wanted to make a proof-of-concept using Up Bank's well-documented API & one of, if not the largest Australian grocer: Woolworths. In short, Woolworths' Everyday Rewards API is closed-source & painful to look at. However, they do provide customers with ✨e-receipts✨, which is more than I can say for their competitor, Coles' FlyBuy program.
requirements
- You're an Upsider ⚡
- You have an Everyday Rewards account
getting started
- Head to Up Banking's API page & grab your personal API token
- Login to Woolworth's Everyday Rewards site & navigate around with
api.woolworthsrewards.com.au & find any request
that has authorization header.
N.B. the authorization bearer token expires after 30 minutes; you'll need to repeat the process if that occurs. It's pretty frustrating but if you think you can help improve this please help wanted section & reach out.
- Copy
.env.exampleto.env& place those three tokens inside:
WOOLIES_TOKEN=8h41... UP_TOKEN=up:yeah:1234abcd...
- Run
src/up_woolies/main.py, look around & have some fun!
$ python main.py
{'date': '2020-12-31T10:13:58+11:00', 'partner': 'woolworths', 'items': [{'amount': 0.94, 'description': 'Tomato Truss Red', 'quantity': None, 'weight': 0.242}, {'amount': 2.39, 'description': 'WW Drought Relief Whole Milk 2L', 'quantity': 1, 'weight': None}, ...
help wanted
I'd love help with handling Woolworth's authentication process 🔐 I spent quite some time trying to understand how Woolworth's authentication endpoint operates - reading client-side js files, figuring out their device-fingerprint workflow, trying to see if it matches up with some common OAuth practice. Obtaining a user's client_id & bearer token via accounts.woolworthsrewards.com.au/er-login/validate-user from their email & pass is the ultimate goal. Any help would be great; I'd love to learn how that works. I'm interested in a http-request solution rather than simulating a browser; e.g. selenium, playwright, etc. [Update] A login endpoint was shared to me via the repo's issues. It worked like a charm, allowing user/pass flows. However, it suddenly started returning 403s & I have yet to find a work-around.
I'm holding out for Up Bank to provide API support for 2Up (& multiplayer when that is released). You can help by reacting to the pending feature request PR and, if you're an Upsider, suggest the feature through support chat in-app 🙏
the graveyard of ideas
- 🏧 Support OpenBanking API - aka support for all banks!
- 👩💼 Talk to someone about Woolworths' API
- ⚡ Talk to someone about Up Bank's smart receipts
- 👫 Support 2Up
- ⚖ Interpret item weights