This is really decided by a combination of your incorporation status (Sole Prop, Ltd Co, etc) and your country of residence.
As you live in the UK, then how your business is set up is a major factor.
If you are a Limited Company, then Companies House needs a set of professionally prepared accounts each year. That means you should have an accountant, and they can best advise you. If you are working as a sole proprietor (which I suspect), then it's down to what you want to be able to track.
I would classify the online agent in Accounts Receivable (they owe you money until it's in your bank account), and their commission as an Account Payable . Whenever I completed work, or hit a milestone, I'd increase AR by the gross amount and increase AP by the commission due. When they actually paid me, you want to end up with cash increased by the actual amount you received, AR decreased by the total invoice, and AP decreased by the difference.
Basically, you want to be able to track
- Amount invoiced
- Amount received
- Commission paid (as an expense)
such that Received = Invoiced - Commission
However ... this is also impacted by whether you are electing to use cash-accounting (income realised when you bak the cheque) or accrual accounting (income realised - and hence taxable - when you do the work).
The difference is critical to your cashflow. Accrual accounting is what "real" companies (and most accountants) use - but it can catch you out. If, for example, your tax year were Jan-Dec (less common in the UK) and you did work in December 2016, but were paid in February 2017, it would count as revenue during your 2016 tax year. Under cash accounting, it would form part of your 2017 revenue.
Basically, I'd splash out on an hour with an accountant.
But also take a look here