Individual PAYE Test Support API
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.
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.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self assessment UTR for the individual.
For example: |
taxYear
string
required
|
The tax year for the benefits test data being created. Tax year in the format
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.0+json
|
Content-Type
required
|
Specifies the format of the request body, which must be JSON. application/json
|
Authorization
required
|
An OAuth 2.0 Bearer Token.
For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2
|
See also fraud prevention.
Request
{ "scenario": "HAPPY_PATH_1" }
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)
|
Responses
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 } ] }
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: |
companyCarsAndVansBenefit
number
optional
|
The total value of company cars and vans.
For example: |
fuelForCompanyCarsAndVansBenefit
number
optional
|
The total value of fuel for company cars and vans.
For example: |
privateMedicalDentalInsurance
number
optional
|
The total value of private medical and dental treatment and insurance.
For example: |
vouchersCreditCardsExcessMileageAllowance
number
optional
|
The value of benefits in the form of vouchers, credit cards and excess mileage allowance.
For example: |
goodsEtcProvidedByEmployer
number
optional
|
The total value of goods and other assets provided by the employer.
For example: |
accommodationProvidedByEmployer
number
optional
|
The total value of accommodation provided by the employer.
For example: |
otherBenefits
number
optional
|
The total value of other benefits, including interest-free loans and loans below the HMRC official rates.
For example: |
expensesPaymentsReceived
number
optional
|
The value of expenses payments received and balancing charges.
For example: |
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.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self assessment UTR for the individual.
For example: |
taxYear
string
required
|
The tax year for the employment test data being created. Tax year in the format
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.0+json
|
Content-Type
required
|
Specifies the format of the request body, which must be JSON. application/json
|
Authorization
required
|
An OAuth 2.0 Bearer Token.
For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2
|
See also fraud prevention.
Request
{ "scenario": "HAPPY_PATH_1" }
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)
|
Responses
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 } ] }
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: |
employerName
string
required
|
The name of the employer.
For example: |
offPayrollWorkFlag
boolean
optional
|
The value of OPW flag.
For example: |
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.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self assessment UTR for the individual.
For example: |
taxYear
string
required
|
The tax year for the income test data being created. Tax year in the format
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.0+json
|
Content-Type
required
|
Specifies the format of the request body, which must be JSON. application/json
|
Authorization
required
|
An OAuth 2.0 Bearer Token.
For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2
|
See also fraud prevention.
Request
{ "scenario": "HAPPY_PATH_1" }
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)
|
Responses
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 } ] }
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: |
incapacityBenefit
number
optional
|
The amount of taxable Incapacity Benefit and contribution-based Employment and Support Allowance.
For example: |
jobseekersAllowance
number
optional
|
The amount of income from Jobseeker’s Allowance.
For example: |
seissNetPaid
number
optional
|
The amount of income from the Self-Employment Income Support Scheme.
For example: |
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: |
payFromEmployment
number
required
|
The amount of pay from this employment, taken from the P45 or P60.
For example: |
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.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self assessment UTR for the individual.
For example: |
taxYear
string
required
|
The tax year for the tax test data being created. Tax year in the format
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.0+json
|
Content-Type
required
|
Specifies the format of the request body, which must be JSON. application/json
|
Authorization
required
|
An OAuth 2.0 Bearer Token.
For example: Bearer 59fc92c1cdf0b8ef1f138a702effdbd2
|
See also fraud prevention.
Request
{ "scenario": "HAPPY_PATH_1" }
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)
|
Responses
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 } ] }
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: |
incapacityBenefit
number
optional
|
The amount of tax deducted from Incapacity Benefit.
For example: |
refunds
object
required
|
|
taxRefundedOrSetOff
number
optional
|
The amount of Income Tax refunded or set off by HMRC or Jobcentre Plus.
For example: |
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: |
taxTakenOffPay
number
required
|
The amount of UK tax deducted from pay under this employment.
For example: |
Close Section