---
title: "Upload payment file data"
method: POST
path: "/pay-file/upload-data"
tags: ["pay-file"]
---

# Upload payment file data

`POST /pay-file/upload-data`

## Request

- Base URL: `https://identity.moneyhub.co.uk`
- URL: `https://identity.moneyhub.co.uk/pay-file/upload-data`
- Auth: API key in header `Authorization`

Uploads payment file data for processing. Requires **pay_file:write** scope.

## Request body

- PayFileDataPost
  - `providerId` string, required: The ID of the destination provider (bank) for the file
  - `payments` object[], required: The payments to be uploaded
  - `payeeFormat` 'payees' | 'payeeId', required: The format of the payees in the payment objects

## Response `200`

Successful Pay File Data Upload Response

- object
  - `data` PayFile
    - `id` string, uuid, required: Unique identifier of the pay file
    - `fileName` string, required: Original name of the uploaded file
    - `fileHash` string, required: Base64 encoded hash of the file content
    - `transactionCount` integer, required: Number of transactions in the file
    - `controlSum` string, required: Total value of all transactions in the file
    - `fileType` 'csv' | 'xml' | 'json', required: Type of the payment file
    - `createdAt` string, date-time, required: Timestamp when the file was uploaded
    - `expiredAt` string, date-time, nullable: Timestamp when the file expires, if applicable
    - `fileData` string, required: Stringified content of the payment file
    - `fileByteSize` integer, required: Size of the file in bytes
    - `providerId` string, required: ID of the destination provider (bank) for the file
  - `meta` object

## Other responses

- `400`: Unsuccessful Response - Bad request - Missing or invalid parameters
- `401`: Unsuccessful Response - Not authorised - Missing authorization header - Invalid access Token
- `403`: Unsuccessful Response - Forbidden - Invalid scopes

## Changes

- **2026-11-03** `e004d9ee1fdb`: 6 warning
  - removed the optional property `id` from the response with the `400` status
  - removed the optional property `id` from the response with the `401` status
  - removed the optional property `id` from the response with the `403` status
  - removed the optional property `userId` from the response with the `400` status
  - …2 more

[Operation history](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/changes/pay-file/upload-data/post.md)

---

[API](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service.md) - [All operations](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/llms.txt) - [OpenAPI document](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/revisions/e004d9ee1fdb?raw)
