EFT Rails

CPA-005 file format: the Standard 005 EFT file

A Canadian EFT file is a header record, credit or debit records of 1,464 characters each holding up to six payments, and a trailer that totals them.

Updated November 3, 2026

What EFT Rails does

You send each payment through EFT Rails without building a bank file. Payments are created and read through the API or in the dashboard, so your integration supplies payment instructions instead of producing records at fixed character positions.

The API checks bank account details against the fields carried by the file: a three-digit institution number, a five-digit branch or transit number, and an account number of up to twelve digits. Each payment also carries a bank reference you can quote and your own reference, which is returned unchanged.

The API reference documents the payment and account fields your integration sends.

What the standard covers

The standard defines the payment files exchanged between banks, including their character set, record lengths and order. Standard 005 is read with Payments Canada's F rules, and the receiving bank retains the prerogative to edit a file.1 CPA in the name stands for the Canadian Payments Association, the corporation the Canadian Payments Act establishes.2

Files exchanged between banks use the Extended Binary Coded Decimal Interchange Code character set, abbreviated EBCDIC.3 Record types A, C, D, E, F, I, J and Z are 1,464 characters long, while S, U and V records are 208 characters long.4

A payment file opens with an A record and closes with a Z record.5 C, D, E, F, I and J records can be mixed within one file.6 The credit and debit records carry the payment data, while the other records handle corrections and returns.

Transaction type codes and return reason codes are defined in Standard 007.7

How a record is built

A record identifies itself, carries a count and then holds payment data in fixed positions. All records begin with their type letter and record count. Apart from the A and Z control records, a record contains one or more transactions, with one transaction per segment. All segments in a record have the same length and layout.8

Unused segments contain spaces throughout. Once a blank segment appears, all later segments in that record must also be blank.8

Within a used segment, an unused numeric field contains zeros and an unused alphanumeric field contains spaces. Numeric fields are right-justified and zero-filled. Alphanumeric fields need no particular justification, but they must be space-filled and can contain hyphens.9

The A record

The A record identifies and controls the file. It is the file header, occurs once at the start, and any invalid field in it causes the file to be rejected.10

Positions Field
1 Record type letter A
2 to 10 Record count, set to 000000001
11 to 20 Originator's ID
21 to 24 File creation number
25 to 30 Creation date
31 to 35 Destination data centre
36 to 55 Communication area reserved between the customer and its bank
56 to 58 Currency code
59 to 1464 Filler

The file creation number occupies four positions in the header. Dates use six digits in the form 0yyddd: a zero, the last two digits of the year and the day number within the year. A file can be rejected when its creation date is more than seven calendar days before the bank runs its initial edit.11

The currency code is CAD for Canadian-dollar transactions or USD for US-dollar transactions. Any other value causes rejection.12

The C and D records

The C record carries credits, described as deposit data, and the D record carries pre-authorized debit (PAD) data. In both records, positions 1 to 24 contain the type letter, record count and origination control data. A 240-character segment follows, repeated up to six times, with segments two to six occupying positions 265 to 1464.13

Segment one of a D record has this layout:

Positions Field
25 to 27 Transaction type
28 to 37 Amount
38 to 43 Due Date
44 to 52 Institution and branch identification
53 to 64 Payor account number
65 to 86 Item trace number
87 to 89 Stored transaction type
90 to 104 Originator's short name
105 to 134 Payor name
135 to 164 Originator's long name
165 to 174 Originating bank's user ID
175 to 193 Originator's cross reference number
194 to 202 Institution identification for returns
203 to 214 Account number for returns
215 to 229 Originator's sundry information
230 to 251 Filler
252 to 253 Settlement code between the originator and its bank
254 to 264 Invalid field ID

The institution identification field has nine digits: a leading zero, the three-digit institution number and the five-digit branch number. The number must appear on Payments Canada's financial institutions file, or the payment is rejected.14

An amount must be greater than zero, or the payment is rejected. An invalid amount can also put the file out of balance, which can cause the entire file to be rejected.15

A debit's Due Date is the date on which it should be charged to the payor's account. A debit dated more than two business days after the file is exchanged can be rejected.16

The Z record

The Z record closes the file and supplies the totals used to check its contents. It is the last record and begins with the type letter, record count and origination control data. Its control totals occupy positions 25 to 112, followed by filler through position 1464.17

Positions Field
25 to 38 Total value of D and J debit transactions, 14 digits
39 to 46 Total number of D and J debit transactions, eight digits
47 to 60 Total value of C and I credit transactions, 14 digits
61 to 68 Total number of C and I credit transactions, eight digits
69 to 82 Total value of E error corrections, 14 digits
83 to 90 Total number of E error corrections, eight digits
91 to 104 Total value of F error corrections, 14 digits
105 to 112 Total number of F error corrections, eight digits
113 to 1464 Filler

Corrections and returns

An E record lets the originator reverse a C credit, while an F record lets the originator reverse a D debit. An I record returns credit data, and a J record returns debit data.18

The reason supplied with a return uses a return reason code from Standard 007. The EFT return codes guide explains those codes and the reconciliation work they trigger.

What gets a file rejected

A rejected file fails the receiving bank's edit before its payments proceed. Rejection can result from an unreadable file, a missing A or Z record, an out-of-balance file, an invalid field, an impermissible mixture of record types, or a file coming from a bank in default. The receiving bank can stop at the first fault it finds.19

A file-level rejection differs from a return matched to an individual payment. The reject versus return guide explains how to identify which outcome you received and what to correct.

Your bank's specification

Your bank's specification tells you how to prepare and transmit a file through its channel. Banks publish client layout documents using the standard's positions, and those documents can restrict a file to one payment type, impose narrower date windows or add transmission records around the file.

That document governs the channel to your bank. Standard 005 governs the payment file inside it. When diagnosing a refusal, compare the record and position with the standard first, then check the additional requirements in your bank's specification.

Sources (19)
  1. Standard 005, Section A, paragraph 3 ↩
  2. Canadian Payments Act, section 3 ↩
  3. Standard 005, Section B, paragraph 1 ↩
  4. Standard 005, Section B, paragraph 2 ↩
  5. Standard 005, Section B, paragraph 4 ↩
  6. Standard 005, Section D, paragraph 2 ↩
  7. Standard 007, paragraph 1 ↩
  8. Standard 005, Section D, paragraph 1 ↩
  9. Standard 005, Section D, paragraph 3 ↩
  10. Standard 005, Section D, Type A ↩
  11. Standard 005, Data Element Dictionary, "Creation Date" ↩
  12. Standard 005, Data Element Dictionary, "Currency Code Identifier" ↩
  13. Standard 005, Section D, Type D; Standard 005, Section D, Type C ↩
  14. Standard 005, Data Element Dictionary, "Institutional Identification Number" ↩
  15. Standard 005, Data Element Dictionary, "Amount" ↩
  16. Standard 005, Data Element Dictionary, "Due Date" ↩
  17. Standard 005, Section D, Type Z ↩
  18. Standard 005, Section D, Type E; Standard 005, Section D, Type F; Standard 005, Section D, Type I; Standard 005, Section D, Type J ↩
  19. Standard 005, Section D, paragraph 4 ↩

Questions

How long is a CPA-005 record?

A, C, D, E, F, I, J and Z records are 1,464 characters long. S, U and V records are 208 characters long.1

What is the date format in a CPA-005 file?

Dates contain six digits in the form 0yyddd: a zero, two year digits and the day number within the year. A bank may reject a file whose creation date is more than seven calendar days before it checks the file.2

Can one file hold both credits and debits?

Yes. C, D, E, F, I and J records can be mixed in one file under the standard.3 Your bank's specification can restrict its channel to one payment type per file.

Why was my file rejected?

Causes include an unreadable file, a missing header or trailer, invalid fields, an impermissible mixture of record types or control totals that leave the file out of balance.4 An amount of zero also rejects the payment, and the invalid amount can put the whole file out of balance.5

Do I need to build a CPA-005 file to use EFT Rails?

No. You send each payment through the API or create it in the dashboard. Your integration supplies the payment and bank account details without producing fixed-position records.

Sources (5)
  1. Standard 005, Section B, paragraph 2 ↩
  2. Standard 005, Data Element Dictionary, "Creation Date" ↩
  3. Standard 005, Section D, paragraph 2 ↩
  4. Standard 005, Section D, paragraph 4 ↩
  5. Standard 005, Data Element Dictionary, "Amount" ↩

Open an account

Open an account