BPAY QR Code

BPAY is an electronic bill payment system in Australia which enables payments to be made through a financial institution’s online or telephone banking facility to merchants who are registered BPAY billers.
BPAY, Wikipedia

To pay for a bill, you need a Biller Code and Reference Code which are numbers with varying number of digits. This information is printed on the paper bills for instance where you can use them when paying for the bill online. It’s only recently that BPAY has rolled out a QR Code standard to ease the entering of these numbers in bank phone apps.

I wanted to know how the BPAY information was encoded so I could transfer my existing Biller and Reference codes to my phone without manual error. Unfortunately I couldn’t find anything online. The easiest way I thought was to figure out how my phone app reads it. The only bank right now that has an app with BPAY QR Code scanning functionality is Commonwealth Bank. So I copied the app out of the phone, disassembled it using apktool and went digging.

Commbank app uses the ZBar library to read QR Codes. So I downloaded ZBar’s sample apps to see what comes out of the library. Just raw text read from the image. Couldn’t be simpler. Then I had to do a short walk of the code that followed the ZBar decode call and I had the format in 15 minutes:

bpay.com/p 1=biller 2=reference 3=amount

biller and reference are numbers with no spaces. amount is a number with optionally a decimal point with no spaces. Commbank app doesn’t seem to mind if any of the components, or even all, are missing. The number of spaces between the components doesn’t seem to matter either (must at least be one).

BPAY QR Code examples, generated by the awesome Inkscape. Read on for details.

In the above examples, the left QR code is for Biller Code of 75556 (which is ATO), Reference Code of 56789123456 and amount of $56.33:

bpay.com/p 1=75556 2=56789123456 3=56.33

And on the right, Biller Code of 3111 (which is Energy Australia), Reference Code of 88888888:

bpay.com/p 1=3111 2=88888888

I can’t think of any use case other than the one I mentioned above. But I believe in openness and all the goodness that comes with it.