Skip to content

hmrc/income-tax-subscription

Repository files navigation

Apache-2.0 license Build Status Download

Income Tax Subscription MicroService

This is a scala/Play protected backend MicroService for the # to Report your Income and Expenses Quarterly (MTD ITSA) service.

This service provides the backend interactions with other backend MicroServices.

Local development requires:

  • sbt
  • MongoDB available on port 27017
  • HMRC Service manager (if using the provided scripts)
  • The services in the ITSA_SUBSC_ALL profile (a subset can be used)

How to start this service (main section)

See scripts/start

The active port is 9560

How to use

The entry page for this service running locally is

http://localhost:9561/report-quarterly/income-and-expenses/sign-up

The entry page for this service on staging (requires HMRC VPN) is

https://www.staging.tax.service.gov.uk/report-quarterly/income-and-expenses/sign-up

How to test

There are two built in test sets: test and it:test. See build.sbt for details.

Persistence

Data is stored as key/value in Mongo DB. See json reads/writes implementations (especially tests) for details.

To connect to the mongo db provided by docker (recommended) please use

docker exec -it mongo-db mongosh

Throttling

Throttling is managed via a record per minute per throttle point, in Mongo. The current value can be viewed at

http://localhost:9560/income-tax-subscription/test-only/throttle?throttle=<throttleId>

and the limit can be set by using the 'copy as cUrl' facility, and use using POST to:

http://localhost:9560/income-tax-subscription/test-only/throttle?throttle=<throttleId>&value=<throttleMaxValue>

License

This code is open source software licensed under the Apache 2.0 License