Skip to main content

Flow of uploading files

For uploading files you send a list of files to upload:
{
  "files": [
    {
      "byte_size":    "12345",
      "checksum":     "JVBERi0xLjQKJeLjz9MKMSAwIG9iajw8L0NvbnETCETERA...",
      "content_type": "application/pdf"
    }
  ],
  "administration_id": "1"
}
Payt will return a list of files that need uploading. Files that are already present are not returned.
[
  {
    "checksum":     "JVBERi0xLjQKJeLjz9MKMSAwIG9iajw8L0NvbnETCETERA...",
    "expires_at":   "timestamp_4_hours_from_now",
    "url":          "https://url_to_upload_file.paytsoftware.com"
  }
]
After that, you can upload the file to the presented URL. There the file will be checked if it matches on byte_size, content_type and checksum.
curl --request PUT \
  --url http://localhost:3000/file_storage/disk/eyJfcmFpbHMiOnsiZGF0YSI6eyJjaGVja3N1bSI6IkRyL0xQVTdUUVZLNHB3Lzh3WEs4cEV2VzBjL3BDSkh0Qi9CYldLMENzZmIydkJQN21EQjFZajBSTjg2STNvcUZBT0tlOGJTdGsxcTJ5b0poYlpJRjBRPT0iLCJjb250ZW50X3R5cGUiOiJhcHBsaWNhdGlvbi9wZGYiLCJjb250ZW50X2xlbmd0aCI6NDM2MTZ9LCJleHAiOiIyMDI0LTA5LTE3VDEyOjA0OjI4LjU2MloiLCJwdXIiOiJibG9iX3Rva2VuIn19--75d0d86602ca4f7dbe7126d4c46c6c8fce898b69 \
  --header 'Content-Type: application/pdf' \
  --data 'JVBERi0xLjQKJeLjz9MKMSAwIG9iaiAKPDwKL00gKEQ6MjAxMjAzMjcxMD...='

Checking file integrity

Payt uses checksum values to verify the integrity of data that you upload. Payt uses the Secure Hash Algorithm 3 with 512 bits (SHA3-512). This is encoded with Base64 encoding. This results in a string with 88 characters, the length of this checksum will be validated.

Fields

Field nameDescription
checksumChecksum of file with SHA3-512 hashing and Base64 encoding
byte_sizeSize of file in bytes
content_typeMime type of file
Last modified on June 12, 2026