DEV Community

Jasveer Singh
Jasveer Singh

Posted on Originally published at github.com

The GST/HST you collect was never yours — so I built a tiny tracker for it

Canadian freelancers learn two GST/HST lessons the expensive way.

Lesson one: the money was never yours. When a client pays you
$5,000 + $650 HST, the $650 feels like income for about a quarter.
The CRA's own page puts it plainly: GST/HST you collect is held
in trust
for the Crown until you file your return and remit it
(CRA, "Charge and collect the GST/HST", canada.ca — checked
2026-11-04). Spend it as it arrives and the deadline turns into a
collections problem.

Lesson two: the $30,000 line. Stay under $30,000 of taxable
supplies across the previous four calendar quarters and you're a
"small supplier" — no registration required. Exceed it and
registration becomes mandatory; exceed it inside a single quarter
and your status ends immediately before the supply that crosses
(CRA, GST/HST Memorandum 2-2 "Small suppliers", ¶9 and ¶11 —
checked 2026-11-04). Registration then has its own deadline:
apply within 29 days of the effective date (Memorandum 2-2, ¶52,
Example 11). People cross this line mid-quarter, invoice as
usual, and find out at filing time.

I built the tracker I wanted for this:
gst-hst-tracker
— one Python file, zero dependencies, reads one ledger file you
own (JSON or CSV), and answers three questions:

pipx install git+https://github.com/jasveerai88/gst-hst-tracker

gst-hst-tracker report ledger.json      # what to set aside, per quarter
gst-hst-tracker threshold ledger.json   # how close is the $30,000 line?
gst-hst-tracker provinces ledger.json   # what each province's system does
Enter fullscreen mode Exit fullscreen mode

The report is the set-aside number: per calendar quarter,
GST/HST collected, ITCs, and net tax owing = collected − ITCs,
plus a T2125-style prep summary. The threshold command prints
the rolling four-quarter window quarter by quarter, the headroom
left — and exits 1 when you cross, so a cron job or an agent
can catch the alarm without parsing prose. Exactly $30,000 does
not cross: the statute's word is exceeds, and the tool follows
it literally.

The provinces are where honesty gets hard

The rate follows the place of supply (CRA, "Charge and
collect the GST/HST"), so one ledger holds GST-only sales, 13%
Ontario HST sales, and Quebec sales with QST on top. The encoded
defaults — GST 5%; HST 13% ON, 14% NS (lowered from 15% on
2025-04-01, CRA Notice 342), 15% NB/NL/PE; QST 9.975%; BC PST
7%; SK PST 6%; MB RST 7% — are stamped "as of 2026-11" in every
output and overridable per run.

The design rule I would not bend: estimates are labelled
estimates, and they never touch the owing number.

  • Quebec's QST is a separate Revenu Québec tax. Recorded QST is a memo only — it never enters the federal net. QST on sales where you recorded none is shown as an estimate, labelled.
  • BC/SK/MB provincial tax on your sales is an exposure estimate (rate × sales) — a sizing figure for what provincial registration could mean, not an amount owed. PST you paid on inputs is generally a cost, not a credit, so no provincial ITC is computed. Inventing one would flatter the net and lie to the user.

The boring parts that matter

  • 77 tests, every expected value hand-worked. The test suite's header contains the full hand calculation for the multi-province sample. Expected numbers copied from the tool's own output would prove nothing, so none are.
  • Agent-shaped output. Every command takes --json and emits one object; errors — including argparse errors — are {"error": ...} with exit 2. The threshold's exit code is the verdict.
  • Rates are dated, deadlines are not stated. The tool stamps its rate defaults and refuses to print filing due dates: those depend on your assigned reporting period, and a confident wrong date is worse than none. CRA publishes them; the tool's job ends at the figures.

It is a tracking aid, not tax advice and not a filing — the
disclaimer is in every output and it is load-bearing.

Repo: https://github.com/jasveerai88/gst-hst-tracker — MIT,
Python 3.10+, standard library only. If you freelance in Canada
and your current system is a spreadsheet you update when you
remember, I would genuinely like to know what it fails to tell
you.

Top comments (0)