NHFA's enrolments keep doubling. We built the system that keeps up.
NHFA trains Australia's personal trainers, and was finishing every enrolment by hand: a sales spreadsheet, six systems to check, and students waiting up to a day for their course.
- Industry
- Vocational education, Registered Training Organisation
- Replaced
- A sales spreadsheet and a 13 step admin checklist
- Scope
- The NHFA Enrolment Engine, from HubSpot deal to course access
- Built on
- HubSpot, built with Claude Code
01 The briefStart every enrolment on the HubSpot deal, then let software do the checking NHFA's admin team did by hand: take the payment, enrol the student in aXcelerate, grant course access in Kajabi, and write every step back to the deal, with a person making every decision.
A student who has paid is not yet enrolled.
NHFA is a Registered Training Organisation selling fitness qualifications across Australia. Enrolments have doubled every year: 418 in 2023, 836 in 2024, 1,688 in 2025 and 1,989 so far in 2026.
Every one of those was finished by hand. An advisor keyed the sale into a sales spreadsheet, where, in Brodie Hicks's words as Head of Operations, it was very easy to select the wrong course
. Then someone in admin checked the student across RTO Apply, aXcelerate, Debit Success, Stripe, Kajabi and HubSpot. Right course, right deposit, right instalments, and the same deal value in every system. Brodie's question for each one was is the deal value the same as what it says in Debit Success and what it says in RTO Apply?
The messy ones took most of the time. Brodie put it this way: They're just like 5% of our enrollments, but they're like 95% of our effort.
Three in four students (75% in July 2026) pay through a Debit Success instalment plan, so most checks meant matching money across two payment systems. Until it was all ticked off, the student waited for course access, sometimes for 24 hours.
And the people doing the checking had a bigger job waiting. NHFA wanted its admin team to become a student success team that calls every new student within 48 hours. Today that first call can take 2 to 4 weeks. NHFA's own AI Use Policy set the terms: An unattended run is permitted, an unattended decision is not.
What NHFA wanted
- Enrolments that start on the deal. The advisor creates it in HubSpot, with no spreadsheet re-keying.
- Money that matches. Every payment tied to its enrolment, across Stripe and Debit Success.
- Course access without the wait. Kajabi opens as soon as a person passes the record check.
- Staff on the exceptions only. Routine checks in software, so admin can call every new student.
HubSpot
Where advisors work every deal.
- Enrolment created from a card on the deal
- Every status written back as deal properties
Stripe and Debit Success
Card deposits, payment in full and instalment plans.
- Each payment tagged with its enrolment
- One settlement path for every payment
aXcelerate
The student management system every RTO reports from.
- Contact and enrolments written by API
- Checked before every write
Kajabi
Where students do their coursework.
- Access granted by API
- Only after a person passes the record check
Six steps, one HubSpot deal.
The NHFA Enrolment Engine is a separate service running next to NHFA's data warehouse, with its own tables and its own tests. It starts on the HubSpot deal and keeps going until the student has course access. We started on 31 July 2026, shipped the first release on 14 September and finished the v1 scope on 13 October.
Start it on the deal
The advisor picks the course, the intake and the payment offer from a card we built on the HubSpot deal, a React UI extension. The card holds no business rules and reads one signed endpoint, so nothing done in a browser can approve an enrolment.
A checkout already filled in
The student's link opens a checkout pre-filled from the deal. They upload evidence, pick a workshop seat, add a guardian's consent if they are under 18 and sign NHFA's Student Declaration in full. They can stop and come back on the same link.
Make the money line up
Pay in full, or a card deposit and a Debit Success plan. Every Stripe payment carries the enrolment reference, and every plan is tied to its plan ID, so a student who comes back to checkout never ends up with a second one.
Set the student up in aXcelerate
Once the money is in, the student's contact and enrolments are written to aXcelerate. A student doing Cert III and Cert IV together has four or more records there, so the Enrolment Engine checks what already exists before every write.
A person checks the record
A named person on NHFA's team passes the record check. Nothing goes to Kajabi until they do, because the setup chain is never allowed to promote a student by itself.
Course access, and the deal says so
Kajabi access goes out and the deal is stamped. Every step along the way writes to 26 custom deal properties, which feed six admin views in HubSpot and tasks for the deal owner, due by 5pm.
What software does, and where a person decides
The Enrolment Engine takes payments, writes records and grants access. A person on NHFA's team passes every record check, works every exception it raises, and can be rung by the student at any step.
The v1 scope was finished about eleven weeks after the build started.
Built with Claude Code, decided by people.
We built the Enrolment Engine with Claude Code: 210 merged pull requests in about 11 weeks, backed by 723 tests. The running service makes no AI calls, as NHFA's policy asks. Claude's job in production is to check the reporting each morning, and to report what it finds.
- 01
An advisor closes the sale on the HubSpot deal and starts Alex Example's enrolment from the deal card. Alex is a made-up test student.
- 02
MessageMedia texts Alex the enrolment link. The same link works if Alex stops halfway and comes back.
- 03
Alex fills in the checkout: evidence, a workshop seat from a count that subtracts bookings since the last sync, and NHFA's Student Declaration, signed and kept append only.
- 04
Alex pays a $500 deposit on card through Stripe and signs a Debit Success plan. Both are read back on return, and a sweep settles any payment left behind after 30 minutes.
- 05
Alex's contact and enrolments are written to aXcelerate, each job keyed so it runs once, after checking what is already there.
- 06
The LLND quiz: the Enrolment Engine reads whether Alex finished it, never the score. The poll is built, and not yet scheduled.
- 07
A named person on NHFA's team passes Alex's record check. Nothing after this step runs without it.
- 08
Kajabi opens Alex's course. By hand, this step took up to 24 hours.
- 09
Every status along the way is written back to the deal, so the advisor and the admin team see where Alex is without opening another system.
Start
The advisor's choices on the deal card become a checkout link.
- Signed request from HubSpot, checked on arrival
- Checkout pre-filled from the deal
- Unpaid links expire after 30 days
Settle
A payment is settled by one path, whoever triggers it.
- Enrolment reference in every Stripe payment
- One Debit Success plan per enrolment
- A sweep every 10 minutes for closed tabs
Set up
aXcelerate and Kajabi are written by jobs that can safely run again.
- Each job keyed on the enrolment and job name
- Three tries, then a drafted next step for a person
- aXcelerate checked before every write
Report
Staff see where every student is from HubSpot.
- 26 custom deal properties
- Six admin views in HubSpot
- Tasks for the deal owner, due by 5pm
The code behind it, in plain English
Four short excerpts from the NHFA Enrolment Engine. You do not need to read the code. The note beside each one says what it does and why it matters.
The stages a record can move through
Every enrolment has a status, and this table is the full list of where each status is allowed to go next. Anything not on it is refused.
The money line runs through it. A paid record has no path back to a new link, so an advisor reissuing a link can only ever replace one that has not been paid.
// src/lib/store.js
/** Legal next statuses. */
const TRANSITIONS = {
link_sent: ['opened', 'superseded'],
opened: ['started', 'superseded'],
started: ['payment_pending', 'superseded'],
payment_pending: ['mandate_pending', 'awaiting_review', 'superseded'],
mandate_pending: ['awaiting_review', 'superseded'],
// Everything below is after the money.
awaiting_review: ['active', 'awaiting_student', 'rejected'],
awaiting_student: ['awaiting_review', 'rejected'],
// ...
active: [],
rejected: [],
superseded: []
};
Setup that is safe to run twice
Each setup job carries a key made of the enrolment reference and the job name. A key that has finished never runs again, so a retry after a failure only re-attempts what is still outstanding.
Three failed attempts stop that student's chain and give a person a drafted next step. The rest of the chain waits, so a student is never half set up.
// src/lib/jobs.js
const ATTEMPTS = 3;
for (const job of stage) {
const key = `${ref}::${job}`;
if (completed.has(key)) continue; // finished once, never again
// ...
const patch = await attempt(ref, job, record);
if (patch === HALTED) return jobStates(ref); // halt this enrolment's chain
// ...
completed.add(key);
}
The student who pays and closes the tab
v1 has no Stripe webhook. A student who pays and closes the tab before returning would leave a paid record sitting at pending, with the money already in.
So every 10 minutes, any payment older than 30 minutes is walked through the same code a returning browser uses. We kept it to one path on purpose: two ways of settling a payment is how a student gets charged twice.
// src/server.js
const SWEEP_MIN_AGE_MS = 30 * 60 * 1000;
const SWEEP_EVERY_MS = 10 * 60 * 1000;
// ...
for (const record of eligible.slice(0, SWEEP_MAX_PER_TICK)) {
// the SAME settlement path a returning browser takes
await payReturn({
params: [record.ref],
url: new URL(`/e/${record.ref}/pay/return`, origin)
});
// ...
}
Evidence nobody can edit
The app connects to its database as a role that does not own the tables, so these revokes are real. It can add a signed declaration, a signature or an audit entry, and it can never change or delete one.
NHFA is audited on its enrolment records. A declaration the software could rewrite would not count as evidence.
-- migrations/001_enrolment.sql
-- A signed declaration is evidence. Nobody amends it, including us.
revoke update, delete on enrolment_declaration from nhfa_enrolment_app;
revoke update, delete on enrolment_signature from nhfa_enrolment_app;
-- The trail is append-only for the same reason.
revoke update, delete on engine_audit from nhfa_enrolment_app;
revoke update, delete on enrolment_transition from nhfa_enrolment_app;
Fails safe
Every outside system can fail, so each call has a plan for when it does.
- Three tries, then a person and a drafted next step
- A sweep picks up payments a browser never confirmed
- A restart remembers every finished job
Student data stays put
Enrolments carry names, dates of birth and payment details.
- HubSpot card requests checked by signature
- Alerts carry a reference and a fixed reason, never a name
- The USI never enters a prompt
A person decides
NHFA's AI Use Policy, written into the code.
- No AI call in the running service
- A named person passes every record check
- A phone number the student can ring at every step
723 automated tests
Across 75 test files, covering payments, stages, setup jobs and HubSpot.
- Full suite and a smoke walkthrough before every release
- The server confirms it is running that exact build
- A go-live runbook for switch-on and rollback
Shown with test data, a made-up student, on a local copy with every outside system switched off.
Claude wrote the code with us and checks the reporting every morning. On NHFA's own Anthropic key, Claude runs an adversarial check of the reporting page each day and emails the result, looking for numbers that do not add up. It reads results only. Every decision in an enrolment is made by a person.
Software does the checking, the team does the calling.
Four rules, set with Brodie at the start. The third one came from NHFA's own policy.
Start on the deal, Why HubSpot is where every enrolment begins
- Advisors already work every sale in HubSpot, so the enrolment starts on the deal they are looking at.
- Every status comes back to the same deal, so nobody checks a spreadsheet to see where a student is.
One path for every payment, How a student never pays twice
- The sweep and the student's browser settle a payment the same way, through the same code.
- A paid record can never be replaced by a new link.
An unattended run, never an unattended decision, Where software hands back to a person
- A named person passes every record check before Kajabi opens.
- Three failed tries stop the chain, and a person gets a drafted next step to action.
Prove it before a real student, How every payment path was tested
- Every payment path ran on test and sandbox accounts, across all six systems, before switch-on.
- Go-live is one live test enrolment, then one advisor, then the whole team, as Brodie asked:
We're not in an absolute rush, so I'd rather take the time in getting all of these kind of T's crossed and I's dotted...
A sale on the deal in, a student in their course out.
Still finishing enrolments by hand?
Four goals. What we built for each one.
What NHFA asked for before the build started, and what the Enrolment Engine does about each. Every path was proven on test accounts before switch-on. Live numbers follow once students are through it.
Goal 01
Enrolments that start on the deal
Advisors create the enrolment from a card on the HubSpot deal, and the student's checkout is filled in from it.
1 card
One card on the deal replaces the sales spreadsheet. Tested end to end with a made-up student, from the card to the texted link and a filled-in checkout.
Goal 02
Money that matches
Every Stripe payment carries its enrolment reference, every plan its plan ID, and one settlement path handles both.
1 path
Pay in full and payment plans settle through one path, proven on test and sandbox accounts, with a sweep every 10 minutes for checkouts left open.
Goal 03
Course access without the wait
Kajabi access goes out by API as soon as a person passes the record check.
By API
Proven with a Kajabi grant on a test student. By hand, access took up to 24 hours.
Goal 04
Staff on the exceptions only
Six HubSpot views and tasks show admin only the enrolments that need a person.
26
26 custom deal properties track every enrolment, so the six views list only the ones a person has to touch. Brodie's target: 90% of the time, no human intervention required.
Before switch-on, every payment path was proven on test and sandbox accounts, across 6 systems and 26 custom deal properties, including a Kajabi grant on a test student and a real aXcelerate test-intake enrolment. Brodie's reaction to the payment checks: from an operations perspective, super stoked with that.
Once it is live, an enrolment starts on the HubSpot deal and stays there. With the routine checks in software, the admin team can call every new student within 48 hours, and NHFA's enrolments can keep doubling without the checking doubling too.
Next is the stretch Kim Horner, NHFA's CEO, named herself: invoicing and payment matching, on the same deal record and the same tested code.
“It's so long that we've been wanting for something like this, and really great to have a fully sort of integrated in-system solution, not using a third-party thing...”Kim Horner CEO, NHFA.
Who ran it
Alex BaileyDigital Strategist
Ran the build day to day with Brodie and the NHFA team, built the Enrolment Engine with Claude Code and closed the v1 scope.
Trav WhiteFounder and Head of AI Engineering
Owns NHFA's AI Blueprint partnership with Neighbourhood, which the Enrolment Engine is part of.
Six systems, one HubSpot deal?
The neighbours next door.
The closest builds to this one, ranked by industry, HubSpot hub and service.
