HMRC Fraud Prevention Headers: What .NET Developers Often Get Wrong
HMRC's Making Tax Digital APIs require a set of mandatory Fraud Prevention Headers with every API call, and incorrect or incomplete headers can silently lower a submission's trust score or trigger an outright rejection. A key pitfall for backend developers is that several required headers — such as Gov-Client-Device-ID, Gov-Client-Screens, and Gov-Client-Timezone — must reflect the end user's actual device and browser, not server-generated values. In a typical SPA-and-API architecture, this means client-side code must capture and forward these values to the backend, which then relays them to HMRC. Server-side headers like Gov-Vendor-Version and Gov-Vendor-Product-Name, which describe the vendor's software, are the only ones a backend service can legitimately generate on its own. A recommended .NET implementation uses a DelegatingHandler to assemble the full header set before each outbound HttpClient call, maintaining a clear split between client-collected and server-generated data.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in