FinchContext
Run with

Build the T4 / T4A Information Return XML for CRA Internet File Transfer

Skill: Convert payroll data into the T4/T4A information return XML filed via CRA Internet File Transfer

Region: Canada Category: Payroll — year-end information returns Does: Takes a year's payroll totals per employee and produces the T4 (Statement of Remuneration Paid) and T4A (Statement of Pension, Retirement, Annuity, and Other Income) information return as a single CRA XML file, with the slips and the T4/T4A Summary, submitted through Internet File Transfer (XML). System: CRA Internet File Transfer — T4/T4A XML

CRA requires electronic filing of the T4/T4A return when you file more than 5 slips of a type. The XML wraps slips inside a Return element keyed to your RP payroll program account. Quebec employees also need an RL-1 (Relevé 1) filed with Revenu Québec — that is a separate XML, not part of this return. Confirm the current XML schema and box codes before generating.


When this applies


Input data required

Input Use
Business Number with RP program account (#########RP0001) Return identifier
Tax year Return year
Employee name, address, SIN Slip identification
Employment income T4 Box 14
CPP/QPP contributions T4 Box 16 / 16A (QPP)
EI premiums T4 Box 18
Income tax deducted T4 Box 22
Pensionable / insurable earnings T4 Box 26 / Box 24
RPP contributions, union dues, footnote amounts T4 Boxes 20, 44, Other Information codes (e.g., 40, 85)
T4A income (pension, fees, self-employed commissions, etc.) T4A boxes 016/020/048 etc.

Field / structure mapping (XML)

Submission
└── Return
    ├── T4
    │   ├── T4Slip ...            (one per employee)
    │   │   ├── EMPE_NM           (employee name)
    │   │   ├── sin               (social insurance number)
    │   │   ├── EMPT_INCO_AMT     (Box 14 employment income)
    │   │   ├── CPP_CNTRB_AMT     (Box 16 CPP)
    │   │   ├── EI_PREM_AMT       (Box 18 EI)
    │   │   ├── ITX_DEDN_AMT      (Box 22 income tax)
    │   │   └── OTH_INFO          (Other Information code/amount pairs)
    │   └── T4Summary             (totals of all slips + RP account)
    └── T4A
        ├── T4ASlip ...
        └── T4ASummary

Element names follow the CRA T4/T4A XML schema; the Summary totals (e.g., total employment income, total CPP, total EI, total tax) must equal the sum of the slips it contains.


Calculation rules


Worked example

One T4 slip and its place in the return for tax year 2025:

<?xml version="1.0" encoding="UTF-8"?>
<Submission>
  <Return>
    <T4>
      <T4Slip>
        <EMPE_NM>
          <snm>Tremblay</snm>
          <gvn_nm>Marie</gvn_nm>
        </EMPE_NM>
        <sin>123456782</sin>
        <rpp_dpsp_rgst_nbr></rpp_dpsp_rgst_nbr>
        <prov_cd>ON</prov_cd>
        <T4_AMT>
          <empt_inco_amt>72000.00</empt_inco_amt>   <!-- Box 14 -->
          <cpp_cntrb_amt>4034.10</cpp_cntrb_amt>     <!-- Box 16 -->
          <empe_eip_amt>1077.48</empe_eip_amt>       <!-- Box 18 -->
          <itx_ddct_amt>11800.00</itx_ddct_amt>      <!-- Box 22 -->
          <ei_insu_ern_amt>65700.00</ei_insu_ern_amt><!-- Box 24 -->
          <cpp_qpp_ern_amt>68500.00</cpp_qpp_ern_amt><!-- Box 26 -->
        </T4_AMT>
        <OTH_INFO>
          <rpp_cntrb_amt></rpp_cntrb_amt>
        </OTH_INFO>
      </T4Slip>
      <T4Summary>
        <bn>123456789RP0001</bn>
        <tx_yr>2025</tx_yr>
        <slp_cnt>1</slp_cnt>
        <tot_empt_inco_amt>72000.00</tot_empt_inco_amt>
        <tot_cpp_cntrb_amt>4034.10</tot_cpp_cntrb_amt>
        <tot_empe_eip_amt>1077.48</tot_empe_eip_amt>
        <tot_itx_ddct_amt>11800.00</tot_itx_ddct_amt>
      </T4Summary>
    </T4>
  </Return>
</Submission>

Validation checklist


Last updated: 2026-06-04 — confirm the active schema version, field codes, and CRA portal requirements against the current Canada Revenue Agency specifications before use.