Skip to main content
Imports let you load data into Payt in bulk. You submit files and Payt processes them automatically. Supported types are data files (CSV, XML), declaration files (MZ301, AP304, ZIP), and PDF/UBL invoice documents. Files are picked up daily, typically around 01:00 AM; the exact time is shown in the import settings of the administration. This page covers the shared rules, endpoints, and request format. For the structure of the data files themselves, see CSV, XML, and JSON.

Basics

  • HTTP
  • JSON
  • Base64 encoding for binary files.
  • UTF-8 encoding for data files.
  • SSL is required. Use at least TLSv1.2.
  • Files are processed daily, usually around 01:00 AM. The actual time can be found in the import settings of the specific administration.
  • If no data file is available for the automatic import a notification is added to the import page.
  • Any PDF files of the original invoices are linked based on the file name. The file name must contain the exact invoice number of the invoice. Example: 141234.PDF can be linked to invoice 141234. In order to link the files properly, a setting on the Payt side must be made by the implementation specialist or the service desk.
  • In the Import tab of the relevant administration within Payt, linking based on supplied CSV files and automatic import must be enabled. The administration code must also be entered directly.
  • When using the FTP/SFTP integration, it is also possible to provide files in a zip archive. These archives will automatically be unarchived in the same directory. Note: only files are unarchived, directories within the zip archive will be ignored.
  • When using the HTTP endpoints, it is also possible to provide gzipped files. Files with a .gz extension will automatically be decompressed before further processing. Make sure the extension of the original file is intact (e.g. 20220728.csv.gz will be decompressed and processed as 20220728.csv).

Endpoints

Submit a POST request to one of the following endpoints, depending on the file type:
File typeEndpoint
CSV / XML data filehttps://backend.paytsoftware.com/import/files/csv
Invoice PDFhttps://backend.paytsoftware.com/import/files/invoice_pdf
Invoice UBLhttps://backend.paytsoftware.com/import/files/invoice_ubl
Invoice attachmenthttps://backend.paytsoftware.com/import/files/invoice_attachment
Declaration file (MZ301/AP304/ZIP)https://backend.paytsoftware.com/import/files/declaration_file
Different status codes may be returned when submitting files. If successful, a status code 2xx will be returned. If this is not the case, the delivery of the file was not successful and delivery must be tried again. Please note you can upload at most three files per second. Should you cause more traffic on this endpoint, you will receive a 429 response. The file should then be resubmitted.

Format of the data

Provide the following headers with the POST request:
  • Accept-Charset: UTF-8
  • Accept: application/json
  • Content-Type: application/json
As request body you provide a JSON as below:
{
  "file": {
    "filename": "20190414.csv",
    "base64_data": "JVBERi0xLjQKJeLjz9MKMSAwIG9iajw8L0NvbnETCETERA..."
  },
  "administration_code": "ADM_2"
}
Many base64 libraries generate their output with line breaks every 76 characters (due to support for legacy email systems). Line breaks are not valid in JSON strings, so must be removed.
If a request is made to place a data file, an import token can be included. An import token is linked to the account belonging to the administration. The token can be sent as a field import_token in the same way as administration_code will be sent:
{
  "file": {
    "filename": "20190414.csv",
    "base64_data": "JVBERi0xLjQKJeLjz9MKMSAwIG9iajw8L0NvbnETCETERA..."
  },
  "administration_code": "ADM_2",
  "import_token": "4e1243bd22c66e76c2ba9eddc1f91394e57f9f83"
}
Instead of the administration_code an administration_id can also be used:
{
  "file": {
    "filename": "20190414.csv",
    "base64_data": "JVBERi0xLjQKJeLjz9MKMSAwIG9iajw8L0NvbnETCETERA..."
  },
  "administration_id": 1337,
  "import_token": "4e1243bd22c66e76c2ba9eddc1f91394e57f9f83"
}
Last modified on June 15, 2026