Review and Submit the FPS

An Fps is automatically created for every date on which you make a payment.

If the AutoSubmitFps property of the Employers RtiSubmissionSettings is set to true then the FPS will have been automatically submitted. If not then you'll need to submit it via the API

RTI Credentials

If you haven't done so already you will need to set the RtiSubmissionSettings and HmrcDetails for the Employer to provide your credentials for submitting to HMRCs RTI Gateway

This can be done by updating the Employer.

Updating the Employer

Setting the RtiSubmissionSettings and HmrcDetails
{
 "name": "Acme Limited",
 "address": {
  "line1": "123 High Street",
  "postCode": "SE1 2TU",
  "country": "England"
 },
 "startYear": "Year2018",
 "rtiSubmissionSettings": {
  "senderType": "Employer",
  "senderId": "your_sender_id",
  "password": "your_rti_password",
  "contact": {
   "firstName": "",
   "lastName": "",
   "email": "you@yourdomain.com"
  }
 },
 "hmrcDetails": {
  "officeNumber": "123",
  "payeReference": "A123",
  "quarterlyPaymentSchedule": true
 }
}
Note: Your password will be encrypted. In all future updates to the Employer leave the password field as null to avoid overwriting it.

List FPS

Use the API call to list all of your FPS.
The result is a list of Items[] and the metadata property of each Item has a status property.
Your un-submitted items will have a status of NotSubmitted.
You can use the url property of the metadata to retrieve the Fps.

As well as JSON formatted data, the Fps model also has an xml property so you can review the full XML that will be submitted to HMRC if you wish.

Submit the FPS

Once you have reviewed the Fps you can submit it to HMRC with a single API call.
We'll poll HMRC in the background and update the Fps when there is a response. To check it has been accepted you simply need to retrieve the Fps and check the status field of its GovTalkSubmission property. It'll change to Accepted once it has been accepted by HMRC.

Dealing with Errors

If HMRC return an error for the Fps then its GovTalkSubmission property will have a status of ErrorResponse.
To help you find the specifics of the error you should examine the errors property which contains a list of GovTalkError[] .