- The goal is create a simple CLI tool with Golang to submit VAT tax returns and get historical data. This tool is a bridging tool and does not store data on a server. It will probably never graduate to a fully fledged accounting softare.
- The project is open-source so feel free to use the code for your own projects and suggest improvements and raise issues.
- Please note that I have a busy job and this is a side project so I may not be on here for weeks or months at a time.
- Every application needs to be approved by HMRC, more below.
- I'm thinking about setting up a free website with React, Netlify and a server so that people can submit VAT tax returns online. But I haven't gotten round to it yet.
Testing stage with a view to moving into production soon.
ASSUMPTION I'm assume users will have decent computer knowledge and can install Golang and run a CLI tool.
- Install Golang
- Install
oauth2
viago get golang.org/x/oauth2
- Install
uuid
viago get github.com/google/uuid
- Register your app with HMRC (this is a time consuming step, see Approval Process)
- Save your settings to the env.json file in the root directory
{
"API_URL": "https://test-api.service.hmrc.gov.uk",
"CLIENT_ID": "YOUR-CLIENT-ID",
"CLIENT_SECRET": "YOUR-CLIENT-SECRET",
"SERVER_TOKEN": "YOUR-SERVER-TOKEN",
"STATE_CHECK": "RANDOM-STRING-YOU-GENERATE-VIA-UUID-OR-MD5",
"VRN": "YOUR-COMPANY-VRN-NUMBER",
}
- You are ready to run the app using the CLI via
go run *.go help
- Run
go run *.go auth
to launch a local server (at http://localhost:3000/) in order to login and get your token which is saved to the same directory as the code. - You can then start to retrieve and submit VAT returns.
- Firstly create an account on the Developer Hub. This allows you to register a client for the test API. Save the config to your
env.json
and off you go, you can start testing the app. You'll need to create a test login in order to test the server. - Once you have tested your app, you will need to apply for approval for a product app. HMRC sends you an email and you need to reply in order to setup a demo.
- Before setting up the demo, they ask you a bunch of standard questions:
- What is your Company Name and Registration Number (if you have one)?
- Please confirm your business address and telephone number.
- Do you have a website, if so please provide the URL
- Is your business on LinkedIn or Twitter, if they are please provide the links
- Is it a full digital record keeping solution, is it file-only (bridging product) or is it both?
- Are you targeting a particular customer demographic or business sector?
- Will your product be used as an in-house solution only or do you plan to sell/licence the product?
- Is it built to UK standards and conventions (e.g. UK dates, £ not $ etc.)?
- Are you developing more than one product? If you are what are they named?
- Is your product a white label? (In general, white label branding is a practice in which a product or service is produced by one company and then rebranded by another company to make it appear to be their own)
- Is your product GDPR compliant?
- Does your product meet the Web Content Accessibility Guidelines (minimum level AA)?
- Does your product capture and send the fraud prevention headers?
- What VAT schemes does it support?
- Cash accounting
- Annual accounting
- Flat rate
- Retail
- Margin
- Exemption
I have not yet completed a demo so no insight in that at the moment.