ValidateFin

CPA-005 / AFT Validator Canada

Open a Canadian AFT file, check that it balances against its own trailer, and read every payment, reversal and return it carries — entirely in your browser.

CPA-005EFT 1464Payments CanadaStandard 007100% local
100% Local

What is a CPA-005 (AFT) file and how do you validate one?

A CPA-005 file — also called an AFT file or EFT 1464 — is the format Canadian financial institutions use to exchange bulk payments: direct deposits and pre-authorised debits. Every record is exactly 1,464 characters: a 24-character prefix followed by six 240-character segments, so a single record carries up to six transactions. The file opens with an "A" header and closes with a "Z" trailer that declares four separate pairs of control totals. Validating one means checking that the logical record count increases by exactly one per record, that every record repeats the header's originator ID and file creation number, and that the trailer totals match the transactions actually present — credits (C and I) apart from debits (D and J), and the error corrections E and F on counters of their own.

Puntos clave

  • CPA-005 (también llamado AFT o EFT 1464) es el archivo canadiense de pagos masivos: registros de 1 464 caracteres — un prefijo de 24 y seis segmentos de 240, es decir hasta seis transacciones por registro.
  • C es el abono (un depósito) y D el adeudo (un cargo preautorizado). E anula un C, F anula un D, I devuelve un C y J devuelve un D.
  • El trailer Z lleva CUATRO pares de totales distintos: las correcciones E y F nunca se suman a los totales de adeudos y abonos.
  • No existe dígito de control en un número de ruta canadiense — a diferencia del ABA estadounidense. Comprobamos su forma (un cero inicial, 3 dígitos de institución, 5 de sucursal) y nunca inventamos una aritmética que la norma no define.
  • Fuentes: normas 005 (2024) y 007 (2026) de Payments Canada. 100 % en su navegador — nada se transmite.

The Canadian bulk-payment file, checked against the standard itself

ValidateFin reads a CPA-005 AFT file against Payments Canada Standard 005 (2024 edition) and Standard 007 (2026 edition), both read in full. The validator recomputes the four pairs of trailer totals from the segments, verifies the logical record count and the origination control data that tie every record back to the header, decodes the 0YYDDD Julian dates, and labels every transaction code and 900-series return reason code the standard publishes.

One thing it deliberately does NOT do: invent a check digit. Unlike the US ABA routing number and its 3-7-1 rule, a Canadian routing number carries no checksum at all — Standard 005 validates it against the Financial Institutions File, and Standard 006 defines no arithmetic. So we check the shape (a constant leading zero, a 3-digit institution number, a 5-digit branch) and stop there. Inventing a check would reject perfectly valid files.

Key takeaways

  • C is the credit (a deposit) and D the debit (a pre-authorised debit). E reverses a C, F reverses a D, I returns a C and J returns a D. Several published summaries have C and D the other way round.
  • The Z trailer carries four separate pairs of totals. Folding the E and F error corrections into the debit and credit totals breaks the balance of every file that carries a reversal.
  • Positions 230-251 are a plain filler on a C or a D, but carry the Stored Item Trace Number — the pointer back to the original payment — on an E, F, I or J.
  • The date format is 0YYDDD: a constant zero, the two-digit year, then the day of the YEAR (1-366), not the day of the month.

Frequently asked questions

What is the difference between CPA-005, AFT and EFT 1464?

They are three names for the same thing. CPA-005 is the number of the Payments Canada standard ("Standards for the Exchange of Financial Data on AFT Files"). AFT stands for Automated Funds Transfer, the payment stream it carries. "EFT 1464" is the informal name banks use, after the 1,464-character length of each record.

Does a Canadian routing number have a check digit like the US ABA number?

No. The US ABA routing number has the 3-7-1 modulo 10 check digit; the Canadian routing number has nothing of the sort. Standard 005 requires the number to be present on the Payments Canada Financial Institutions File, and Standard 006 (which defines the MICR encoding) contains no checksum at all. The only checks possible on the file alone are structural: nine digits, a constant leading zero, a 3-digit institution number and a 5-digit branch.

What are the 900-series codes in a CPA-005 file?

They are the return reason codes of Standard 007, and they sit in the transaction type field of an I or J record — where a payment would normally carry its payment type. 901 is insufficient funds, 902 an account not found, 905 an account closed, 915 to 921 the customer-initiated returns of a pre-authorised debit. Code 900 is reserved for edit rejects, and code 906 was retired in October 2007 and will never be reassigned. The original payment type survives in the "stored transaction type" field.

Is my file uploaded anywhere?

No. The file is read and validated entirely by JavaScript running in your browser. Nothing is transmitted to a server, which matters: a payroll AFT file carries the bank accounts of everyone you pay.