Construction Industry Scheme Example

The Construction Industry Scheme (CIS) is method through which money is deducted from subcontractors payments and paid directly to HMRC. The deductions count as advance payments towards the subcontractor’s tax and National Insurance.

In this example we will step through the process of creating your first subcontractor, verifing them with HMRC, calculating some earnings and finally reporting the results back to HMRC via the CIS300 monthly return.

The generation, maintenance and reporting [of the payroll entities] is managed through the RESFful API, using a combination of GET, PUT, POST, PATCH and DELETE HTTP methods.

For the purpose of this example it is assumed you are familar with the process of monitoring asynchronous jobs though the API. For further details please see the Jobs page.

Step 1 - Create an Employer

The initial step when creating a new CIS payroll is the generation of the Employer (Contractor) entity. An employer typically represents a single PAYE scheme and includes the necessary values needed to make Real Time Information (RTI) or Construction Industry Scheme (CIS) submissions.

You can specify your own unique identity values by using PUT instead of POST. Unique Ids should only contain letters and numbers.

curl -X POST \
  'https://api.test.payrun.io/Employers' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<Employer xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <EffectiveDate>2018-04-06</EffectiveDate>
  <Name>CIS Employer</Name>
  <Region>NotSet</Region>
  <Territory>UnitedKingdom</Territory>
  <RuleExclusions>None</RuleExclusions>
  <HmrcSettings>
    <TaxOfficeNumber>123</TaxOfficeNumber>
    <TaxOfficeReference>R395</TaxOfficeReference>
    <AccountingOfficeRef>123PP87654321</AccountingOfficeRef>
    <SAUTR>7325648155</SAUTR>
    <Sender>Employer</Sender>
    <SenderId>CISRUSER1194</SenderId>
    <Password>testing1</Password>
  </HmrcSettings>
</Employer>'
curl -X POST \
  'https://api.test.payrun.io/Employers' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "Employer": {
    "EffectiveDate": "2018-04-06",
    "Name": "CIS Employer",
    "Region": "NotSet",
    "Territory": "UnitedKingdom",
    "RuleExclusions": "None",
    "HmrcSettings": {
      "TaxOfficeNumber": "123",
      "TaxOfficeReference": "R395",
      "AccountingOfficeRef": "123PP87654321",
      "SAUTR": "7325648155",
      "Sender": "Employer",
      "SenderId": "CISRUSER1194",
      "Password": "testing1"
    }
  }
}'

Step 2 - Create a Subcontractor

The subcontractor object holds (and links to) the necessary data to calculate and report within the CIS payroll. You can have an unlimited number of subcontractor under an employer, each must be verified with HMRC and given a tax treatment. In this example we create a single subcontractor (sole trader) named Sidney James trading as Building Dreams.

curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<SubContractor xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <EffectiveDate>2018-04-06</EffectiveDate>
  <Revision>0</Revision>
  <TradingName>Building Dreams</TradingName>
  <UniqueTaxReference>1234567882</UniqueTaxReference>
  <BusinessType>SoleTrader</BusinessType>
  <VatRegistered>false</VatRegistered>
  <VatRegistrationNumber xsi:nil="true" />
  <WorksNumber xsi:nil="true" />
  <PaymentMethod>NotSet</PaymentMethod>
  <PayFrequency>Monthly</PayFrequency>
  <FirstName>Sidney</FirstName>
  <MiddleName xsi:nil="true" />
  <LastName>James</LastName>
  <NiNumber>YW000009A</NiNumber>
  <Region>NotSet</Region>
  <Territory>UnitedKingdom</Territory>
</SubContractor>'
curl -X PUT \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "SubContractor": {
    "EffectiveDate": "2018-04-06",
    "TradingName": "Building Dreams",
    "UniqueTaxReference": "1234567882",
    "BusinessType": "SoleTrader",
    "VatRegistered": "false",
    "VatRegistrationNumber": null,
    "WorksNumber": null,
    "PaymentMethod": "NotSet",
    "PayFrequency": "Monthly",
    "FirstName": "Sidney",
    "MiddleName": null,
    "LastName": "James",
    "NiNumber": "YW000009A",
    "CompanyName": null,
    "CompanyRegistrationNumber": null,
    "Region": "NotSet",
    "Territory": "UnitedKingdom"
  }
}'

Step 3 - Verify the Subcontractor

Subcontractors must be regsistered on the CIS scheme with HMRC. The Verification Job makes a call to HMRC, passing the subcontractor details, HMRC will then respond with providing a VeriifcationNumber and a TaxationStatus values which dictates the amount of tax that must be deducted from their earnings.

The Verification Job automatically handles genertating the upstream API call to HMRC and updating the subcontractor object with the response. Both the request, repsonse and transaction details are stored and are queryable against the CisTransaction object.

curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<CisVerifyJobInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <HoldingDate xsi:nil="true" />
  <Employer href="/Employer/ER001" />
  <SubContractors />
  <Timestamp>2018-04-28T12:00:00</Timestamp>
  <Generate>true</Generate>
  <Transmit>true</Transmit>
  <Declaration>true</Declaration>
</CisVerifyJobInstruction>'
curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "CisVerifyJobInstruction": {
    "HoldingDate": null,
    "Employer": {
      "@href": "/Employer/ER001"
    },
    "SubContractors": { "SubContractor": [] },
    "Timestamp": "2018-04-28T12:00:00",
    "Generate": "true",
    "Transmit": "true",
    "Declaration": "true"
  }
}'

With the successful completion of the Verifcation Job we can now expect our subcontractor to have been updated with both VerificationNumber and a TaxationStatus values based on the response from HMRC.

Below is an abreviated response from HMRC detailing the subcontractor's status.

... abreviated response
<CISresponse xmlns="http://www.govtalk.gov.uk/taxation/CISresponse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Contractor>
    <UTR>7325648155</UTR>
    <AOref>123PP87654321</AOref>
    </Contractor>
    <Subcontractor>
        <Name>
            <Fore>Sidney</Fore>
            <Sur>James</Sur>
        </Name>
        <UTR>1234567882</UTR>
        <NINO>YW000009A</NINO>
        <Matched>matched</Matched>
        <TaxTreatment>net</TaxTreatment>
        <VerificationNumber>V5678912389</VerificationNumber>
    </Subcontractor>
</CISresponse>
...

We can check this by issuing a GET request on our subcontractor.

curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml'
curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json'

Response Example

<?xml version="1.0"?>
<SubContractor xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <EffectiveDate>2018-04-28</EffectiveDate>
    <Revision>2</Revision>
    <TradingName>Building Dreams</TradingName>
    <UniqueTaxReference>1234567882</UniqueTaxReference>
    <BusinessType>SoleTrader</BusinessType>
    <VatRegistered>false</VatRegistered>
    <VatRegistrationNumber xsi:nil="true" />
    <WorksNumber xsi:nil="true" />
    <PaymentMethod>NotSet</PaymentMethod>
    <PayFrequency>Monthly</PayFrequency>
    <TaxationStatus>net</TaxationStatus>
    <VerificationNumber>V5678912389</VerificationNumber>
    <VerificationDate>2018-04-28T12:00:00</VerificationDate>
    <Title xsi:nil="true" />
    <FirstName>Sidney</FirstName>
    <MiddleName xsi:nil="true" />
    <LastName>James</LastName>
    <Initials xsi:nil="true" />
    <NiNumber>YW000009A</NiNumber>
    <CompanyName xsi:nil="true" />
    <CompanyRegistrationNumber xsi:nil="true" />
    <PartnershipName xsi:nil="true" />
    <PartnershipUniqueTaxReference xsi:nil="true" />
    <Region>NotSet</Region>
    <Territory>UnitedKingdom</Territory>
    <Deactivated>false</Deactivated>
    <Address xsi:nil="true" />
    <BankAccount xsi:nil="true" />
</SubContractor>
{
    "SubContractor": {
        "EffectiveDate": "2018-04-28",
        "Revision": "2",
        "TradingName": "Building Dreams",
        "UniqueTaxReference": "1234567882",
        "BusinessType": "SoleTrader",
        "VatRegistered": "false",
        "VatRegistrationNumber": null,
        "WorksNumber": null,
        "PaymentMethod": "NotSet",
        "PayFrequency": "Monthly",
        "TaxationStatus": "net",
        "VerificationNumber": "V5678912389",
        "VerificationDate": "2018-04-28T12:00:00",
        "Title": null,
        "FirstName": "Sidney",
        "MiddleName": null,
        "LastName": "James",
        "Initials": null,
        "NiNumber": "YW000009A",
        "CompanyName": null,
        "CompanyRegistrationNumber": null,
        "PartnershipName": null,
        "PartnershipUniqueTaxReference": null,
        "Region": "NotSet",
        "Territory": "UnitedKingdom",
        "Deactivated": "false",
        "Address": null,
        "BankAccount": null
    }
}

Step 4 - Create CIS Instructions

CIS Instructions, similar to Pay Instructions, describe the payments and deductions for materials from the employer contractor to the subcontractor.

In this example we will give our subcontractor wages based on hours worked and a deduction for materials purchased, this is achieved through two distinct instructions.

Note: CIS Instructions are scoped for calcuation using TaxYearStart, TaxPeriodStart and TaxYearEnd, TaxPeriodEnd.

CIS Instruction 1: Subcontractor Wages

curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001/CisInstructions' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<CisInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CisLineType>CISBASIC</CisLineType>
  <PayFrequency>Monthly</PayFrequency>
  <TaxYearStart>2018</TaxYearStart>
  <PeriodStart>1</PeriodStart>
  <TaxYearEnd>2018</TaxYearEnd>
  <PeriodEnd>1</PeriodEnd>
  <UOM>Hour</UOM>
  <Units>30</Units>
  <Value>50.00</Value>
  <VAT xsi:nil="true" />
  <Description>Wages</Description>
  <CisLineTag xsi:nil="true" />
</CisInstruction>'
curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001/CisInstructions' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "CisInstruction": {
    "CisLineType": "CISBASIC",
    "PayFrequency": "Monthly",
    "TaxYearStart": "2018",
    "PeriodStart": "1",
    "TaxYearEnd": "2018",
    "PeriodEnd": "1",
    "UOM": "Hour",
    "Units": "30",
    "Value": "50.00",
    "VAT": null,
    "Description": "Wages",
    "CisLineTag": null
  }
}'

CIS Instruction 2: Subcontractor Materials

curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001/CisInstructions' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<CisInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CisLineType>CISMAT</CisLineType>
  <PayFrequency>Monthly</PayFrequency>
  <TaxYearStart>2018</TaxYearStart>
  <PeriodStart>1</PeriodStart>
  <TaxYearEnd>2018</TaxYearEnd>
  <PeriodEnd>1</PeriodEnd>
  <UOM xsi:nil="true" />
  <Units xsi:nil="true" />
  <Value>500.00</Value>
  <VAT xsi:nil="true" />
  <Description>Materials</Description>
  <CisLineTag xsi:nil="true" />
</CisInstruction>'
curl -X POST \
  'https://api.test.payrun.io/Employer/ER001/SubContractor/SUB001/CisInstructions' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "CisInstruction": {
    "CisLineType": "CISMAT",
    "PayFrequency": "Monthly",
    "TaxYearStart": "2018",
    "PeriodStart": "1",
    "TaxYearEnd": "2018",
    "PeriodEnd": "1",
    "UOM": null,
    "Units": null,
    "Value": "500.00",
    "VAT": null,
    "Description": "Materials",
    "CisLineTag": null
  }
}'

Step 5 - Run the CIS Calculation Job

The CIS Calculation Job is invoked to calculate the correct dedcutions from the subcontrators. You must perform a successful calculation before submitting a monthly return.

If you have both weekly and monthly paid subcontractors then you must invoke separate calculation jobs for each frequency and tax period you require.

To enqueue a calculation you POST a CisCalculateJobInstruction as in the example below.

curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<CisCalculateJobInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <HoldingDate xsi:nil="true" />
  <Employer href="/Employer/ER001" />
  <SubContractors />
  <PayFrequency>Monthly</PayFrequency>
  <TaxYear>2018</TaxYear>
  <TaxPeriod>1</TaxPeriod>
</CisCalculateJobInstruction>'
curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "CisCalculateJobInstruction": {
    "HoldingDate": null,
    "Employer": {
      "@href": "/Employer/ER001"
    },
    "SubContractors": { "SubContractor": [] },
    "PayFrequency": "Monthly",
    "TaxYear": "2018",
    "TaxPeriod": "1"
  }
}'

Step 6 - Perform the Monthly Return (CIS300)

The CIS300 Monthly return should be submitted for each CIS payroll every month. The submission covers both weekly and montly paid subcontractors.

If you have not paid any subcontractors in the period you must still make a nil return submission by setting the NilReturn property to true.

The submission is made by enqueuing a CisReturnJobInstruction as in the example below.

curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml' \
  -d '<?xml version="1.0"?>
<CisReturnJobInstruction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <HoldingDate xsi:nil="true" />
  <Employer href="/Employer/ER001" />
  <SubContractors />
  <Timestamp>2018-04-28T12:00:00</Timestamp>
  <Generate>true</Generate>
  <Transmit>true</Transmit>
  <NilReturn xsi:nil="true" />
  <TaxYear>2018</TaxYear>
  <TaxMonth>1</TaxMonth>
  <InformationCorrect>true</InformationCorrect>
  <EmploymentStatus>false</EmploymentStatus>
  <Verification>false</Verification>
  <Inactivity>false</Inactivity>
</CisReturnJobInstruction>'
curl -X POST \
  'https://api.test.payrun.io/jobs/cis' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json' \
  -d '{
  "CisReturnJobInstruction": {
    "HoldingDate": null,
    "Employer": {
      "@href": "/Employer/ER001"
    },
    "SubContractors": { "SubContractor": [] },
    "Timestamp": "2018-04-28T12:00:00",
    "Generate": "true",
    "Transmit": "true",
    "NilReturn": null,
    "TaxYear": "2018",
    "TaxMonth": "1",
    "InformationCorrect": "true",
    "EmploymentStatus": "false",
    "Verification": "false",
    "Inactivity": "false"
  }
}'

Sample Message

... abreviated message
<CISreturn>
    <Contractor>
        <UTR>7325648155</UTR>
        <AOref>123PP87654321</AOref>
    </Contractor>
    <Subcontractor>
        <Name>
            <Fore>Sidney</Fore>
            <Sur>James</Sur>
        </Name>
        <UTR>1234567882</UTR>
        <NINO>YW000009A</NINO>
        <VerificationNumber>V5678912389</VerificationNumber>
        <TotalPayments>2000.00</TotalPayments>
        <CostOfMaterials>500.00</CostOfMaterials>
        <TotalDeducted>300.00</TotalDeducted>
    </Subcontractor>
    <Declarations>
        <EmploymentStatus>no</EmploymentStatus>
        <Verification>no</Verification>
        <InformationCorrect>yes</InformationCorrect>
    </Declarations>
</CISreturn>
...

Step 7 - View the CIS Transaction

Every CIS submission made to HMRC, whether successfull or not, is recorded as a CIS Transaction object. The CIS Transactions are accessible under the Employer (contractor).

To retrieve the transaction object representing the monthly return made in step 6, we'd issue a GET request.

curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/CisTransaction/CISTRAN002' \
  -H 'Accept: application/xml' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/xml'
curl -X GET \
  'https://api.test.payrun.io/Employer/ER001/CisTransaction/CISTRAN002' \
  -H 'Accept: application/json' \
  -H 'Api-Version: default' \
  -H 'Authorization: {OAuthHeader}' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-type: application/json'

Response Example

<?xml version="1.0"?>
<CisTransaction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <CisMessageType>Return</CisMessageType>
    <TransactionStatus>CompletedWithSuccess</TransactionStatus>
    <Timestamp>2018-04-28T12:00:00</Timestamp>
    <TransmissionDate>2018-10-07T19:54:17.2066497</TransmissionDate>
    <TaxYear>2018</TaxYear>
    <RequestData>
        <![CDATA[
        <?xml version="1.0"?>
<GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
  <EnvelopeVersion>2.0</EnvelopeVersion>
  <Header>
    <MessageDetails>
      <Class>IR-CIS-CIS300MR</Class>
      <Qualifier>request</Qualifier>
      <Function>submit</Function>
      <Transformation>XML</Transformation>
      <GatewayTest>1</GatewayTest>
    </MessageDetails>
    <SenderDetails>
      <IDAuthentication>
        <SenderID>CISRUSER1194</SenderID>
        <Authentication>
          <Method>clear</Method>
          <Role>principle</Role>
          <Value>testing1</Value>
        </Authentication>
      </IDAuthentication>
    </SenderDetails>
  </Header>
  <GovTalkDetails>
    <Keys>
      <Key Type="TaxOfficeNumber">123</Key>
      <Key Type="TaxOfficeReference">R395</Key>
    </Keys>
    <TargetDetails>
      <Organisation>IR</Organisation>
    </TargetDetails>
    <ChannelRouting>
      <Channel>
        <URI>7430</URI>
        <Product>PayRunIO</Product>
        <Version>1.0.0.0</Version>
      </Channel>
      <Timestamp>2018-04-28T12:00:00</Timestamp>
    </ChannelRouting>
  </GovTalkDetails>
  <Body>
    <IRenvelope xmlns="http://www.govtalk.gov.uk/taxation/CISreturn">
      <IRheader>
        <Keys>
          <Key Type="TaxOfficeNumber">123</Key>
          <Key Type="TaxOfficeReference">R395</Key>
        </Keys>
        <PeriodEnd>2018-05-05</PeriodEnd>
        <DefaultCurrency>GBP</DefaultCurrency>
        <IRmark Type="generic">09ZVgh6E7m17GBEiIOdYhVYyxiM=</IRmark>
        <Sender>Employer</Sender>
      </IRheader>
      <CISreturn>
        <Contractor>
          <UTR>7325648155</UTR>
          <AOref>123PP87654321</AOref>
        </Contractor>
        <Subcontractor>
          <Name>
            <Fore>Sidney</Fore>
            <Sur>James</Sur>
          </Name>
          <UTR>1234567882</UTR>
          <NINO>YW000009A</NINO>
          <VerificationNumber>V5678912389</VerificationNumber>
          <TotalPayments>2000.00</TotalPayments>
          <CostOfMaterials>500.00</CostOfMaterials>
          <TotalDeducted>300.00</TotalDeducted>
        </Subcontractor>
        <Declarations>
          <EmploymentStatus>no</EmploymentStatus>
          <Verification>no</Verification>
          <InformationCorrect>yes</InformationCorrect>
        </Declarations>
      </CISreturn>
    </IRenvelope>
  </Body>
</GovTalkMessage>]]>
    </RequestData>
    <ResponseData>
        <![CDATA[
        <?xml version="1.0" encoding="UTF-8"?>
<GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope">
  <EnvelopeVersion>2.0</EnvelopeVersion>
  <Header>
    <MessageDetails>
      <Class>IR-CIS-CIS300MR</Class>
      <Qualifier>response</Qualifier>
      <Function>submit</Function>
      <TransactionID/>
      <CorrelationID>8F903D70A921472889A634AB65960208</CorrelationID>
      <ResponseEndPoint PollInterval="10">https://test-transaction-engine.tax.service.gov.uk/submission</ResponseEndPoint>
      <Transformation>XML</Transformation>
      <GatewayTimestamp>2018-10-07T18:54:20.401</GatewayTimestamp>
    </MessageDetails>
    <SenderDetails/>
  </Header>
  <GovTalkDetails>
    <Keys/>
  </GovTalkDetails>
  <Body>
    <SuccessResponse xmlns="http://www.inlandrevenue.gov.uk/SuccessResponse">
      <IRmarkReceipt>
        <dsig:Signature xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
          <dsig:SignedInfo>
            <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
            <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
            <dsig:Reference>
              <dsig:Transforms>
                <dsig:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
                  <dsig:XPath>(count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body)=count(ancestor-or-self::node())) and (count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body/*[name()='IRenvelope']/*[name()='IRheader']/*[name()='IRmark'])!=count(ancestor-or-self::node()))</dsig:XPath>
                </dsig:Transform>
                <dsig:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
              </dsig:Transforms>
              <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
              <dsig:DigestValue>09ZVgh6E7m17GBEiIOdYhVYyxiM=</dsig:DigestValue>
            </dsig:Reference>
          </dsig:SignedInfo>
          <dsig:SignatureValue>MrszQqUboRACG1KDmqCPukjLDmkmUQA9K9DDZ2fRyl/Rj/WO19cT850HjBGFRCnb/iOymIqV9qH7RiheXaOTkWDGTY37L/OBxybnUX6pFahQcvLJbtG1s+tYiCwbNdot6E/BbukzCIQ8OcJop+K5OxOxSI4lZoJC6O7AH+Kv2ixOkh9OEqRN8Hxh3AN49E7+Pu/2cRW8ypJv9QZ/JS8b/Ygv4GRUKXDl44lKVGiYZMSP+K17OsJEK+SJZZVoo2wjcj4BAmyPmuWZ/zEhYaidU3tu/Q6dJe9YM3RDlZzLDQm1fGn9SbvTO/MMJx4iMohd+rehv3wJ1vs71CLqInFxQQ==</dsig:SignatureValue>
          <dsig:KeyInfo>
            <dsig:X509Data>              <dsig:X509Certificate>MIIG4DCCBcigAwIBAgIQbPShj7N1n3f8XKM/C8UIOTANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVjIENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE3MDExMjAwMDAwMFoXDTE5MDQxMzIzNTk1OVowcTELMAkGA1UEBhMCR0IxEDAOBgNVBAgMB1RlbGZvcmQxEDAOBgNVBAcMB1RlbGZvcmQxHzAdBgNVBAoMFkhNIFJldmVudWUgYW5kIEN1c3RvbXMxHTAbBgNVBAMMFGlyYTc0ODMyLmhtcmMuZ292LnVrMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtPlF2871+5rOSLKBfgXIkiLK4hYS2+e9fF81zzZCcamwMOyWBlbzVlauIm1trBvSiyEpHgS9Z+krl7Oqbd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uUqmAYAiBAvvhKVKvfDfUJjacipfyn9jYJoar/zutmtzrxm97EmAB3ALx44d/F9jxoRkkzTaEPoV8JeWkgCcCBtPP2kX8+2bilAAABWZIaOnEAAAQDAEgwRgIhAL1kbzj4AnIqmra7ZTMQP1X8P+oYeALCZbmUYJu/tABuAiEAl2/b+t23h1BZGwVeSla48PxW3rp4Egc9HTbl1ldGCf8AdwC72d+8H4pxtZOUI5eqkntHOFeVCqtS6BqQlmQ2jh7RhQAAAVmSGjmdAAAEAwBIMEYCIQDA3GTeKNVVvUbEodgwCrObI+dMR5nzKUqgI3RyRyogfQIhAKjfxc02/a0vWtqEhPnp0ERTGK8s2FeWL85LHqZLDnBpMA0GCSqGSIb3DQEBCwUAA4IBAQCv5xHaDTZEO+BYbnyRtTPMdZk4yuW9eo23uidm8hGmIUK2XPaz49hCWJv0jwj+szfDJ5sOXrbeRfC65Tt9F9VrQ0rEDE2Ld1m32/bBJEL50jqF94RRiii1SzJCF85Doo7QP+4b3jVWirw53waedffeqRbKjFXq84QW1dhYMhj6cX1j/vdu37OgnkjPGruF3qMHI1wF8IX+8od7OGrAe0cxa0whdNiDSkqhB3QTNGU2sCEc3drpITCsxGl1jytHR7t9iaEruO5R8lw6bLa35sGFNhEx5mZp69jDZWRsdXNbvEsBZsFDrGOtWBPZLHocdL3JHmrvdCe9G/cct/kBQDYc</dsig:X509Certificate>
            </dsig:X509Data>
          </dsig:KeyInfo>
        </dsig:Signature>
        <Message code="1">HMRC has received the IR-CIS-CIS300MR  document ref: 123/R395 at 19.54 on 07/10/2018. The associated IRmark was: 2PLFLAQ6QTXG26YYCERCBZ2YQVLDFRRD. We advise you to keep this receipt in both electronic and hardcopy versions for your records. You may wish to use them to identify your submission in the future.</Message>
      </IRmarkReceipt>
      <Message code="9004">The Monthly Return has been processed and passed full validation</Message>
      <AcceptedTime>2018-10-07T19:54:17.225</AcceptedTime>
    </SuccessResponse>
  </Body>
</GovTalkMessage>]]>
    </ResponseData>
    <EmployerCore title="Employer: [CIS Employer:ER001]" href="/Employer/ER001" rel="Employer" />
</CisTransaction>
{
    "CisTransaction": {
        "CisMessageType": "Return",
        "TransactionStatus": "CompletedWithSuccess",
        "Timestamp": "2018-04-28T12:00:00",
        "TransmissionDate": "2018-10-07T19:54:17.2066497",
        "TaxYear": "2018",
        "RequestData": {
            "#cdata-section": "<?xml version=\"1.0\"?><GovTalkMessage xmlns=\"http://www.govtalk.gov.uk/CM/envelope\"><EnvelopeVersion>2.0</EnvelopeVersion><Header><MessageDetails><Class>IR-CIS-CIS300MR</Class><Qualifier>request</Qualifier><Function>submit</Function><Transformation>XML</Transformation><GatewayTest>1</GatewayTest></MessageDetails><SenderDetails><IDAuthentication><SenderID>CISRUSER1194</SenderID><Authentication><Method>clear</Method><Role>principle</Role><Value>testing1</Value></Authentication></IDAuthentication></SenderDetails></Header><GovTalkDetails><Keys><Key Type=\"TaxOfficeNumber\">123</Key><Key Type=\"TaxOfficeReference\">R395</Key></Keys><TargetDetails><Organisation>IR</Organisation></TargetDetails><ChannelRouting><Channel><URI>7430</URI><Product>PayRunIO</Product><Version>1.0.0.0</Version></Channel><Timestamp>2018-04-28T12:00:00</Timestamp></ChannelRouting></GovTalkDetails><Body><IRenvelope xmlns=\"http://www.govtalk.gov.uk/taxation/CISreturn\"><IRheader><Keys><Key Type=\"TaxOfficeNumber\">123</Key><Key Type=\"TaxOfficeReference\">R395</Key></Keys><PeriodEnd>2018-05-05</PeriodEnd><DefaultCurrency>GBP</DefaultCurrency><IRmark Type=\"generic\">09ZVgh6E7m17GBEiIOdYhVYyxiM=</IRmark><Sender>Employer</Sender></IRheader><CISreturn><Contractor><UTR>7325648155</UTR><AOref>123PP87654321</AOref></Contractor><Subcontractor><Name><Fore>Sidney</Fore><Sur>James</Sur></Name><UTR>1234567882</UTR><NINO>YW000009A</NINO><VerificationNumber>V5678912389</VerificationNumber><TotalPayments>2000.00</TotalPayments><CostOfMaterials>500.00</CostOfMaterials><TotalDeducted>300.00</TotalDeducted></Subcontractor><Declarations><EmploymentStatus>no</EmploymentStatus><Verification>no</Verification><InformationCorrect>yes</InformationCorrect></Declarations></CISreturn></IRenvelope></Body></GovTalkMessage>"
        },
        "ResponseData": {
            "#cdata-section": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><GovTalkMessage xmlns=\"http://www.govtalk.gov.uk/CM/envelope\"><EnvelopeVersion>2.0</EnvelopeVersion><Header><MessageDetails><Class>IR-CIS-CIS300MR</Class><Qualifier>response</Qualifier><Function>submit</Function><TransactionID></TransactionID><CorrelationID>8F903D70A921472889A634AB65960208</CorrelationID><ResponseEndPoint PollInterval=\"10\">https://test-transaction-engine.tax.service.gov.uk/submission</ResponseEndPoint><Transformation>XML</Transformation><GatewayTimestamp>2018-10-07T18:54:20.401</GatewayTimestamp></MessageDetails><SenderDetails /></Header><GovTalkDetails><Keys></Keys></GovTalkDetails><Body><SuccessResponse xmlns=\"http://www.inlandrevenue.gov.uk/SuccessResponse\"><IRmarkReceipt><dsig:Signature xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\"><dsig:SignedInfo><dsig:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"></dsig:CanonicalizationMethod><dsig:SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"></dsig:SignatureMethod><dsig:Reference><dsig:Transforms><dsig:Transform Algorithm=\"http://www.w3.org/TR/1999/REC-xpath-19991116\"><dsig:XPath>(count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body)=count(ancestor-or-self::node())) and (count(ancestor-or-self::node()|/gti:GovTalkMessage/gti:Body/*[name()='IRenvelope']/*[name()='IRheader']/*[name()='IRmark'])!=count(ancestor-or-self::node()))</dsig:XPath></dsig:Transform><dsig:Transform Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"></dsig:DigestMethod><dsig:DigestValue>09ZVgh6E7m17GBEiIOdYhVYyxiM=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo><dsig:SignatureValue>MrszQqUboRACG1KDmqCPukjLDmkmUQA9K9DDZ2fRyl/Rj/WO19cT850HjBGFRCnb/iOymIqV9qH7RiheXaOTkWDGTY37L/OBxybnUX6pFahQcvLJbtG1s+tYiCwbNdot6E/BbukzCIQ8OcJop+K5OxOxSI4lZoJC6O7AH+Kv2ixOkh9OEqRN8Hxh3AN49E7+Pu/2cRW8ypJv9QZ/JS8b/Ygv4GRUKXDl44lKVGiYZMSP+K17OsJEK+SJZZVoo2wjcj4BAmyPmuWZ/zEhYaidU3tu/Q6dJe9YM3RDlZzLDQm1fGn9SbvTO/MMJx4iMohd+rehv3wJ1vs71CLqInFxQQ==</dsig:SignatureValue><dsig:KeyInfo><dsig:X509Data><dsig:X509Certificate>MIIG4DCCBcigAwIBAgIQbPShj7N1n3f8XKM/C8UIOTANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAdBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVjIENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE3MDExMjAwMDAwMFoXDTE5MDQxMzIzNTk1OVowcTELMAkGA1UEBhMCR0IxEDAOBgNVBAgMB1RlbGZvcmQxEDAOBgNVBAcMB1RlbGZvcmQxHzAdBgNVBAoMFkhNIFJldmVudWUgYW5kIEN1c3RvbXMxHTAbBgNVBAMMFGlyYTc0ODMyLmhtcmMuZ292LnVrMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtPlF2871+5rOSLKBfgXIkiLK4hYS2+e9fF81zzZCcamwMOyWBlbzVlauIm1trBvSiyEpHgS9Z+krl7OqbdJi3hZHFQzw3t0DMA00CyNYaxnBLhWuSkMPFZ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zutmtzrxm97EmAB3ALx44d/F9jxoRkkzTaEPoV8JeWkgCcCBtPP2kX8+2bilAAABWZIaOnEAAAQDAEgwRgIhAL1kbzj4AnIqmra7ZTMQP1X8P+oYeALCZbmUYJu/tABuAiEAl2/b+t23h1BZGwVeSla48PxW3rp4Egc9HTbl1ldGCf8AdwC72d+8H4pxtZOUI5eqkntHOFeVCqtS6BqQlmQ2jh7RhQAAAVmSGjmdAAAEAwBIMEYCIQDA3GTeKNVVvUbEodgwCrObI+dMR5nzKUqgI3RyRyogfQIhAKjfxc02/a0vWtqEhPnp0ERTGK8s2FeWL85LHqZLDnBpMA0GCSqGSIb3DQEBCwUAA4IBAQCv5xHaDTZEO+BYbnyRtTPMdZk4yuW9eo23uidm8hGmIUK2XPaz49hCWJv0jwj+szfDJ5sOXrbeRfC65Tt9F9VrQ0rEDE2Ld1m32/bBJEL50jqF94RRiii1SzJCF85Doo7QP+4b3jVWirw53waedffeqRbKjFXq84QW1dhYMhj6cX1j/vdu37OgnkjPGruF3qMHI1wF8IX+8od7OGrAe0cxa0whdNiDSkqhB3QTNGU2sCEc3drpITCsxGl1jytHR7t9iaEruO5R8lw6bLa35sGFNhEx5mZp69jDZWRsdXNbvEsBZsFDrGOtWBPZLHocdL3JHmrvdCe9G/cct/kBQDYc</dsig:X509Certificate></dsig:X509Data></dsig:KeyInfo></dsig:Signature><Message code=\"1\">HMRC has received the IR-CIS-CIS300MR  document ref: 123/R395 at 19.54 on 07/10/2018. The associated IRmark was: 2PLFLAQ6QTXG26YYCERCBZ2YQVLDFRRD. We advise you to keep this receipt in both electronic and hardcopy versions for your records. You may wish to use them to identify your submission in the future.</Message></IRmarkReceipt><Message code=\"9004\">The Monthly Return has been processed and passed full validation</Message><AcceptedTime>2018-10-07T19:54:17.225</AcceptedTime></SuccessResponse></Body></GovTalkMessage>"
        },
        "EmployerCore": {
            "@title": "Employer: [CIS Employer:ER001]",
            "@href": "/Employer/ER001",
            "@rel": "Employer"
        }
    }
}