Blanque Cheque

Rebuilt for a differently shitty world…



In a previous era I had written a tool called “blanque cheque”. It stemmed from attempts to get direct deposit set up and a contract payroll company assuming that I was an idiot. In a fit of PHP I whipped out that badboy and it could be summarized as “it got the job done.” I certainly wasn't going to win any awards for code composition, efficiency, etc. Then again, it was 2009 and I'm not a developer.

The purpose of blanque cheque was just to generate a one off check suitable for printing. At this point it could be emailed, faxed, or dropped in the mail and would (hopefully) satisfy the recipient.

The original project was nonetheless interesting because it got into lots of interesting nuances of how checks are processed. In the years since, I've talked to homies at Stripe & Square and over beers we've commiserated about how the global payments system is absolute shit.

Due to the aggressive use of PHP and a relational database I had written off the tool as never to be brought back online after moving to a static site. I've toyed around with the idea of turning it into a serverless application but didn't really give enough of a shit.

This past weekend a friend asked about it (dealing ten years later with the same original challenge). After finishing up another big project I decided it was time to do a little “maintenance engineering.” Beyond that it was an excuse to dig into new technologies.

The re-write

The web has made a number of improvements over the last ten years which made this much easier. Web fonts are now a thing, so I didn't need to render images of MICR text. CSS2.1 was finally ratified which meant that everything could be styled much easier. EMCA 2015 came out. Finally, WHATWG revolved have resovled their beef with the W3C.

About 10 minutes into this (after thinking of the previous improvements) I thought “Why in the hell does this need a database in 2019?". Turns out that was a good question. One of the neat features for me was always the ability to validate the ABA number (aka the “Routing Transit Number”) of the check. At the time I pulled the ACH information from the Federal Reserve's website (yes, the ACH information… more on that later) and then leveraged my awk-fu to get it into a MySQL instance. At the time “LAMP” was still the common platform for basically every hosting provider so it got the job done in no time.

Thinking through this I came to the realization that, as IndexedDB and fetch are now “a thing”, I could take a stab at using those. Even better, it comes with the added benefit of executing only in the local browser without making network calls (after assets are retrieved to the browser).

At this point the tool works and actually has improvements over the original. It comes at the expense of having to write Javascript (yuk) but at the benefit of removing some PHP from the world (yay!)

Some words of warning

Before you go shotgun blast using this, you should definitely know what you're getting into. ABA and ACH numbers each have their own nuance. For more information on that check out this post by Transferwise. In the same way that a parallelogram may be a rectangle, a square, neither, or both things can get tricky. Needless to say though that if you dig into it, you should be able to connect the dots.

In December 2018 FRBServices removed public access to the E-Payments Routing Directory I used a decade ago. Fortunately I had a batch job pulling it down up to that point. What does that mean? Stale data. Although, you can always decide to pay FRBServices if that's something you're really into, I guess.

On to the tool

The tool is available at the following address. If you need to test it out, 021001208 is the code for the Federal Reserve. It does some basic length validation along with other stuff. There are only a few assets needed to make use of Blanque Cheque:

  • The HTML file
  • The MICR web fonts (included in woff and woff2 formats)
  • fed.json

The tools is released under the Affero GPL v3 License. If you only want to play around or use it, it can be accessed under the following link:

If you would like to download the assets to play along on your own system:

The CSS should hide the form at the bottom when time to print.