🏛️ GovTechDelivered on Time📋 Fixed Price

GovTech API Integration — HMRC Making Tax Digital for Accountancy SaaS

UK6 min readUpdated June 2025
Region
UK
Contract
Fixed Price
Tech Stack
6 Technologies
IP
100% transferred to client

Project Overview

A UK accountancy software startup needed to integrate with HMRC Making Tax Digital (MTD) for VAT as a software...

Technology Stack

Node.js/FastifyTypeScriptHMRC MTD API (OAuth 2.0 + JSON)PostgreSQLNext.jsAWS eu-west-2

Compliance & Standards

HMRC MTD (VAT and ITSA)UK GDPR (financial data)ICO registrationMaking Tax Digital regulations

The Challenge

A UK accountancy software startup needed to integrate with HMRC Making Tax Digital (MTD) for VAT as a software provider — enabling their accountancy SaaS customers to submit VAT returns digitally to HMRC. The integration required OAuth 2.0 authorisation (HMRC's agent authorisation flow is complex), JSON VAT return submission, obligation retrieval, and payment information display. Additionally, the company needed to prepare for MTD for Income Tax (from April 2026) for their self-employed clients. Budget: £65,000.

Our Approach

HMRC OAuth 2.0 Agent Authorisation: HMRC MTD uses a three-way OAuth 2.0 flow: the accountant (agent) authorises on behalf of their client (principal). ClickMasters implemented the Agent Authorisation API, Authorisation Code flow with PKCE, token refresh, and the HMRC sandbox environment for development and testing. Agent-client relationships persisted in PostgreSQL with full audit logging. MTD VAT Submission Flow: Obligation retrieval (HMRC API returns VAT return periods), VAT return calculation (pulling from client bookkeeping data), 9-box VAT return JSON construction (per HMRC schema), submission with fraud prevention headers (mandatory IP address, device ID, username headers — non-negotiable for HMRC), and confirmation receipt storage. HMRC Fraud Prevention Headers: HMRC mandates fraud prevention headers on all MTD API calls — including user IP address, browser fingerprint, and device identification. ClickMasters implemented these headers correctly with client-side collection (JavaScript) and server-side forwarding. Common compliance failure: missing or malformed fraud prevention headers cause HMRC to reject API calls. MTD ITSA Preparation: Pre-built the MTD Income Tax Self Assessment (ITSA) integration structure (from April 2026 mandatory date) — quarterly submission endpoints, digital record-keeping requirements, and the expanded self-employment income categories. Building this concurrently with VAT integration reduced future development cost.

The Results

MTD VAT integration live at 10 weeks, £58,000 — under budget. HMRC sandbox testing: 100% pass rate on submission validation. Live with 12 accountancy clients submitting VAT returns on day one. Zero HMRC rejection rate in first 3 months. MTD ITSA preparation: client positioned 18 months ahead of mandatory deadline. SaaS plan: launched MTD submission as premium tier feature at £35/client/month additional, generating £5,040 MRR from existing clients on day one.

Client Testimonial
The HMRC fraud prevention headers were the technical challenge that had beaten two previous developers. ClickMasters understood the HMRC API documentation and got it right first time. The MTD ITSA preparation gives us a huge competitive advantage — we're ready 18 months before our competitors." — CTO, UK AccountingTech SaaS (name withheld)
ClickMasters Case Study Team
Reviewed by James Whitmore, CTO

Project Details

Sector
GovTech
Country
UK
Status
Delivered on Time
Contract
Fixed Price
Tech Stack
6 Technologies
Reading Time
6 min
IP Ownership
100% transferred to client
Last Updated
June 2025
Written By
ClickMasters Case Study Team
Reviewed By
James Whitmore, CTO

Related Case Studies

View All

Ready to Transform Your Business?

Let's discuss how our technical expertise can help you achieve remarkable results.