Integration by FilesTXT allows a POS to send sales to ImaCash generating.txt files in a configured folder. ImaCash monitors that folder, reads the pending files and creates the corresponding transaction within the system.
Each file must contain a single transaction on the first line. The file name can be free, although it is recommended to use the ticket number to facilitate traceability. The actual identifier of the operation is taken from the third field of the content.
File example
```txt
0.10;2;12347;ALEX;2025-10-28 12:40:00;1
File format
Each line must have 6 fields separated by semicolons ;.

Response from ImaCash
When the transaction completes, ImaCash generates a response file in the same folder using the ticket number.
- If the operation completes successfully: 12347.OK
- If the operation is canceled: 12347.KO
These response files do not contain data; Its presence indicates the result of the operation. The original file is filed internally in subfolders as processed or error, and the response visible to the POS is the file {ticket}.OK or {ticket}.KO.
Important rules
- Each.txt file must contain a single operation.
- ImaCash only reads the first line of the file.
- The ticket number must be unique.
- If the format does not have exactly 6 fields, the file is treated as wrong.
- If the file is empty or cannot be interpreted, it is moved to error.
- If the facility does not accept card transactions, 1 must be submitted as a payment method.
- The field separator should always be;.
Integration flow
- The POS generates a .txt file in the configured folder.
- ImaCash detects the file and reads the first line.
- If the format is correct, it creates the transaction with the indicated ticket number.
- The original file is moved to the corresponding internal subfolder.
- Upon completion of the operation, ImaCash generates the empty response file (.OK or .KO) in the folder for the POS.