Income Processing Design
1. Overview
When a participant pays for an entry, the money passes through several hands before it reaches the event organiser. A payment provider such as Payfast or PayGate may hold it and take a fee. It may land in the organiser’s own account, or in the account of an event service provider — a company that runs registration, timing and other services for the organiser and pays the proceeds over, less its own charges.
This document specifies how EMS follows that money: where each payment lands, which fees come off on the way, what the service provider charges, and what is due to the organiser at any moment. Every movement posts to the General Ledger, so the organiser’s position is the balance of a ledger account, and a statement to the organiser is a report over posted entries.
2. Status
Implementation status: proposed, not implemented.
Ledger mechanics: General Ledger — transaction types, account roles, posting triggers, append-only correction, journals.
Amount definitions: Order Line Item Amounts
Provider statements: Payment Reconciliation
Decision history: design-journal/2026-10/income-processing.adoc
3. Parties
| Party | Role |
|---|---|
Payer |
The participant or principal paying for an order. |
Organiser |
|
Service provider |
|
Processor owner |
The company owning the payment processor a payment landed in. Set per payment, not per event: one event can take online payments into the service provider’s Payfast account and cash into the organiser’s own cash box. |
Payment provider |
Payfast, PayGate, a card-machine acquirer, a bank. Charges a fee for each transaction and may hold the money before paying it out. |
Event.serviceProvider is nullable and has no default. It is chosen when the event is created. Null means the
organiser handles its own money and no service-provider charges apply. On an event the service provider runs
for itself, organiser and service provider are the same company.
Who provides services (Event.serviceProvider) and whose account received the money (the processor owner)
are different facts. The first decides which fee agreement applies; the second decides which company’s books
receive the money and whether anything is held for the organiser.
4. Payment Processors
A PaymentProcessor is a place money for an event lands and can be counted. Each provider account is its own
processor: several Payfast or PayGate merchant accounts are several processors, some owned by organisers and
some by the service provider. Processors are registered at runtime.
| Type | Examples |
|---|---|
Online payment provider |
A Payfast or PayGate merchant account |
Card machine |
A specific card terminal used at a registration desk |
Bank account |
A bank account receiving EFT payments, and the target of payouts and banking |
Cash box |
A named cash container used at a registration desk |
Each processor carries:
-
Owner — the organisation whose money it holds. Its postings go to that organisation’s books.
-
Active flag — a retired processor cannot take new payments but still posts for payments already recorded.
-
Receipt account and fee account — in the owner’s books, created from a template when the processor is created. See Accounts.
-
Fee schedule and fee source — see Provider Fees.
-
Payout target — the processor its balance is paid out or banked to: a Payfast account to a bank account, a cash box to a bank account. Optional.
-
External key — for an online payment provider, the registration system and gateway ID it serves, so a payment arriving through the storefront finds its processor. Optional.
4.1. The processor is the how and the where
A payment records only its processor. The processor says both where the money landed and how it was paid: card at the desk is the card machine, cash at the desk is the cash box. There is no separate payment-method field on a payment.
Order.paymentMethod is different: it is the buyer’s intent before any payment exists — online, EFT, or pay at
the counter — chosen on the registration portal’s payment confirmation screen. The last choice wins and can be
changed; it decides only the next screen (a redirect to the provider, or the counter reference). A buyer choosing to
pay at the counter does not yet know whether they will pay cash or card. The order carries no processor, because an
order can be paid in parts through different processors.
Where one provider offers several instruments — Payfast’s card and instant EFT — it is still one processor, because the instruments share one holding account. The instrument a payment used is a detail of the provider’s statement, recorded on the reconciliation row.
5. Provider Fees
5.1. Fee schedule
Each processor has a dated fee schedule. A rate applies from its effective date, so a rate change never restates earlier payments.
| Part | Meaning |
|---|---|
Fixed amount |
Per transaction, for example R2.00 |
Percentage |
Of the transaction amount, for example 3% |
Combination |
Sum (fixed plus percentage) or greater of the two |
Minimum, cap |
Optional bounds on the result |
5.2. Estimated and actual fees
Each processor states its fee source:
-
Statement — the provider issues a statement from which the actual fee can be read (Payfast, PayGate). The fee calculated from the schedule is an estimate, superseded by the statement.
-
Schedule — no statement is imported. The calculated fee is final.
A payment keeps both figures:
| Field | Meaning |
|---|---|
Calculated fee |
From the processor’s schedule in force when the money was received. Set when the payment is recorded; never overwritten. |
Fee |
The actual fee. Equal to the calculated fee while it is an estimate or final; replaced by the statement figure when the statement is imported. |
Fee status |
|
5.3. Where the fee is set
A fee service is called once, by the service that records a payment, before the payment is saved:
-
A fee supplied with the payment — Payfast’s fee, passed by the storefront when the payment completes — is stored as the actual fee, status
ACTUAL. -
Otherwise the fee is calculated from the processor’s schedule in force when the money was received:
ESTIMATEDfor a statement-sourced processor,FINALfor a schedule-sourced one. -
A processor with no schedule yields a zero fee,
ESTIMATED, and the payment is flagged for an operator rather than refused.
5.4. Matching a statement line
A provider statement line is matched to a recorded payment by, in order:
-
the provider’s transaction ID, held as the payment’s reference — exact and unique;
-
otherwise the order ID and the exact amount, when that identifies exactly one payment;
-
otherwise it stays unmatched and is reported. A line is never matched by guess.
Lines with no payment behind them are still used: a payout becomes a transfer; payout fees and adjustments post to bank charges; a receipt line with no recorded payment is a payment EMS missed, and is listed for action.
The estimate posts with the payment. When the actual arrives, only the difference posts, as a further entry. The variance between calculated and actual stays visible as a reconciliation finding. Persisted fees are actuals once known, as Order Line Item Amounts requires; the calculation only fills the gap until then.
5.5. Apportionment
A fee is charged per payment. It is apportioned to the order lines the payment settles, in proportion to each line’s amount, rounded to cents, with the remainder on the last line, so the lines sum exactly to the charge. An order covers one organiser’s events only, so apportioning across lines also apportions across events.
5.6. Who bears the fee
-
Provider fees are borne by the organiser by default. The money is theirs, and so is the cost of collecting it.
-
The service provider may absorb them only under its fee agreement, and only against a charge it makes to the organiser in return. Absorbing a fee is never free. Absorption is a dated setting on the customer’s agreement, optionally limited to a processor type or a processor. While it applies, provider fees on that customer’s receipts into the service provider’s processors are the service provider’s expense, and the statement shows the organiser’s provider fees as nil. The compensating charge is an ordinary fee row; EMS does not link the two. Absorption applies only where the money lands in the service provider’s processors.
-
Payout fees are borne by the processor owner, as a general expense. An organiser’s own payouts are invisible to EMS. The service provider’s are small and are not charged on.
6. Service-Provider Charges
6.1. The fee agreement
A service provider’s charges come from a fee table owned by the service provider, maintained under its tenant administration. Each row is keyed by:
-
Service provider — the owner of the table.
-
Customer — the organiser’s organisation, or null for the provider’s default fees. A customer row lets one organiser have its own terms.
-
Charge type — a name the service provider gives the charge: Registration, Timing, Generator hire.
-
Processor type, and optionally a specific processor — for per-paid-entry charges only. The rate can differ by the type of processor the money arrived through, and a specific processor can carry its own rate, for example where a provider has negotiated a lower rate for one account.
-
Effective period — so a change of terms never restates an earlier event.
Charges apply only to events whose serviceProvider is set. There is no event-level override yet; one can follow
the same pattern later.
6.2. Which row applies
For each charge type the most specific row wins, in this order:
-
this customer and this processor;
-
this customer and this processor type;
-
the default and this processor;
-
the default and this processor type.
Charges with no processor dimension resolve this customer, then the default. A customer row therefore overrides the default for its own charge type only; every other charge type still comes from the default. A customer’s own agreement always outranks a processor-specific default row.
6.3. Charge bases
| Basis | Meaning |
|---|---|
Per paid entry |
A fixed part and a percentage part, per entry paid. The rate is chosen by the processor type — and specific processor, where a row names one — of the payment that completes the order, and applies to the whole charge. How the entry was made does not matter: a desk entry paid online is charged the online rate. |
Fixed per event |
One amount per event. |
Fixed per billable service |
One amount per service supplied to the event — generator hire, a project management fee. The fee table is the price list: an operator adds a service to an event by picking it, with a quantity and a note, and may override the amount with a reason. |
Per timed participant |
One amount per participant the service provider timed. The quantity comes from the event’s results, and the charge is recalculated, by difference, when results change. |
Entered by hand |
An amount recorded against an event: reimbursables recharged to the organiser, and one-offs. |
Multiplier. Per-paid-entry and per-timed-participant charges carry a multiplier set on the event, per charge type, defaulting to 1. A three-day event charges the entry fee once and timing three times.
A per-entry or percentage charge counts as entries are paid, because only money received is due (see What Is Due to the Organiser). A fixed, per-service, per-participant or hand-entered charge counts when it is recorded against the event. Each charge posts when it counts; a change posts the difference.
6.4. Tax invoices
The organiser needs a tax invoice for the service provider’s charges. It is raised in the service provider’s accounting software, not in EMS. EMS shows, on screen, each organiser’s charges not yet invoiced for a period. The operator raises the invoice in the accounting software and records its number in EMS, which marks those charges invoiced; the statement shows the invoice number against them. A file hand-off waits until the integration with the accounting software is chosen.
7. The Agent Model
A service provider collecting an event’s money acts as agent for the organiser. It acts on the organiser’s behalf: the event income is the organiser’s, and so is the tax on it. The service provider’s income is only its own charges.
So money a service provider collects is not its income. It is a liability to the organiser, matched by a receivable in the organiser’s books:
| Books | Account role | Meaning |
|---|---|---|
Service provider |
Due to organiser |
Money held for the organiser, less what has been charged or paid over. A liability. |
Organiser |
Held by service provider |
The same amount, seen from the organiser’s side. An asset. |
Each posting line on these accounts carries the counterparty organisation, so one account per company serves every company it deals with, and its balance can be read per counterparty. The two balances mirror each other: the service provider’s due to organiser for an organiser equals that organiser’s held by service provider for the service provider.
When the organiser and the processor owner are the same company, no pair arises. The sale is already that company’s income, the payment lands in its own account, and nothing is held for anyone. This covers both an organiser using its own Payfast account and a service provider running its own event. No separate principal mode exists: the treatment follows from the organisations involved.
8. Movements and Their Postings
Every movement is a balanced, append-only ledger transaction in each company’s books it touches. Transaction types are defined in GlTransactionType. Postings below show the service provider (SP) collecting for an organiser (Org); each line carries the event where there is one, and lines on the pair accounts carry the counterparty.
8.1. Receipt into the service provider’s processor
PAYMENT, one transaction in each company’s books, both referencing the payment. The fee shown is borne by the
organiser.
| Books | Account | Debit | Credit |
|---|---|---|---|
SP |
Processor receipt |
amount − fee |
|
SP |
Due to organiser (fee) |
fee |
|
SP |
Due to organiser (received) |
amount |
|
Org |
Held by service provider |
amount |
|
Org |
Receivable |
amount owed |
|
Org |
Customer credit |
any excess |
|
Org |
Provider fees |
fee |
|
Org |
Held by service provider (fee) |
fee |
Where the service provider absorbs the fee under its agreement, its provider fees expense takes the fee in place of due to organiser, and the organiser’s books carry no fee.
A receipt into the organiser’s own processor posts once, in the organiser’s books, as in Payment.
8.2. Fee estimate superseded by the actual
PAYMENT, on the same payment, for the difference only: the fee account (or due to organiser and the mirrored
organiser entries, when the organiser bears it) against the processor receipt account.
8.3. Payout and cash banking
TRANSFER, in the processor owner’s books only: debit the target processor’s receipt account, credit the source
processor’s. A payout fee debits bank charges and credits the source processor. Neither party’s position moves:
a payout changes where the collector’s money sits, not what it owes.
The balance held at each processor is its receipts, less fees, less transfers out. It is tracked per processor, not per event: one payout covers every event’s money in the account.
8.4. Service charge
CHARGE, in both companies' books.
| Books | Account | Debit | Credit |
|---|---|---|---|
SP |
Due to organiser |
charge |
|
SP |
Service fee income |
charge |
|
Org |
Service fees |
charge |
|
Org |
Held by service provider |
charge |
When the organiser’s money is in its own processors, the same postings take the pair accounts the other way: the organiser owes the service provider. One pair of accounts covers both directions.
8.5. Disbursement
SETTLEMENT, recorded by hand after the transfer is made in online banking. EMS records the payment; it does not
make it. It carries the date, amount, bank reference and the service provider’s bank account, and either names the
event or events it is for or is marked an advance — a payment made while entries are still open.
| Books | Account | Debit | Credit |
|---|---|---|---|
SP |
Due to organiser |
amount |
|
SP |
Bank account (processor receipt) |
amount |
|
Org |
Bank account |
amount |
|
Org |
Held by service provider |
amount |
An advance may take the balance in the service provider’s favour for a time. A mistaken disbursement is reversed by a further entry, never deleted.
8.6. Paid on the organiser’s behalf
SETTLEMENT: the service provider pays a supplier for the organiser, at cost — an invoice in the organiser’s
name. SP: debit due to organiser, credit its bank account. Org: debit event expenses, credit held by
service provider. It is neither the service provider’s income nor its expense.
A cost the service provider recharges — with a margin, or a service it bought in — is a service charge on the entered by hand basis instead: its income, and on the tax invoice.
8.7. Refund
REFUND, from the processor the money was received into. Where that is the service provider’s: SP debits due
to organiser and credits the processor receipt account; Org debits income (or customer credit, for an
overpayment returned) and credits held by service provider. The provider does not return its original fee, so the
organiser bears it.
A refund after the event has been paid over can take the balance in the service provider’s favour. It is recovered on the next statement, or invoiced if nothing further is due.
8.8. Deposit from the organiser
SETTLEMENT: the organiser pays the service provider in advance for services. SP: debit its bank account, credit
due to organiser. Org: debit held by service provider, credit its bank account. Charges then draw the deposit
down as they post. Deposits are taken only from organisers, never from participants.
8.9. Worked example
A rider pays R100.00 through the service provider’s Payfast account. Payfast charges R5.00. The registration charge is R8.00 per paid entry. The service provider then pays the organiser over.
Service provider’s books:
| Movement | Account | Debit | Credit |
|---|---|---|---|
Receipt |
Payfast receipt |
R95.00 |
|
Receipt |
Due to organiser (fee) |
R5.00 |
|
Receipt |
Due to organiser (received) |
R100.00 |
|
Payout |
Bank account |
R95.00 |
|
Payout |
Payfast receipt |
R95.00 |
|
Charge |
Due to organiser |
R8.00 |
|
Charge |
Service fee income |
R8.00 |
|
Disbursement |
Due to organiser |
R87.00 |
|
Disbursement |
Bank account |
R87.00 |
Due to organiser ends at zero; the service provider keeps R8.00 income in its bank account.
Organiser’s books, with the sale posted when the entry was paid:
| Movement | Account | Debit | Credit |
|---|---|---|---|
Sale |
Receivable |
R100.00 |
|
Sale |
Entry income |
R100.00 |
|
Receipt |
Held by service provider |
R100.00 |
|
Receipt |
Receivable |
R100.00 |
|
Receipt |
Provider fees |
R5.00 |
|
Receipt |
Held by service provider |
R5.00 |
|
Charge |
Service fees |
R8.00 |
|
Charge |
Held by service provider |
R8.00 |
|
Disbursement |
Bank account |
R87.00 |
|
Disbursement |
Held by service provider |
R87.00 |
Income R100.00, expenses R13.00, R87.00 in the bank, and nothing held by the service provider.
9. What Is Due to the Organiser
The balance between a service provider and an organiser is kept per pair of companies, not per event. Three rules define what is due:
-
Only money received counts. An unpaid entry is owed to no one yet. Outstanding entries appear on the statement — split between participants who raced and those who did not — for information only.
-
Unresolved overpayments are held back. A second payment for an entry belongs to the payer until it is refunded, transferred to another entry, or kept. It sits in the pair account but is shown as held pending resolution and deducted from what is payable. A refund already paid out is a negative receipt.
-
One net figure, in either direction. Money in the service provider’s processors, less provider fees borne by the organiser and less charges, is owed to the organiser. Charges on money that landed in the organiser’s own processors are owed to the service provider. The statement nets them into one amount and says who owes whom.
9.1. Events and series
Each posting line carries its event, so an event’s contribution — received, fees, charges, net — and a series roll-up come from the event tag on each line. Disbursements settle the balance between the companies, not a particular event; one may name the events it is for, which lets an event be shown as settled.
10. Statements
| Concept | Behaviour |
|---|---|
Live balance |
The current position, at any time, including while registration is open. |
Statement |
A snapshot at an as-at date, stored with a number and the figures it showed, so the document an organiser received can always be reproduced. |
Adjustment |
Anything posted after a statement’s as-at date — a late payment, a refund, a fee corrected from its estimate — appears on the next statement as an adjustment. Earlier figures are never altered. |
Close-out |
An event’s close-out is its last statement. Anything later still reaches the balance, as an adjustment marked against the closed event. |
A statement’s adjustments are exactly the entries posted after the previous statement’s as-at date. This is why income is posted to an append-only ledger rather than recomputed from current orders and payments: a recomputation gives the right balance but cannot say what changed.
10.1. Statement layout
| Line | Effect |
|---|---|
Invoiced |
information |
Outstanding — raced, not raced |
information |
Received, by processor (service provider’s, organiser’s) |
|
less provider fees borne by the organiser |
|
less service-provider charges |
|
less held pending resolution |
|
less paid over to date |
|
Net due — to the organiser, or to the service provider |
10.2. Where it is shown
An Income and settlement screen in the admin portal, in the organiser’s tenant, per event with a series roll-up. The service provider operates it on the organiser’s behalf until organisers become administrators of their own tenants; tenant scoping from the start makes that a read-only role rather than a rework. The organiser receives the settlement statement — a PDF or export — with each disbursement and at close-out.
11. Design Rationale
| Rejected alternative | Why it loses |
|---|---|
The service provider books collected money as its own income (principal) |
Due to organiser would be a balance nowhere in the books and would have to be computed outside them. The whole amount would count as the service provider’s turnover, wrong for tax and contrary to how it acts: on the organiser’s behalf. |
A separate record of income movements, posted to the ledger later |
Statements need posted, balanced, append-only entries — ledger behaviour. A second store would be a second ledger to reconcile with the first. |
A payment destination entity beside the payment processor |
Both describe a named place money lands, owned by one company. Two entities would give two answers to where a payment landed. |
A payment method on each payment, beside its processor |
Each processor has its own accounts and fees, so it already says how the money came in. |
A desk as one processor taking cash and card |
Cash and card land in different places — a cash box, and the card acquirer’s settlement — with different fees. They are two processors. |
A balance per event |
Payouts and disbursements cover several events. Allocating them would be invented precision that never changes what is owed; the event’s contribution is read from its postings instead. |
A default service provider on every event |
Null is a real case — an organiser handling its own money — and a default would hide the choice. |
12. Data Model
Field-level shapes, for the entities this design adds or extends. Ledger tables are in General Ledger.
| Entity | Fields |
|---|---|
|
name, type, owner organisation, active, receipt account, fee account, fee source ( |
Processor fee rate (new) |
processor, effective from, fixed amount, percentage, combination ( |
|
order, processor, amount (negative for a refund), received at (UTC), reference, calculated fee, fee, fee status, recorded by |
|
|
|
|
Service fee (new) |
service provider, customer (nullable), charge type, basis, processor type, processor (nullable), fixed amount, percentage, effective from, effective to |
Provider fee absorption (new) |
service provider, customer, processor type (nullable), processor (nullable), effective from, effective to |
Event charge multiplier (new) |
event, charge type, multiplier |
Event charge (new) |
event, service fee or charge type, quantity, amount, override reason, note, invoice number — for per-service, per-participant and hand-entered charges |
Settlement statement (new) |
service provider, organiser, number, as-at date, issued at, closing balance, close-out flag and event, the document issued |
13. Scope Boundaries
This specification does not yet settle:
-
Event-level overrides of the fee table.
-
A file hand-off of charges or journals to the accounting software. Sage Pastel Partner offers a batch import for journals; its layout is to be taken from a batch exported from the company itself.