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:
"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 bank card.
- Square, Tyro, Stripe, PayPal, etc. will offer secure APIs to pull invoice data as part of the Consumer Data Rights (CDR) initiative.
- Banks, financial-wellbeing services, & other FinTechs will bridge invoice data with banking data - thanks to CDR & Open Banking.
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.
- You're an Upsider ⚡
- You have an account with Up Bank & you've used this to purchase from Woolworths.
- You have an Everyday Rewards account
- Which you've remembered to use when purchasing from Woolworths with your Up Bank account.
-
Head to Up Banking's API page & grab your personal API token
-
Login to Woolworth's Everyday Rewards site & navigate around with dev-tools monitoring network traffic. Filter network traffic with
api.woolworthsrewards.com.au
& find any request that hasauthorization
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.example
to.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',
'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},
...
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 🙏
- 🏧 Support OpenBanking API - aka support for all banks!
- I noticed a purchase that I made with Westpac rather than Up, and after looking through Frollo & CDR I realised that many more banks had begun supporting Open Banking than when I last checked.
- Unfortunately, despite the title "Consumer Data Rights", the process of authenticating myself with these CDR data holders for my own consumer data is a mystery to me. If you know, then please reach out to me.
- [Update] I've learnt that the support/access I'm looking for fell outside the scope of CDR, and banks have no obligation to support it. I would have to hold out for Data Holders or Recipients to provide.
- 👩💼 Talk to someone about Woolworths' API
- I tried reaching out to Woolworths to talk about their API: EverdayRewards support, Quantium (the tech subsidiary managing the program), even cold-messaged people on LinkedIn associate with WooliesX. No luck.
- ⚡ Talk to someone about Up Bank's smart receipts
- A friend pointed out on The Tree of Up a leaf call smart receipts & the existing integration with AfterPay. It would be interesting to hear how it was implemented, & if this proof-of-concept shares any similarities.
- [Update] Dom, Co-founder of Up, gave some insight about Up Bank's smart receipts integration with AfterPay
- 👫 Support 2Up
- Please read help wanted on how you can help push for API support of 2Up.
- ⚖ Interpret item weights
- Weight values are currently supporting deli items only; however, most items include there weight in the item description. It's straight forward to implement - some regex here & there.