Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Flow description: Flöde autogiro i ProBill.xlsx
Old file layout according to: https://www.bankgirot.se/globalassets/dokument/tekniska-manualer/autogiro_tekniskmanual_sv.pdf

Camt.054:

...

Requirements Specification – CAMT.054 Payments in ProBill


**Date:** 2026-03-04  
** Scope:** Incoming payments and CAMT.054 outgoing payments. Pain.002 handling is covered by this specification above in this page.
---##

1. Purpose and Scope

This requirements specification describes how ProBill interprets and stores payments from CAMT.054 files (ISO 20022 standard, message type

...

 BkToCstmrDbtCdtNtfctn, version

...

 camt.054.001.

...

02).

...

Included:

...

...

  • Identification of incoming and outgoing payment files

...

  • Which XML tags are read

...

  • Logic for calculating key variables (incoming payments)

...

  • Mapping to

...

  •  dbo.

...

  • Payment (incoming payments)

...

  • Mapping to

...

  •  dbo.

...

  • LedgerPayoutResult (outgoing payments)

...

  • Error handling and status assignment (incoming payments)

...

...

2. Identification of File Type

A file is identified as CAMT.054 if the XML content contains the element name

...

 BkToCstmrDbtCdtNtfctn.

...

XML namespace:

...

 urn:iso:std:iso:20022:tech:xsd:camt.054.001.

...

02

The file type is then determined by

...

 GrpHdr/

...

AddtlInf:

...

Condition

...

File type

...

Target table

...

GrpHdr/AddtlInf does not contain DEBTIncoming paymentdbo.Payment
GrpHdr/AddtlInf contains DEBTOutgoing paymentdbo.LedgerPayoutResult

...

3. XML Structure and Tags Read

The CAMT.054 file has a hierarchical structure with three levels that are read:

...

Document/BkToCstmrDbtCdtNtfctn

...


├──

...

 GrpHdr                          ← Message header (one per file)
└── Ntfctn                          ← Notification / account (one or more per file)
    ├── Id
    ├── CreDtTm
    ├── Acct                        ← Receiver account
    └── Ntry                        ← Transaction / entry (one or more per Ntfctn)
        ├── BookgDt/Dt
        ├── ValDt/Dt
        └── NtryDtls/TxDtls         ← Transaction details
            ├── Refs
            ├── AmtDtls
            ├── RltdPties           ← Involved parties
            ├── Purp
            ├── RltdDts
            └── RmtInf              ← Remittance information
                ├── Ustrd
                └── Strd            ← Structured remittance (one or more)

...

3.1 Message Header – GrpHdr

Read once per file from

...

 /Document/

...

BkToCstmrDbtCdtNtfctn.

...

XML tag

...

Description

...

GrpHdr/MsgId
Unique message ID

...

...

GrpHdr/CreDtTm
Message creation date and time

...

...

GrpHdr/AddtlInf
Additional information. Used to distinguish incoming payments (no

...

 DEBT) from outgoing payments (

...

DEBT present).

...

...

3.2 Account Information – Ntfctn

Read

...

per Ntfctn node. Represents the receiving account (seller's account).

...

XML tag

...

Description

...

Ntfctn/Id

...

Unique notification ID. Mandatory per standard.

...

Ntfctn/CreDtTm
Notification creation date and time

...

...

Ntfctn/Acct/Id/

...

IBAN
Receiver account IBAN number

...

...

Ntfctn/Acct/Id/Othr/

...

Id
Receiver account BBAN (e.g. bankgiro number)

...

...

Ntfctn/Acct/Id/Othr/SchmeNm/

...

Cd
Account scheme code (e.g.

...

 BBAN)

...

...

Ntfctn/Acct/Ownr/Id/OrgId/Othr/

...

Id
Account owner organisation ID

...


**Note:** A CAMT.054 file may contain multiple`Ntfctn` Ntfctn nodes. Each`Ntfctn` Ntfctn has a unique`Id` Id used to ensure each transaction is linked to the correct account.###

3.3 Transaction Details – Ntry / TxDtls / Strd

Read per transaction. An

...

 Ntfctn can have multiple

...

 Ntry nodes, and each

...

 Ntry can have multiple

...

 TxDtls and/or

...

 Strd nodes.

...

Transactions without a

...

 Strd element are still included (e.g. Swish payments).

...

XML tag

...

Description

...

Ntfctn/Ntry/BookgDt/

...

DtBooking date

...

...

Ntfctn/Ntry/ValDt/

...

DtValue date

...

...

TxDtls/Refs/

...

AcctSvcrRefBank's internal transaction ID

...

...

TxDtls/Refs/

...

EndToEndId
End-to-end reference. Used for Swish to identify the mobile number.

...

...

TxDtls/AmtDtls/TxAmt/

...

AmtTransaction amount

...

...

TxDtls/AmtDtls/TxAmt/Amt/

...

@Ccy
Currency code for the transaction amount (XML attribute)

...

...

TxDtls/RltdPties/Dbtr/

...

NmPayer name

...

...

TxDtls/RltdPties/Dbtr/PstlAdr/

...

StrtNmPayer street address

...

...

TxDtls/RltdPties/Dbtr/PstlAdr/

...

PstCdPayer postal code

...

...

TxDtls/RltdPties/Dbtr/PstlAdr/

...

TwnNm
Payer city

...

...

TxDtls/RltdPties/Dbtr/Id/OrgId/Othr/

...

Id
Payer organisation number

...

...

TxDtls/RltdPties/DbtrAcct/Id/

...

IBAN
Payer account number (IBAN)

...

...

TxDtls/RltdPties/DbtrAcct/Id/Othr/

...

IdPayer account number (BBAN or other). Also used as Swish mobile number.

...

...

TxDtls/RltdPties/DbtrAcct/Id/Othr/SchmeNm/

...

PrtryAccount scheme name for payer's account

...

...

TxDtls/RltdPties/UltmtDbtr/

...

NmUltimate debtor name (if different from Dbtr)

...

...

TxDtls/RltdPties/UltmtDbtr/PstlAdr/

...

StrtNmUltimate debtor street address

...

...

TxDtls/RltdPties/UltmtDbtr/PstlAdr/

...

PstCdUltimate debtor postal code

...

...

TxDtls/RltdPties/UltmtDbtr/PstlAdr/

...

TwnNmUltimate debtor city

...

...

TxDtls/RltdPties/UltmtDbtr/Id/OrgId/Othr/

...

Id
Ultimate debtor organisation number

...

...

TxDtls/RltdPties/Cdtr/

...

Nm
Payee (creditor) name

...

...

TxDtls/RltdPties/CdtrAcct/Id/

...

IBANPayee IBAN

...

...

TxDtls/RltdPties/CdtrAcct/Id/Othr/

...

Id
Payee BBAN (bankgiro)

...

...

TxDtls/Purp/

...

Cd
Payment purpose code. Swish

...

: WEBI, SUPP or REFU.
TxDtls/RltdDts/AccptncDtTmAcceptance date/time

...

...

TxDtls/RmtInf/

...

Ustrd
Unstructured remittance message (free text)

...

...

RmtInf/Strd/RfrdDocInf/

...

Nb
Invoice number

...

...

RmtInf/Strd/RfrdDocAmt/

...

CdtNoteAmt
Credit note amount

...

...

RmtInf/Strd/RfrdDocAmt/CdtNoteAmt/

...

@Ccy
Currency for credit note amount (XML attribute)

...

...

RmtInf/Strd/RfrdDocAmt/

...

RmtdAmt
Remitted amount (actual amount paid)

...

...

RmtInf/Strd/RfrdDocAmt/RmtdAmt/

...

@Ccy
Currency for remitted amount (XML attribute)

...

...

RmtInf/Strd/CdtrRefInf/

...

RefOCR reference
RmtInf/Strd/

...

AddtlRmtInfAdditional remittance information. May appear

...

 multiple times

...

 – all repetitions are concatenated

...

. Used

...

for Swish payments (contains

...

 OrderID:

...

).

...

...

4. Logic for Key Variables

...

...

4.1 Swish Identification (IsSwish)

A payment is classified as Swish (

...

IsSwish =

...

1) if

...

 both

...

 of the following conditions are met:

...

Condition 1 – Prerequisite

...

: TxDtls/Refs/

...

EndToEndId is NOT NULL

...

Condition 2 – At least one of

...

:

...

...

Check

...

XML source

...

Condition

...

...

Free text contains order ID

...

RmtInf

...

/Strd/

...

AddtlRmtInfContains the string

...

 'OrderID:'

...

...

Purpose code is a Swish code

...

TxDtls

...

/Purp/

...

CdIs one of:

...

 WEBI,

...

 SUPP, REFU

If

...

 EndToEndId is NULL,

...

 IsSwish =

...

0 is always returned

...

.

...

4.2 ReferenceID

PrioritySourceComment
1RmtInf/Strd/CdtrRefInf/

...

RefOCR reference

...

...

2

...

RmtInf

...

/Strd/RfrdDocInf/

...

NbInvoice number

...

...

3

...

Extracted from

...

 RmtInf/Strd/

...

AddtlRmtInfOnly if IsSwish = 1:

...

 text between

...

 'OrderID: '

...

 and '-'
4RmtInf/Strd/AddtlRmtInf 

...

(if not Swish)

...

Used as reference if none of the above are present

...

...

5

...

RmtInf/UstrdUnstructured message as last resort

...

...

4.3 Amount

...

PrioritySourceComment
1RmtInf/Strd/RfrdDocAmt/

...

RmtdAmtRemitted amount – actual payment

...

...

2

...

-

...

 +

...

 RmtInf/Strd/RfrdDocAmt/

...

CdtNoteAmtCredit note

...

stored with

...

 negative sign

...

...

3

...

TxDtls

...

/AmtDtls/TxAmt/

...

AmtTransaction amount

...

...

40Fallback

4.4 EntryDate

...

EntryDate = Ntfctn/Ntry/BookgDt/Dt (NULL if empty)

...

4.5 PaymentDate

...

PrioritySource
1TxDtls/RltdDts/

...

AccptncDtTm

...

2

...

Ntfctn

...

/Ntry/ValDt/

...

Dt

...

3

...

Ntfctn

...

/Ntry/BookgDt/

...

Dt

5. Incoming Payments – Mapping to dbo.Payment

...

ColumnXML source / Logic

...

FileID
File ID (link to source file)

...

CreatedNtfctn/CreDtTm 

...

– converted to DATETIME2.

...

Fallback:

...

 1900-01-

...

01.

...

SellerReferenceNtfctn/Acct/Ownr/Id/OrgId/Othr/

...

Id
SellerAccountIBAN prefixed with

...

 [IBAN]

...

, otherwise BBAN prefixed with

...

scheme code

...

EntryDate
See §4.4. Fallback:

...

 1900-01-

...

01.
PaymentDateSee §4.5. Fallback:

...

 1900-01-

...

01.
ArchiveIDTxDtls/Refs/AcctSvcrRef
ReferenceID
See §4.2.

...

 Only if

...

numeric

...

 – otherwise NULL

...

.
Comment(1) Non-numeric reference value, (2)

...

Swish: 'Swish från mobilnummer 0'

...

 + mobile number, (3) otherwise

...

NULL

...

OCRMessageRmtInf

...

/Strd/

...

AddtlRmtInf – raw additional

...

info. NULL if empty.

...

PayeeNameUltmtDbtr/Nm 

...

if present, otherwise

...

 Dbtr/Nm
PayeeAddressUltmtDbtr/PstlAdr/

...

StrtNm if present, otherwise

...

 Dbtr/PstlAdr/

...

StrtNm
PayeeZipCodeUltmtDbtr

...

/PstlAdr/

...

PstCd if present, otherwise

...

 Dbtr/PstlAdr/

...

PstCd.

...

 Spaces

...

removed.

...

PayeeCityUltmtDbtr

...

/PstlAdr/

...

TwnNm if present, otherwise

...

 Dbtr/PstlAdr/

...

TwnNm
PayeeOrgNumberUltmtDbtr/Id/OrgId/Othr/

...

Id if present, otherwise

...

 Dbtr/Id/OrgId/Othr/

...

Id
PaymentAccount(1)

...

 CdtrAcct/Id/

...

IBAN, (2)

...

 CdtrAcct/Id/Othr/

...

Id, (3) fallback to SellerAccount

...

PayeeAccount(1)

...

 [IBAN]

...

 +

...

 DbtrAcct/Id/

...

IBAN, (2) scheme

...

+

...

 DbtrAcct/Id/Othr/

...

Id, (3)

...

 DbtrAcct/Id/Othr/

...

Id
AmountSee §4.3. NOT NULL.

...

...

CurrencyRmtdAmt/@Ccy  CdtNoteAmt/@Ccy  TxAmt/@Ccy
CurrencyIDLookup on currency code
ReturnMaterialCodeNULL
RecordCode6 if IsSwish = 1, otherwise 3
CorrectionCode0 (fixed)
SourceID1 if debt collection/post-watch account, otherwise

...

 0
ErrorIDSee §6.1

...

StatusID

...

See §6.2

...

Handled

...

See §6.3

...

...

6. Incoming Payments – Error Handling and Status Assignment

...

6.1 ErrorID – Error

...

Code

PriorityConditionErrorIDDescription
1ReferenceID missing/non-numeric

...

 and

...

 Amount = 0

...

1Invoice not found

...

...

2

...

ReferenceID missing or non-numeric

...

6
Incorrect reference number

...

...

3

...

Amount = 0

...

38Unreasonable amount

...

...

4

...

SellerAccount is a post-watch account

...

8
Post-watch

...

...

5

...

EntryDate missing

...

43
Booking date missing

...

...

6

...

PaymentDate missing

...

44
Payment date missing

...

...

7

...

No errors

...

NULL

...

6.2 StatusID – Status

...

Condition

...

StatusID

...

Status

...

...

ReferenceID missing/non-numeric,

...

or

...

Amount = 0,

...

or

...

EntryDate missing,

...

or

...

PaymentDate missing

...

2Error
None of the above

...

0New

...

6.3 Handled – Direct Flagging

Records with an identified error are marked as handled immediately upon import (Handled = current timestamp)

...

.

...

Records are flagged immediately if:

...

ReferenceID is missing/non-numeric, Amount = 0, EntryDate is missing, or PaymentDate is missing.

...

All other records are left unflagged (Handled = NULL)

...

.

...

...

7. Outgoing Payments – Mapping to dbo.LedgerPayoutResult

...

7.1 Identification

A record is treated as an outgoing payment if

...

 GrpHdr/

...

AddtlInf contains the string

...

 DEBT.

...

7.2 Link to LedgerPayout

The outgoing payment is linked

...

via TxDtls/Refs/

...

EndToEndId cast as integer → matched against

...

 LedgerPayout.ID. CustomerID is retrieved from the matching

...

record.

...

7.3 Mapping

...

ColumnXML source / Logic

...

FileIDFile ID (link to source file)

...

Inserted

...

Current timestamp at import

...

Handled

...

NULL on INSERT

...

StatusID2 

...

(= Payout executed)

...

FileDateNtfctn/CreDtTm 

...

– converted to DATETIME

...

PayerAccountNtfctn

...

/Acct/Id/

...

IBAN if present, otherwise

...

 Ntfctn/Acct/Id/Othr/

...

Id
ReasonNULL
Amount(1) RmtdAmt

...

, (2)

...

 -CdtNoteAmt, (3

...

) TxAmt/

...

Amt
PayoutDateValDt/Dt 

...

if present, otherwise

...

 BookgDt/

...

Dt
NameTxDtls

...

/RltdPties/Cdtr/

...

Nm
PayeeAccountCdtrAcct/Id/

...

IBAN if present, otherwise

...

 CdtrAcct/Id/Othr/

...

Id
PayoutIDTxDtls

...

/Refs/

...

EndToEndId cast as integer

...

CustomerID
Retrieved from

...

matching

...

 LedgerPayout record via

...

 PayoutID

...

7.4 Post-processing

After INSERT, each outgoing payment record is marked as handled (Handled = current timestamp). If outgoing payment records were inserted, a subsequent process for result handling is triggered.

...

...


*Based on existing implementation in ProBill version: 2.0.4833.0. XML standard: ISO 20022 camt.054.001.02.*
---