Files and SFTP
Bulk exchanges (blocks sent by the bank, authorization journal, accounting report, the networks’ clearing, manufacturing) go through files. Each file is checked line by line against its format, integrated in the background, and followed until its acknowledgement.
Through the API
Section titled “Through the API”curl -s -X POST "http://localhost:3000/files?file_type=UBO_CARD_STATUS&name=CARD_STATUS_20261127.csv&source=api" \ -H "Authorization: Bearer $TOKEN" --data-binary @CARD_STATUS_20261127.csvThe answer gives the file, its status (validated or rejected) and its anomalies. Then follow
GET /files/{id} until integrated (or partially_integrated, with the detail per line in
GET /files/{id}/records), or subscribe to the file.* events.
| Type | Direction | Content |
|---|---|---|
UBO_CARD_STATUS |
Bank → UBO | Blocks, unblocks, losses, thefts, cancellations (delimited, with the last 4 digits as a check) |
UBO_AUTH_JOURNAL |
UBO → bank | Daily journal of the authorizations (fixed positions, control totals) |
| Accounting report | UBO → bank | The day’s accounting report |
| Clearing | Network → UBO | Presentments, withdrawals, refunds, reversals (BASE II) |
GET /files/types gives the current list and GET /files/formats/{code}/{version} a format’s definition.
Over SFTP
Section titled “Over SFTP”- Your access: the bank opens an exchange point for you. You receive the server, the port (
2222in development), your identifier and the fingerprint of the server’s key, to check at the first connection. - Your key: generate a pair (
ssh-keygen -t ed25519 -f ubo_sftp) and send only the public key. Accepted keys: Ed25519, ECDSA, RSA of at least 3,072 bits. Only SFTP is open. - Connect:
sftp -P 2222 -i ubo_sftp <identifier>@<server>.
| Folder | You can | Content |
|---|---|---|
in/ |
drop, rename | the files you send |
out/ |
read, download | the files prepared for you |
ack/ |
read, download | the acknowledgements of your drops |
error/ |
read, download | your refused files, with the reason |
Dropping
Section titled “Dropping”- Name the file per the agreed pattern (
CARD_STATUS_<date>.csv…), with a unique name. - Write it under a temporary name (
.part,.tmp,.filepart) then rename it: a temporary file is never read. - If agreed, drop its fingerprint
<name>.sha256first (sha256sumformat), or the encrypted file<name>.pgp(encrypted for the bank’s public key, signed with yours).
Once the file is processed, the platform writes the acknowledgement ack/<name>.ack.json:
{ "file": "CARD_STATUS_20261120.csv", "sha256": "9f86d0…", "status": "integrated", "status_label": "Intégré", "records": { "details": 120, "valid": 119, "rejected": 1, "integrated": 119, "failed": 0 }, "issues": [ { "code": "…", "message": "…" } ] }status |
Meaning |
|---|---|
integrated |
All the lines were taken into account |
partially_integrated |
Only some; the detail is in issues |
rejected |
File refused: wrong format or totals, different fingerprint, duplicate, unknown type |
integration_failed |
Platform error, taken back without action from you |
A refused file is also returned in error/ with <name>.reason.txt. Fix it and drop it again under
another name: the same content is recognised as a duplicate.
Collecting
Section titled “Collecting”The files prepared for you arrive in out/ (with <name>.sha256 if agreed). After the download, check the
fingerprint (sha256sum -c <name>.sha256) then acknowledge by dropping an empty file <name>.ok into
in/, or refuse with <name>.ko containing the reason.

