Costco debt collection

Collecting debts from friends by using API composition.

Image of Puya Moayer
Puya Moayer
Jun 5th, 2019

dolla dolla bill ya'll. Source:

Origin story#

I'm a 22-year-old college grad and I own both a car and a Costco membership. Thanks to this, every other week it falls on me to ferry five friends to Costco, proxy shop for three other friends, pay with my membership, and then spend six weeks badgering all eight for my money. Seeking salvation, I wrote a Transposit app to track debts and automatically send "friendly" reminders to my debtors.

hosted app page

Since I'm a recent college grad, that pretty much means I have a lot of learning to do. Some of you may choose to interpret that as meaning I know nothing, and you're not really wrong. But even with minimal experience, I had my app up and running from scratch in under eight hours. So despite my lack of knowledge, with Transposit I managed to host a webpage, handle forms and inputs, store the inputs in Airtable, and (very) regularly send notifications to my debtors. Although this technically does makes me that guy who spams friends, let us focus more on guessing which part actually took the longest.

it's not spam if it's justified

How the app works#

At a glance, the app is pretty simple. Friend goes to the app, signs in with their Google account, adds or edits whatever items they desire, those edits are taken and stored in Airtable, and finally a scheduled task sends collection emails. Quick, clean, effective, and painful.

During the process several issues arose:

  • I had never used JavaScript, promises, or API endpoints
  • I have no clue how to host a website
  • what the heck is OAuth 2.0 flow
  • cron jobs are innately nightmares
  • I need my friends to actually be nice and provide reliable input
  • eventually I want to add text messages and phone calls

The first points are pretty self-explanatory since I can't really have a web service without JS or hosting. Then there's both authenticating with GMail in order to send anything and my personal grudge with cron (we've just never gotten along). Also, it is possible my friends hold grudges too and will try to break my app.

Spaghetti code!

So, how long did it take a web programming newbie to figure it all out?#

Out of the eight hours, I spent seven hours on the HTML layout. No, I'm not proud of myself but the point is that implementing the actual authentication and API calls for both Airtable and GMail took under an hour… with no previous knowledge of how to do so.

JS operation in Transposit to query Airtable for a user's items

That's the benefit of Transposit. All I personally had to struggle with was learning JavaScript and some React, so imagine if you're smarter than me and already know them! Also, as more notification APIs get added to Transposit, I can easily modify the app to incorporate new services and become more a̶n̶n̶o̶y̶i̶n̶g effective. I actually have plans to use the Twilio API connector and send some nice texts to go with the friendly emails.

As for my Costco trips nowadays, I proxy shop at Costco for eight friends and it's possible they don't like me as much anymore. But guess who gets their money on time, most of the time. 😎