Corgi BankDocumentation
OpenAPI

Deliver a network clearing and settlement file by upload

POST/cards/clearing/files

Verified staff on the card clearing desk's narrow scopes only: cards:clearing:read for reads, cards:clearing:write with a step-up within five minutes for writes; cards:write does not reach these routes and no service token or API key does. The file formats are bank-defined approximations of the proprietary Visa BASE II, Mastercard IPM and Discover clearing specifications (services/cards/clearing/README.md); a file from the card clearing simulator is simulated, not network traffic. Delivers a network file by upload as standard padded base64 (at most 16 MiB decoded). The file is decoded in the network's format and validated whole (header, every record, ARN check digits, conversion arithmetic, trailer control totals) or refused whole. A file dated after the bank business date is refused. The network file reference is the identity: the same content again returns the retained file with 200 and replayed true; other content under the same reference is 409 conflict.

Headers

Idempotency-KeystringOptional

Send on every write that creates or changes money or state; a replay with the same key returns the original result with 200.

Body parameters

content_base64stringRequired
networkstringRequired

Returns

200 OK

content_sha256stringRequired
dispositionsobjectRequired

Dispositions count a file's records by outcome.

5 child attributes
exceptionsintegerRequired
feesintegerRequired
pendingintegerRequired
postedintegerRequired
return_matchedintegerRequired
headerobjectRequired

Header is a file without its records.

7 child attributes
file_referencestringRequired
formatstringRequired
institution_idstringRequired
networkstringRequired
processing_datestring · dateRequired

A business date, YYYY-MM-DD

settlement_datestring · dateRequired

A business date, YYYY-MM-DD

totalsobjectRequired

Totals are a file's trailer control totals.

8 child attributes
credit_countintegerRequired
credit_minorintegerRequired
debit_countintegerRequired
debit_minorintegerRequired
interchange_minorintegerRequired
net_settlement_minorintegerRequired

Signed: positive is paid to the issuer

scheme_fee_minorintegerRequired
transaction_countintegerRequired
idstringRequired
received_atstring · date-timeRequired
received_bystringRequired
replayedbooleanRequired
settlement_idstringOptional

The applied settlement reconciliation

size_bytesintegerRequired
sourcestringRequired
source_referencestringRequired

Errors

Every error is a problem document with a stable code. See Errors.

400401403404409412413422424429500503

to move to open esc to close