{"id":20181389,"url":"https://github.com/ac000/libmtdac","last_synced_at":"2026-04-02T19:06:19.401Z","repository":{"id":41902834,"uuid":"263143836","full_name":"ac000/libmtdac","owner":"ac000","description":"A C library providing an interface to the UK's HMRC Make Tax Digital API ","archived":false,"fork":false,"pushed_at":"2026-03-30T20:14:10.000Z","size":726,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-30T22:03:56.966Z","etag":null,"topics":["api-client","c","freebsd","hmrc","itsa","linux","mtd","tax","uk","vat"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ac000.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"Contributing.rst","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":"DCO","cla":null}},"created_at":"2020-05-11T19:53:31.000Z","updated_at":"2026-03-30T20:14:14.000Z","dependencies_parsed_at":"2026-03-30T22:00:48.428Z","dependency_job_id":null,"html_url":"https://github.com/ac000/libmtdac","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/ac000/libmtdac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Flibmtdac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Flibmtdac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Flibmtdac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Flibmtdac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ac000","download_url":"https://codeload.github.com/ac000/libmtdac/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ac000%2Flibmtdac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31313901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","c","freebsd","hmrc","itsa","linux","mtd","tax","uk","vat"],"created_at":"2024-11-14T02:35:23.919Z","updated_at":"2026-04-02T19:06:19.388Z","avatar_url":"https://github.com/ac000.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"libmtdac\n========\n\n|Builds| |FreeBSD Build Status| |CodeQL|\n\n1. `Overview \u003c#overview\u003e`__\n2. `API \u003c#api\u003e`__\n3. `Build it \u003c#build-it\u003e`__\n4. `Register with HMRC \u003c#register-with-hmrc\u003e`__\n5. `How to use \u003c#how-to-use\u003e`__\n6. `Fraud Prevention Headers \u003c#fraud-prevention-headers\u003e`__\n7. `Thread safety \u003c#thread-safety\u003e`__\n8. `License \u003c#license\u003e`__\n9. `Contributing \u003c#contributing\u003e`__\n\nOverview\n--------\n\nAn interface to the UK’s HMRC `Make Tax\nDigital \u003chttps://developer.service.hmrc.gov.uk/api-documentation\u003e`__ API\n\nIt currently supports the following MTD APIs\n\n==================================================\t=======\nAPI\t\t\t\t\t\t\tVersion\n==================================================\t=======\n`Business Details`_\t\t\t\t\t2.0\n`Business Income Source Summary`_\t\t\t3.0\n`Business Source Adjustable Summary`_\t\t\t7.0\n`CIS Deductions`_\t\t\t\t\t3.0\n`Individual Calculations`_\t\t\t\t8.0\n`Individuals Capital Gains Income`_\t\t\t2.0\n`Individuals Charges`_\t\t\t\t\t3.0\n`Individuals Disclosures`_\t\t\t\t2.0\n`Individuals Dividends Income`_\t\t\t\t2.0\n`Individuals Employments Income`_\t\t\t2.0\n`Individuals Expenses`_\t\t\t\t\t3.0\n`Individuals Foreign Income`_\t\t\t\t2.0\n`Individuals Insurance Policies Income`_\t\t2.0\n`Individual Losses`_\t\t\t\t\t6.0\n`Individuals Other Income`_\t\t\t\t2.0\n`Individuals Pensions Income`_\t\t\t\t2.0\n`Individuals Reliefs`_\t\t\t\t\t2.0\n`Individuals Savings Income`_\t\t\t\t2.0\n`Individuals State Benefits`_\t\t\t\t2.0\n`Obligations`_\t\t\t\t\t\t3.0\n`Other Deductions`_\t\t\t\t\t2.0\n`Property Business`_\t\t\t\t\t6.0\n`Self Assessment Accounts`_\t\t\t\t4.0\n`Self Assessment Assist`_\t\t\t\t1.0\n`Self Assessment Individual Details`_\t\t\t2.0\n`Self Employment Business`_\t\t\t\t5.0\n\\\n`VAT`_\t\t\t\t\t\t\t1.0\n\\\n`Create Test User`_\t\t\t\t\t1.0\n`Self Assessment Test Support`_\t\t\t\t1.0\n`Test Fraud Prevention Headers`_\t\t\t1.0\n==================================================\t=======\n\n.. _Business Details: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/business-details-api/2.0/oas/page\n.. _Business Income Source Summary: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-biss-api/3.0/oas/page\n.. _Business Source Adjustable Summary: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-bsas-api/7.0/oas/page\n.. _CIS Deductions: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/cis-deductions-api/3.0/oas/page\n.. _Individual Calculations: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individual-calculations-api/8.0/oas/page\n.. _Individuals Capital Gains Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-capital-gains-income-api/2.0/oas/page\n.. _Individuals Charges: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-charges-api/3.0/oas/page\n.. _Individuals Disclosures: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-disclosures-api/2.0/oas/page\n.. _Individuals Dividends Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-dividends-income-api/2.0/oas/page\n.. _Individuals Employments Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-employments-income-api/2.0/oas/page\n.. _Individuals Expenses: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-expenses-api/3.0/oas/page\n.. _Individuals Foreign Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-foreign-income-api/2.0/oas/page\n.. _Individuals Insurance Policies Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-insurance-policies-income-api/2.0/oas/page\n.. _Individual Losses: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individual-losses-api/6.0/oas/page\n.. _Individuals Other Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-other-income-api/2.0/oas/page\n.. _Individuals Pensions Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-pensions-income-api/2.0/oas/page\n.. _Individuals Reliefs: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-reliefs-api/2.0/oas/page\n.. _Individuals Savings Income: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-savings-income-api/2.0/oas/page\n.. _Individuals State Benefits: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/individuals-state-benefits-api/2.0/oas/page\n.. _Obligations: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/obligations-api/3.0/oas/page\n.. _Other Deductions: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/other-deductions-api/2.0/oas/page\n.. _Property Business: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/property-business-api/6.0/oas/page\n.. _Self Assessment Accounts: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-accounts-api/4.0/oas/page\n.. _Self Assessment Assist: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-assist/1.0/oas/page\n.. _Self Assessment Individual Details: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-assessment-individual-details-api/2.0/oas/page\n.. _Self Employment Business: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/self-employment-business-api/5.0/oas/page\n.. _VAT: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/vat-api/1.0/oas/page\n.. _Create Test User: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/api-platform-test-user/1.0/oas/page\n.. _Self Assessment Test Support: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/mtd-sa-test-support-api/1.0/oas/page\n.. _Test Fraud Prevention Headers: https://developer.service.hmrc.gov.uk/api-documentation/docs/api/service/txm-fph-validator-api/1.0/oas/page\n\nAPI\n---\n\nThere are some docs\n`here \u003chttps://github.com/ac000/libmtdac/tree/master/docs/\u003e`__ and in\nman page\n`format \u003chttps://github.com/ac000/libmtdac/tree/master/docs/man/\u003e`__.\n\nBuild it\n--------\n\nlibmtdac is primarily developed under Linux but it also builds and runs\nunder FreeBSD.\n\n**NOTE:** This requires jansson 2.14.1 or later with DTOA support (the\ndefault) for the proper handling of real numbers.\n\nLinux\n~~~~~\n\nlibmtdac only has a couple of direct dependencies, *libcurl* \u0026 *jansson*\n\nOn Red Hat/Fedora/etc you will need the\n\n::\n\n   libcurl{,-devel}\n   jansson{,-devel}\n\npackages.\n\nOn Debian (something like…)\n\n::\n\n   libcurl4{,-openssl-dev}\n   libjansson{4,-dev}\n\nThe simplest way is to build the rpm (on Red Hat/Fedora) by simply doing\n\n::\n\n   $ make rpm\n\nin the repository root. It just needs a suitable *rpmbuild/* directory\nstructure which can be created with\n\n::\n\n   $ mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}\n\nand the *rpmbuild* tool which can be found in the *rpm-build* package.\n\nFreeBSD\n~~~~~~~\n\nAs as well as curl and jansson libraries it also requires libuuid and\ngmake to build\n\n::\n\n   $ sudo pkg install gmake jansson curl e2fsprogs-libuuid\n\nthen build with\n\n::\n\n   $ gmake\n\nor if you don’t have GCC installed\n\n::\n\n   $ gmake CC=clang\n\nRegister with HMRC\n------------------\n\nBefore you can actually make use of this, you will need to register the\napplication with the HMRC developer hub. You can register an account\n`here \u003chttps://developer.service.hmrc.gov.uk/developer/registration\u003e`__.\n\nOnce you’ve registered you can then regsiter your application by the\nfollowing steps\n\n1. Goto https://developer.service.hmrc.gov.uk/developer/applications\n\n   Click on “Add an application to the sandbox” on the left hand side.\n\n2. Select required endpoints (can be changed later)\n\n   No harm in at least selecting all the ones marked *MTD*\n\n3. Generate and take note of the ‘client_id’ \u0026 ‘client_secret’\n\n4. Click on “View your application details”\n\n5. Click on “Redirect URIs”\n\n6. Click on “Add a redirect URI”\n\n7. Paste in (minus the quotes) “urn:ietf:wg:oauth:2.0:oob”\n\nHow to use\n----------\n\n.. code:: c\n\n   #include \u003clibmtdac/mtd.h\u003e\n\nLink with ``-lmtdac``.\n\nExamples\n~~~~~~~~\n\nFor real world examples of usage see\n\n-  `mtd-cli \u003chttps://github.com/ac000/mtd-cli\u003e`__\n-  `itsa \u003chttps://github.com/ac000/itsa\u003e`__\n\nFraud Prevention Headers\n------------------------\n\nHMRC describe various headers that must be added for `Fraud\nPrevention \u003chttps://developer.service.hmrc.gov.uk/api-documentation/docs/fraud-prevention\u003e`__\n\nSome of the information sent in the headers contains somewhat\npotentially sensitive information, such as OS username, local IP\naddresses/mac addresses and a unique device id.\n\nCaveat Emptor.\n\nWhat is sent for each header can be overridden. See the `Fraud\nPrevention\nHeaders \u003c/docs/libmtdac_mtd.h.3.rst#fraud-prevention-headers\u003e`__ section\nof `libmtdac_mtd_h.3.rst \u003c/docs/libmtdac_mtd.h.3.rst\u003e`__ for more\ndetails.\n\nThread safety\n-------------\n\nlibmtdac aims to be thread safe.\n\nLicense\n-------\n\nThis library is licensed under the GNU Lesser General Public License\n(LGPL) version 2.1\n\nSee `COPYING \u003c/COPYING\u003e`__ in the repository root for details.\n\nContributing\n------------\n\nSee `CodingStyle.rst \u003c/CodingStyle.rst\u003e`__ \u0026\n`Contributing.rst \u003c/Contributing.rst\u003e`__\n\nAndrew Clayton \u003cac@sigsegv.uk\u003e\n\n.. |Builds| image:: https://github.com/ac000/libmtdac/actions/workflows/build_tests.yaml/badge.svg\n   :target: https://github.com/ac000/libmtdac/actions/workflows/build_tests.yaml\n.. |FreeBSD Build Status| image:: https://api.cirrus-ci.com/github/ac000/libmtdac.svg\n   :target: https://cirrus-ci.com/github/ac000/libmtdac\n.. |CodeQL| image:: https://github.com/ac000/libmtdac/workflows/CodeQL/badge.svg\n   :target: https://github.com/ac000/libmtdac/actions?query=workflow:CodeQL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac000%2Flibmtdac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fac000%2Flibmtdac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fac000%2Flibmtdac/lists"}