File Payment Document Upload
This guide provides a detailed walkthrough on how users can upload a raw payment file.
Scope Requirements
To be able to upload you file payment, your API client must have the necessary authorisation scopes enabled. To have these scopes set up, please reach out to your Moneyhub contact. Below is a list of the required scopes and their corresponding actions:
| Name | Action | Required |
|---|---|---|
pay_file_upload:write | Upload a file | Yes |
pay_file_upload:read | Read a file | Yes |
File Upload
Before creating a file-payment-consent, you must upload your payment file for processing. To achieve this, perform a POST https://identity.moneyhub.co.uk/pay-file request, passing the following data as form data:
| Key | Description | Required |
|---|---|---|
file | The payment file in raw format | Yes |
transactionCount | The total number of transactions within the file | Yes |
controlSum | The total of all individual amounts included in the file | Yes |
providerId | The ID of the destination provider (bank) for the file | Yes |
Request Example
curl -X POST "https://identity.moneyhub.co.uk/pay-file"
-H "accept: application/json"
-F 'file=@"/payments-2024.csv"'
-F 'transactionCount="1"'
-F 'controlSum="15000.50"'
-F 'providerId="DESTINATION_PROVIDER_ID"'Successful Response Example
{
"data": {
"id": "UUID",
"clientId": "YOUR_CLIENT_ID",
"fileName": "payments-2024.csv",
"fileHash": "223d3718d1fdd6f8647769d2fbb4aa7e7cb1d79756cf627698c6aa442d45d124",
"transactionCount": 1,
"controlSum": "1500.50",
"fileType": "csv",
"createdAt": "2024-11-07T12:12:23.819Z",
"expiredAt": null,
"fileData": "TransactionID,Date,Payer,Payee,Amount,Description\n" +
"TXN0001,2024-01-05,John Doe,Acme Corp,1500.50,Consulting Services",
"fileByteSize": 135,
"providerId": "DESTINATION_PROVIDER_ID"
},
"meta": {}
}Keep note of the id parameter; it will be required during the creation of file-payment-consent as this will be used as the payFileId.
Updated 9 months ago
