finance-admin-upload-processed

Summary

The payment report has been successfully processed

Context

The finance hub API will automatically process payment reports uploaded to it’s S3 directory. This event triggers an email to the uploader outlining the results of the report’s processing.

Trigger

A payment report is processed.

Effect

An email is sent to the report’s uploader describing its success, partial failure or full error, and the reason.

Examples

{
  "emailAddress": "test@email.com",
  "uploadType": "PAYMENTS_MOTO_CARD",
  "error": "Failed to read file"
}
{
  "emailAddress": "test@email.com",
  "uploadType": "PAYMENTS_MOTO_CARD",
  "failedLines": ["Line 1: Duplicate payment", "Line 5: Failed to parse date"]
}
{
  "emailAddress": "test@email.com",
  "uploadType": "PAYMENTS_MOTO_CARD"
}

Schema

{
  "$id": "https://opg.service.justice.gov.uk/opg.supervision.sirius/finance-admin-upload-processed.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "opg.supervision.sirius/finance-admin-upload-processed",
  "type": "object",
  "properties": {
    "emailAddress": {
      "type": "string",
      "description": "The email address of the user who uploaded the report"
    },
    "error": {
      "type": "string",
      "description": "A description of the error that occurred which caused the report to not be processed"
    },
    "uploadType": {
      "type": "string",
      "description": "The key for the upload type that has been uploaded"
    },
    "failedLines": {
      "type": "array",
      "description": "The lines of the report which were unable to be processed successfully",
      "items": {
        "type": "string",
        "description": "The line's index and a description of why the line couldn't be processed"
      }
    }
  },
  "required": ["emailAddress"]
}

Event Flow