This version is in beta - expect some breaking changes.
Individual PAYE Test Support API
|Available in Sandbox||Yes|
|Sandbox base URL||https://test-api.service.hmrc.gov.uk|
|Available in Production||No|
For general information on testing see testing in the sandbox. To set up test data using this API, follow these steps:
Step 1: Create a test user.
Step 2: Using the test user’s National Insurance number, call the Create PAYE test data endpoint to create test data.
Step 3: Complete the authorisation journey with your test user to get an OAuth token.
Step 4: Call the Get PAYE annual summary endpoint on the Individual PAYE API to confirm the full details of the test data you created in step 2.
Step 5: When testing your application, use the same National Insurance number and tax year to check it shows the test data correctly.
When an API changes in a way that is backwards-incompatible, we increase the version number of the API. See our reference guide for more on versioning.
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
- 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
- 400 to 499 if it failed because of a client error by your application
- 500 to 599 if it failed because of an error on our server
Errors specific to each API are shown in the Endpoints section, under Response. See our reference guide for more on errors.