3a Contribution Transfer Reference

View the Project on GitHub true-wealth/3a-transfer-reference

DRAFT: 3a Contribution Transfer Reference

Important note: This specification is still at the draft stage and is subject to change. Feedback on GitHub as a pull request or issue is welcome.

Intro

The amendment to the ordinance stipulates that in the event of a transfer of pension capital pursuant to Article 3a paragraph 1 letter b, the transferring institution must provide the new institution with the following information:

In order to implement these requirements efficiently and in compliance with the law, we have developed a new process in which all relevant data is transmitted directly in the remittance information which can contain up to 140 characters (according to SIX Swiss Payment Standards). This process makes it possible to transfer the information completely and unambiguously between the foundations without the need for additional communication channels such as letters or emails. The chosen format is designed to summarize all relevant data in a compact structure of no more than 140 characters. It contains the first and last name, version, date of birth, regular contributions, purchases and the purchase year, supplemented by a checksum to ensure that the data has been transferred correctly. This document explains the implementation of the compact and secure digital transmission of contribution and purchase data with a checksum.

Advantage of this solution:

Points considered:

Example

Information we will transfer in transfer Credit Transfer Transaction Information cell as one single line:

first name;last nameA1009972715350320356660700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061

Value Explanation
first name if client has more than one first name, they are separated by a space
last name if client has more than one last name, they are separated by a space
A version used for encoding the transfer reference (currently only version A is available)
100997 client date of birth (ddmmyy)
27 reference year - indicates current year when the transfer has been initiated
15350 total contributions in CHF of the current year (2027 in this example)
32035 regular contribution in CHF in the previous year (2026 in this example)
6660 purchase amount in CHF in the previous year (2026 in this example)
7 represents year 2027 - is the year in which the purchase was made for 2026
61 checksum
0000…00 placeholders for all other years, as long as the account exists less than 10 years or the year at the time of the era release is smaller than 2035

Code would look like this in 2027:

Mike M;Mustermann MilA0101902715350320356660732035666060000000000000000000000000000000000000000000000000000000000000000000000000000000000098

27 - current year; contributions 2027; contributions 2026; purchase 2026; purchase year; contributions 2025; purchase 2025; purchase year; placeholders; checksum

Code without name (starting with date of birth) can look like this in 2037 reach back to 2026 (116 characters):

A0101013715350320356660732035666063203566605320356660432035666033203566602320356660132035666003203566609320356660879

3a Transfer Reference Visualization

Validity

The code is created per account (and thus not per customer) and only contains the information of the transferred account.

Checksum

In order to ensure that the data has been transferred correctly, a checksum is included to the code. ‘Mode97’ algorithm is used. Mod97 checksums are also used to check IBANs and offers a high level of security against input errors such as transposed numbers and transposed letters. It takes letters into account by converting them into numbers, is standardised and two digits long. A detailed explanation of the checksum can be found here: https://en.wikipedia.org/wiki/International_Bank_Account_Number#Modulo_operation_on_IBAN

The name part is not included in the checksum, checksum starts with version code.

the following components are included in the checksum:

Structure

The code does not contain any semi-colons or other separators. The number of characters for a year or a contribution amount is always fixed with 0 padding on left side (see example below ‘Example same number of characters in code’), the code always has the same length, namely exactly 116 characters.

This means that up to 21 characters are available for the name area. One character must be subtracted for a semi-colon that is used to separate the first and last name.

This means that up to 20 characters are available for the first and last name in total. The name part does not need to be padded, it can also be less than 20 characters.

Only first and last name may contain spaces. Any other spaces / newlines added for / in transmission must be stripped before parsing.

Length of client name

Up to 20 characters are available for the first and last name. If the combination of first and last name is shorter than 20 characters, no placeholders should be added. If the combination of first and last name is longer than 20 characters, then the first name is truncated to 6 characters. The last name is truncated to 14 characters.

For example, if a customers first name is “Mike” and the last name is “Mills” the code will look like this: Mike;MillsA0101902715350320356660732035666060000000000000000000000000000000000000000000000000000000000000000000000000000000000098

Summary

Number of characters Value
1 Version (currently only version A is available)
107 Contributions / purchase history
6 Date of birth
2 Checksum
min. 14 if available, dynamic, first + last = max. 20 Last name
1 Separate last - and first name with ;
min. 6 if available, dynamic, first + last = max. 20 First Name
3 Reserved for possible linebreaks added during transfer
max. 140 Total (if names are shorter, it can also be less than 140)

Edge-cases

What if a client has no contribution or purchase made in a year?

What if a customer has made no purchase in a given year?

What does the code look like until 2035?

As gaps in the 3a can only occur from 2025, placeholders for the years before 2025 are used until 2035. These placeholders are filled with ‘0’. The number of “0” depends on the number to be replaced.

Example how the code in 2027 will look like:

Mike M;Mustermann MilA0101902715350320356660732035666060000000000000000000000000000000000000000000000000000000000000000000000000000000000098

What if a customer’s first name and last name are longer than they should be?

What if a customers first or last name is shorter than the possible characters?

The E-Banking enforces a split the 140 characters into 4 lines with 35 characters each.

Acceptance check of this specification

In this section we prove that all necessary information as mentioned in article 3a paragraph 1 letter b is reflected in our code.

Code example transmitted in 2027: ...27153503203566607220351560600...0000

Code separated by semi-colon for better readability: …27;15350;32035;6660;722035;1560;6;00…00;00

Reference implementation

A reference implementation is available: https://true-wealth.github.io/3a-transfer-reference/assets/calculator.html. This implementation is a simple web application that allows you to encode and decode the transfer reference. The implementation is open source and can be copied and used freely.

External references