# Autogiro payment initiation

The Autogiro payment initiation is a standard file format defined by [Bankgirot](https://www.bankgirot.se/). FinDock uses this file format for native direct debit processing with [Autogiro](/docs/payment-processors/autogiro-direct-debit).

## Autogiro payment initiation structure

The Autogiro payment initiation format defines a fixed-width (80-character) file structure with the following records:

* TK01 - opening record defines the file and the originator
* TK82 - each transaction is a TK82 record (incoming payment)


## Autogiro payment initiation field mapping

The following table outlines how Salesforce data is mapped to Autogiro payment initiation records.

### TK01 record mapping

| Position | Contents | Mapping |
|  --- | --- | --- |
| 1-2 | Transaction code | N/A, always `01` |
| 3-10 | Date written | File generation date, YYYYMMDD |
| 11-18 | Layout name | N/A, always `AUTOGIRO` |
| 19-62 | Reserved field | N/A |
| 63-68 | Payees's customer number | Customer Number from target on payment schedule |
| 69-78 | Payees's Bankgiro number | Bankgiro number from target on payment schedule |
| 79-80 | Reserved field | N/A |


### TK82 record mapping

| Position | Contents | Mapping |
|  --- | --- | --- |
| 1-2 | Transaction code | N/A, always `82` |
| 3-10 | Payment date | Collection Date from payment schedule |
| 11 | Period code | N/A, always `0` |
| 12-14 | Number of recurring payments | N/A |
| 15 | Reserved field | N/A |
| 16-31 | Payer number | Mandate Id from installment |
| 32-43 | Amount | Amount from installment in öre |
| 44-53 | Payee's Bankgiro number | BBAN from target on payment schedule |
| 54-69 | Reference | Final Payment Reference from installment |
| 70-80 | Reserved field | N/A |