Payments and self-service · Vocational training

Instalment plans, payments and passwordless access

Instalment plans recorded with the exact terms accepted, each later payment logged with its receipt attached, and a passwordless way for trainees to check their balance.

Swimlane diagram. A representative submits an instalment plan on the member portal; n8n checks the shared secret and the terms, refuses anything invalid, and creates the agreement in Airtable with a snapshot of the accepted terms. Each later payment is validated for amount, currency and receipt file, then recorded with the receipt attached and an audit entry. When a trainee asks to view their plan, n8n finds the agreement, stores a code session and emails a six-digit code to the registered address. The code expires after ten minutes and five wrong attempts lock the session for fifteen minutes. A correct code issues a one-hour token and the portal shows only a whitelisted set of agreement fields.
How the information moves. Colours show what travels along each line; numbers match the steps below. Select the diagram to open it full size; on a small screen it also scrolls sideways.

The problem

Some trainees pay in instalments, arranged through a representative. Finance needs complete, consistent details and a record of exactly what the trainee agreed to. Later payments arrive with a receipt that must be matched to the right agreement. And trainees want to check balances, due dates and whether a receipt has been reviewed, but many do not have, or do not remember, a portal password.

How it works

  1. Agree the plan. The representative submits the plan with the first receipt. The request is checked, amounts must be positive and a receipt file must be included. The agreement is created with its finance and review statuses, the identity of the representative, and a snapshot of the terms text and version at the moment of acceptance.
  2. Record each payment. A later payment is validated for agreement, amount, currency, method and file, recorded as pending finance review and classed as a remaining or extra payment. The receipt is uploaded straight into the payment record, the agreement moves to “under review”, and an audit entry stores both a machine-readable snapshot and a readable summary.
  3. Ask for a code. A trainee enters their email or phone number. The input is normalised, including Arabic-Indic and Persian digits, the agreement is found, and a six-digit code is emailed to the registered address. The page sees only a masked version of that address.
  4. Verify and view. The code expires after ten minutes. Five wrong attempts lock the session for fifteen minutes. A correct code issues an access token valid for one hour, and only a whitelisted set of agreement fields is returned.

The engineering that matters

The code session is a small state machine: pending, verified, expired or blocked, with attempt counting and a timed lockout. A lookup that finds nothing returns a neutral message, so the page does not reveal which emails or numbers are registered.

Storing the terms as a snapshot means later edits to the terms cannot change what a trainee agreed to. Optional fields are only sent when they have a value, so an empty date never trips the database’s validation.

Have a process like this?

Tell us what it looks like today. We will say whether this approach would work for you.