This version is in beta - expect some breaking changes.

Individual PAYE Test Support API

Dates and amounts
Date Amount
Version and status
Available in Sandbox Yes
Sandbox base URL https://test-api.service.hmrc.gov.uk
Available in Production No

Overview

This API lets you set up test data for the Individual PAYE APIs: Individual Benefits, Individual Employment, Individual Income and Individual Tax.

Versioning

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.

Errors

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.

Skip to main content

Endpoints

/individual-paye-test-support/sa/{utr}/benefits/annual-summary/{taxYear}

Create benefits summary test data
POST

Supports the Individual Benefits API by creating benefits summary test data.

Authorisation

This endpoint is application-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token.

Path parameters

Path parameters table
Name Description
utr
string
required

The 10 digit self assessment UTR for the individual.

For example: 2234567890

taxYear
string
required

The tax year for the benefits test data being created.

Tax year in the format YYYY-YY

For example: 2016-17

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Authorization
required
An OAuth 2.0 Bearer Token.

For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2

See also fraud prevention.

Request

{
  "scenario": "HAPPY_PATH_1"
}

Request table
Name Description
scenario
string
optional

The scenario to create test data for

Limited to the following possible values:

HAPPY_PATH_1 - Standard happy path test scenario (default)

Response

HTTP status: 201 (Created)

Example response for scenario HAPPY_PATH_1

{
  "employments": [
    {
      "employerPayeReference": "123/AB456",
      "companyCarsAndVansBenefit": 44,
      "fuelForCompanyCarsAndVansBenefit": 99,
      "privateMedicalDentalInsurance": 64,
      "vouchersCreditCardsExcessMileageAllowance": 80,
      "goodsEtcProvidedByEmployer": 125,
      "accommodationProvidedByEmployer": 375,
      "otherBenefits": 16,
      "expensesPaymentsReceived": 415
    },
    {
      "employerPayeReference": "456/AB456",
      "companyCarsAndVansBenefit": 50,
      "fuelForCompanyCarsAndVansBenefit": 249,
      "privateMedicalDentalInsurance": 75,
      "vouchersCreditCardsExcessMileageAllowance": 23,
      "goodsEtcProvidedByEmployer": 250,
      "accommodationProvidedByEmployer": 275,
      "otherBenefits": 87,
      "expensesPaymentsReceived": 265
    }
  ]
}

Response table
Name Description
employments
array
required

An unordered list of one or more employments for which the taxpayer reported any benefits for the given tax year

employerPayeReference
string
required

The employer’s PAYE reference.

For example: 123/AB456

companyCarsAndVansBenefit
number
optional

The total value of company cars and vans.

For example: 44

fuelForCompanyCarsAndVansBenefit
number
optional

The total value of fuel for company cars and vans.

For example: 99

privateMedicalDentalInsurance
number
optional

The total value of private medical and dental treatment and insurance.

For example: 64

vouchersCreditCardsExcessMileageAllowance
number
optional

The value of benefits in the form of vouchers, credit cards and excess mileage allowance.

For example: 80

goodsEtcProvidedByEmployer
number
optional

The total value of goods and other assets provided by the employer.

For example: 125

accommodationProvidedByEmployer
number
optional

The total value of accommodation provided by the employer.

For example: 375

otherBenefits
number
optional

The total value of other benefits, including interest-free loans and loans below the HMRC official rates.

For example: 16

expensesPaymentsReceived
number
optional

The value of expenses payments received and balancing charges.

For example: 415


Close Section
/individual-paye-test-support/sa/{utr}/employments/annual-summary/{taxYear}

Create employment history test data
POST

Supports the Individual Employment API by creating employment history test data.

Authorisation

This endpoint is application-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token.

Path parameters

Path parameters table
Name Description
utr
string
required

The 10 digit self assessment UTR for the individual.

For example: 2234567890

taxYear
string
required

The tax year for the employment test data being created.

Tax year in the format YYYY-YY

For example: 2016-17

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Authorization
required
An OAuth 2.0 Bearer Token.

For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2

See also fraud prevention.

Request

{
  "scenario": "HAPPY_PATH_1"
}

Request table
Name Description
scenario
string
optional

The scenario to create test data for

Limited to the following possible values:

HAPPY_PATH_1 - Standard happy path test scenario (default)

Response

HTTP status: 201 (Created)

Example response for scenario HAPPY_PATH_1

{
  "employments": [
    {
      "employerPayeReference": "123/AB456",
      "employerName": "Company XYZ",
      "offPayrollWorkFlag": true
    },
    {
      "employerPayeReference": "456/AB456",
      "employerName": "Company ABC",
      "offPayrollWorkFlag": false
    }
  ]
}

Response table
Name Description
employments
array
required

An unordered list of one or more employments which the taxpayer had in the given tax year.

employerPayeReference
string
required

The employer’s PAYE reference.

For example: 123/AB456

employerName
string
required

The name of the employer.

For example: Company XYZ

offPayrollWorkFlag
boolean
optional

The value of OPW flag.

For example: false


Close Section
/individual-paye-test-support/sa/{utr}/income/annual-summary/{taxYear}

Create annual income summary test data
POST

Supports the Individual Income API by creating annual income test data.

Authorisation

This endpoint is application-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token.

Path parameters

Path parameters table
Name Description
utr
string
required

The 10 digit self assessment UTR for the individual.

For example: 2234567890

taxYear
string
required

The tax year for the income test data being created.

Tax year in the format YYYY-YY

For example: 2016-17

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Authorization
required
An OAuth 2.0 Bearer Token.

For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2

See also fraud prevention.

Request

{
  "scenario": "HAPPY_PATH_1"
}

Request table
Name Description
scenario
string
optional

The scenario to create test data for

Limited to the following possible values:

HAPPY_PATH_1 - Standard happy path test scenario (default)

Response

HTTP status: 201 (Created)

Example response for scenario HAPPY_PATH_1

{
  "pensionsAnnuitiesAndOtherStateBenefits": {
    "otherPensionsAndRetirementAnnuities": 36.50,
    "incapacityBenefit": 980.45,
    "jobseekersAllowance": 89.99,
    "seissNetPaid": 55.55
  },
  "employments": [
    {
      "employerPayeReference": "123/AB456",
      "payFromEmployment": 22500.00
    },
    {
      "employerPayeReference": "456/AB456",
      "payFromEmployment": 8650.00
    }
  ]
}

Response table
Name Description
pensionsAnnuitiesAndOtherStateBenefits
object
required

Income from pensions, annuities and other state benefits.

otherPensionsAndRetirementAnnuities
number
optional

The amount of income from pensions (other than State Pension), retirement annuities and taxable trivial payments.

For example: 36.50

incapacityBenefit
number
optional

The amount of taxable Incapacity Benefit and contribution-based Employment and Support Allowance.

For example: 980.45

jobseekersAllowance
number
optional

The amount of income from Jobseeker’s Allowance.

For example: 89.99

seissNetPaid
number
optional

The amount of income from the Self-Employment Income Support Scheme.

For example: 55.55

employments
array
optional

An unordered list of zero or more employments for which the taxpayer received an income in the given tax year.

employerPayeReference
string
required

The employer’s PAYE reference.

For example: 123/AB456

payFromEmployment
number
required

The amount of pay from this employment, taken from the P45 or P60.

For example: 22500.00


Close Section
/individual-paye-test-support/sa/{utr}/tax/annual-summary/{taxYear}

Create tax summary test data
POST

Supports the Individual Tax API by creating annual tax test data.

Authorisation

This endpoint is application-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token.

Path parameters

Path parameters table
Name Description
utr
string
required

The 10 digit self assessment UTR for the individual.

For example: 2234567890

taxYear
string
required

The tax year for the tax test data being created.

Tax year in the format YYYY-YY

For example: 2016-17

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Authorization
required
An OAuth 2.0 Bearer Token.

For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2

See also fraud prevention.

Request

{
  "scenario": "HAPPY_PATH_1"
}

Request table
Name Description
scenario
string
optional

The scenario to create test data for

Limited to the following possible values:

HAPPY_PATH_1 - Standard happy path test scenario (default)

Response

HTTP status: 201 (Created)

Example response for scenario HAPPY_PATH_1

{
  "pensionsAnnuitiesAndOtherStateBenefits" : {
    "otherPensionsAndRetirementAnnuities": 36.50,
    "incapacityBenefit": 980.45
  },
  "refunds" : {
    "taxRefundedOrSetOff": 325.00
  },
  "employments" : [
    {
      "employerPayeReference": "123/AB456",
      "taxTakenOffPay": 890.35
    },
    {
      "employerPayeReference": "456/AB456",
      "taxTakenOffPay": 224.99
    }
  ]
}

Response table
Name Description
pensionsAnnuitiesAndOtherStateBenefits
object
required

Tax deducted from pensions, annuities and other state benefits.

otherPensionsAndRetirementAnnuities
number
optional

The amount of tax deducted from pensions (other than State Pension), retirement annuities and taxable trivial payments.

For example: 36.50

incapacityBenefit
number
optional

The amount of tax deducted from Incapacity Benefit.

For example: 980.45

refunds
object
required
taxRefundedOrSetOff
number
optional

The amount of Income Tax refunded or set off by HMRC or Jobcentre Plus.

For example: 325.00

employments
array
required

An unordered list of zero or more employments for which the taxpayer had tax deducted in the given tax year.

employerPayeReference
string
required

The employer’s PAYE reference.

For example: 123/AB456

taxTakenOffPay
number
required

The amount of UK tax deducted from pay under this employment.

For example: 890.35


Close Section

Skip to main content