[{"data":1,"prerenderedAt":636},["ShallowReactive",2],{"\u002Fblog\u002Fpain001-deep-dive-building-a-swiss-credit-transfer-file":3},{"id":4,"title":5,"body":6,"description":627,"extension":628,"lastUpdatedAt":629,"meta":630,"navigation":631,"path":632,"publishedAt":629,"seo":633,"stem":634,"__hash__":635},"blog\u002Fblog\u002F0064.pain001-deep-dive-building-a-swiss-credit-transfer-file.md","pain.001 deep-dive: building a Swiss credit transfer file",{"type":7,"value":8,"toc":619},"minimark",[9,13,16,21,24,35,42,48,54,58,169,180,191,195,306,329,332,335,338,520,526,548,552,562,566,569,606,615],[10,11,12],"p",{},"If your ERP generates payment files that go directly to your bank for processing — rather than having someone enter payments manually in e-banking — those files are almost certainly pain.001 XML. Pain.001 is the ISO 20022 message type for Customer Credit Transfer Initiation: the structured file you send to your bank to instruct it to make one or more outgoing payments.",[10,14,15],{},"Swiss banks completed their migration to ISO 20022 in 2022. The version they use for domestic Swiss franc credit transfers is pain.001.001.09 (often written as pain.001 for short). This post walks through the key parts of the XML structure, what each section does, and the Swiss-specific points that differ from the generic ISO 20022 standard.",[17,18,20],"h2",{"id":19},"the-three-level-structure","The three-level structure",[10,22,23],{},"Every pain.001 file has the same three-level hierarchy:",[25,26,31],"pre",{"className":27,"code":29,"language":30},[28],"language-text","GrpHdr (Group Header)\n  └─ PmtInf (Payment Information) — one or more\n         └─ CdtTrfTxInf (Credit Transfer Transaction Information) — one or more\n","text",[32,33,29],"code",{"__ignoreMap":34},"",[10,36,37,41],{},[38,39,40],"strong",{},"Group Header"," contains information about the file as a whole: a message ID that must be unique, the creation date and time, the number of transactions in the file, and the total control sum (the sum of all payment amounts).",[10,43,44,47],{},[38,45,46],{},"Payment Information"," groups transactions that share the same debit account, execution date, and payment method. You can have multiple PmtInf blocks in one file — for example, one block for CHF payments and another for EUR payments, or one block for today's payments and another for next week's.",[10,49,50,53],{},[38,51,52],{},"Credit Transfer Transaction Information"," is one block per individual payment. Each block carries the payment amount, the creditor's details, and the remittance information.",[17,55,57],{"id":56},"group-header-in-detail","Group Header in detail",[25,59,63],{"className":60,"code":61,"language":62,"meta":34,"style":34},"language-xml shiki shiki-themes github-light github-dark","\u003CGrpHdr>\n  \u003CMsgId>PAYMENT-2024-001\u003C\u002FMsgId>\n  \u003CCreDtTm>2024-03-15T08:30:00\u003C\u002FCreDtTm>\n  \u003CNbOfTxs>3\u003C\u002FNbOfTxs>\n  \u003CCtrlSum>4750.00\u003C\u002FCtrlSum>\n  \u003CInitgPty>\n    \u003CNm>Müller AG\u003C\u002FNm>\n    \u003CId>\n      \u003COrgId>\n        \u003COthr>\n          \u003CId>CHE-123.456.789\u003C\u002FId>\n          \u003CSchmeNm>\u003CPrtry>CHUID\u003C\u002FPrtry>\u003C\u002FSchmeNm>\n        \u003C\u002FOthr>\n      \u003C\u002FOrgId>\n    \u003C\u002FId>\n  \u003C\u002FInitgPty>\n\u003C\u002FGrpHdr>\n","xml",[32,64,65,73,79,85,91,97,103,109,115,121,127,133,139,145,151,157,163],{"__ignoreMap":34},[66,67,70],"span",{"class":68,"line":69},"line",1,[66,71,72],{},"\u003CGrpHdr>\n",[66,74,76],{"class":68,"line":75},2,[66,77,78],{},"  \u003CMsgId>PAYMENT-2024-001\u003C\u002FMsgId>\n",[66,80,82],{"class":68,"line":81},3,[66,83,84],{},"  \u003CCreDtTm>2024-03-15T08:30:00\u003C\u002FCreDtTm>\n",[66,86,88],{"class":68,"line":87},4,[66,89,90],{},"  \u003CNbOfTxs>3\u003C\u002FNbOfTxs>\n",[66,92,94],{"class":68,"line":93},5,[66,95,96],{},"  \u003CCtrlSum>4750.00\u003C\u002FCtrlSum>\n",[66,98,100],{"class":68,"line":99},6,[66,101,102],{},"  \u003CInitgPty>\n",[66,104,106],{"class":68,"line":105},7,[66,107,108],{},"    \u003CNm>Müller AG\u003C\u002FNm>\n",[66,110,112],{"class":68,"line":111},8,[66,113,114],{},"    \u003CId>\n",[66,116,118],{"class":68,"line":117},9,[66,119,120],{},"      \u003COrgId>\n",[66,122,124],{"class":68,"line":123},10,[66,125,126],{},"        \u003COthr>\n",[66,128,130],{"class":68,"line":129},11,[66,131,132],{},"          \u003CId>CHE-123.456.789\u003C\u002FId>\n",[66,134,136],{"class":68,"line":135},12,[66,137,138],{},"          \u003CSchmeNm>\u003CPrtry>CHUID\u003C\u002FPrtry>\u003C\u002FSchmeNm>\n",[66,140,142],{"class":68,"line":141},13,[66,143,144],{},"        \u003C\u002FOthr>\n",[66,146,148],{"class":68,"line":147},14,[66,149,150],{},"      \u003C\u002FOrgId>\n",[66,152,154],{"class":68,"line":153},15,[66,155,156],{},"    \u003C\u002FId>\n",[66,158,160],{"class":68,"line":159},16,[66,161,162],{},"  \u003C\u002FInitgPty>\n",[66,164,166],{"class":68,"line":165},17,[66,167,168],{},"\u003C\u002FGrpHdr>\n",[10,170,171,172,175,176,179],{},"The message ID must be unique — banks use it to detect duplicate file submissions. Using a combination of date, time, and a sequence number is a common approach. The ",[32,173,174],{},"NbOfTxs"," and ",[32,177,178],{},"CtrlSum"," are validation fields: if the counts and totals do not match the actual transactions in the file, the bank will reject it.",[10,181,182,183,186,187,190],{},"The initiating party is your company. Including the Swiss UID (",[32,184,185],{},"CHE-123.456.789",") using the ",[32,188,189],{},"CHUID"," scheme is standard Swiss practice.",[17,192,194],{"id":193},"payment-information-block","Payment Information block",[25,196,198],{"className":60,"code":197,"language":62,"meta":34,"style":34},"\u003CPmtInf>\n  \u003CPmtInfId>BATCH-001\u003C\u002FPmtInfId>\n  \u003CPmtMtd>TRF\u003C\u002FPmtMtd>\n  \u003CNbOfTxs>3\u003C\u002FNbOfTxs>\n  \u003CCtrlSum>4750.00\u003C\u002FCtrlSum>\n  \u003CPmtTpInf>\n    \u003CSvcLvl>\u003CCd>SEPA\u003C\u002FCd>\u003C\u002FSvcLvl>\n    \u003CLclInstrm>\u003CPrtry>IBAN\u003C\u002FPrtry>\u003C\u002FLclInstrm>\n  \u003C\u002FPmtTpInf>\n  \u003CReqdExctnDt>\u003CDt>2024-03-18\u003C\u002FDt>\u003C\u002FReqdExctnDt>\n  \u003CDbtr>\n    \u003CNm>Müller AG\u003C\u002FNm>\n  \u003C\u002FDbtr>\n  \u003CDbtrAcct>\n    \u003CId>\u003CIBAN>CH56 0483 5012 3456 7800 9\u003C\u002FIBAN>\u003C\u002FId>\n  \u003C\u002FDbtrAcct>\n  \u003CDbtrAgt>\n    \u003CFinInstnId>\u003CBICFI>UBSWCHZH80A\u003C\u002FBICFI>\u003C\u002FFinInstnId>\n  \u003C\u002FDbtrAgt>\n  ...\n\u003C\u002FPmtInf>\n",[32,199,200,205,210,215,219,223,228,233,238,243,248,253,257,262,267,272,277,282,288,294,300],{"__ignoreMap":34},[66,201,202],{"class":68,"line":69},[66,203,204],{},"\u003CPmtInf>\n",[66,206,207],{"class":68,"line":75},[66,208,209],{},"  \u003CPmtInfId>BATCH-001\u003C\u002FPmtInfId>\n",[66,211,212],{"class":68,"line":81},[66,213,214],{},"  \u003CPmtMtd>TRF\u003C\u002FPmtMtd>\n",[66,216,217],{"class":68,"line":87},[66,218,90],{},[66,220,221],{"class":68,"line":93},[66,222,96],{},[66,224,225],{"class":68,"line":99},[66,226,227],{},"  \u003CPmtTpInf>\n",[66,229,230],{"class":68,"line":105},[66,231,232],{},"    \u003CSvcLvl>\u003CCd>SEPA\u003C\u002FCd>\u003C\u002FSvcLvl>\n",[66,234,235],{"class":68,"line":111},[66,236,237],{},"    \u003CLclInstrm>\u003CPrtry>IBAN\u003C\u002FPrtry>\u003C\u002FLclInstrm>\n",[66,239,240],{"class":68,"line":117},[66,241,242],{},"  \u003C\u002FPmtTpInf>\n",[66,244,245],{"class":68,"line":123},[66,246,247],{},"  \u003CReqdExctnDt>\u003CDt>2024-03-18\u003C\u002FDt>\u003C\u002FReqdExctnDt>\n",[66,249,250],{"class":68,"line":129},[66,251,252],{},"  \u003CDbtr>\n",[66,254,255],{"class":68,"line":135},[66,256,108],{},[66,258,259],{"class":68,"line":141},[66,260,261],{},"  \u003C\u002FDbtr>\n",[66,263,264],{"class":68,"line":147},[66,265,266],{},"  \u003CDbtrAcct>\n",[66,268,269],{"class":68,"line":153},[66,270,271],{},"    \u003CId>\u003CIBAN>CH56 0483 5012 3456 7800 9\u003C\u002FIBAN>\u003C\u002FId>\n",[66,273,274],{"class":68,"line":159},[66,275,276],{},"  \u003C\u002FDbtrAcct>\n",[66,278,279],{"class":68,"line":165},[66,280,281],{},"  \u003CDbtrAgt>\n",[66,283,285],{"class":68,"line":284},18,[66,286,287],{},"    \u003CFinInstnId>\u003CBICFI>UBSWCHZH80A\u003C\u002FBICFI>\u003C\u002FFinInstnId>\n",[66,289,291],{"class":68,"line":290},19,[66,292,293],{},"  \u003C\u002FDbtrAgt>\n",[66,295,297],{"class":68,"line":296},20,[66,298,299],{},"  ...\n",[66,301,303],{"class":68,"line":302},21,[66,304,305],{},"\u003C\u002FPmtInf>\n",[10,307,308,309,312,313,316,317,320,321,324,325,328],{},"For Swiss domestic credit transfers, ",[32,310,311],{},"PmtMtd"," is always ",[32,314,315],{},"TRF",". The local instrument (",[32,318,319],{},"LclInstrm",") should be ",[32,322,323],{},"IBAN"," for standard transfers. ",[32,326,327],{},"ReqdExctnDt"," is the requested execution date — the date you want the bank to execute the payment, not the value date at the recipient's bank.",[10,330,331],{},"The debtor account is your account — the account being debited. Use the full formatted IBAN with spaces as shown, or without spaces — both are accepted by Swiss banks, but without spaces is safer for machine processing.",[17,333,52],{"id":334},"credit-transfer-transaction-information",[10,336,337],{},"This is the core of each individual payment:",[25,339,341],{"className":60,"code":340,"language":62,"meta":34,"style":34},"\u003CCdtTrfTxInf>\n  \u003CPmtId>\n    \u003CInstrId>PMT-001\u003C\u002FInstrId>\n    \u003CEndToEndId>INV-2024-0047\u003C\u002FEndToEndId>\n  \u003C\u002FPmtId>\n  \u003CAmt>\n    \u003CInstdAmt Ccy=\"CHF\">1250.00\u003C\u002FInstdAmt>\n  \u003C\u002FAmt>\n  \u003CCdtrAgt>\n    \u003CFinInstnId>\u003CBICFI>RAIFCH22\u003C\u002FBICFI>\u003C\u002FFinInstnId>\n  \u003C\u002FCdtrAgt>\n  \u003CCdtr>\n    \u003CNm>Zulieferer GmbH\u003C\u002FNm>\n    \u003CPstlAdr>\n      \u003CCtry>CH\u003C\u002FCtry>\n      \u003CAdrLine>Bahnhofstrasse 12\u003C\u002FAdrLine>\n      \u003CAdrLine>8001 Zürich\u003C\u002FAdrLine>\n    \u003C\u002FPstlAdr>\n  \u003C\u002FCdtr>\n  \u003CCdtrAcct>\n    \u003CId>\u003CIBAN>CH44 3199 9123 0008 8901 2\u003C\u002FIBAN>\u003C\u002FId>\n  \u003C\u002FCdtrAcct>\n  \u003CRmtInf>\n    \u003CStrd>\n      \u003CCdtrRefInf>\n        \u003CTp>\n          \u003CCdOrPrtry>\u003CCd>QRR\u003C\u002FCd>\u003C\u002FCdOrPrtry>\n        \u003C\u002FTp>\n        \u003CRef>210000000003139471430009017\u003C\u002FRef>\n      \u003C\u002FCdtrRefInf>\n    \u003C\u002FStrd>\n  \u003C\u002FRmtInf>\n\u003C\u002FCdtTrfTxInf>\n",[32,342,343,348,353,358,363,368,373,378,383,388,393,398,403,408,413,418,423,428,433,438,443,448,454,460,466,472,478,484,490,496,502,508,514],{"__ignoreMap":34},[66,344,345],{"class":68,"line":69},[66,346,347],{},"\u003CCdtTrfTxInf>\n",[66,349,350],{"class":68,"line":75},[66,351,352],{},"  \u003CPmtId>\n",[66,354,355],{"class":68,"line":81},[66,356,357],{},"    \u003CInstrId>PMT-001\u003C\u002FInstrId>\n",[66,359,360],{"class":68,"line":87},[66,361,362],{},"    \u003CEndToEndId>INV-2024-0047\u003C\u002FEndToEndId>\n",[66,364,365],{"class":68,"line":93},[66,366,367],{},"  \u003C\u002FPmtId>\n",[66,369,370],{"class":68,"line":99},[66,371,372],{},"  \u003CAmt>\n",[66,374,375],{"class":68,"line":105},[66,376,377],{},"    \u003CInstdAmt Ccy=\"CHF\">1250.00\u003C\u002FInstdAmt>\n",[66,379,380],{"class":68,"line":111},[66,381,382],{},"  \u003C\u002FAmt>\n",[66,384,385],{"class":68,"line":117},[66,386,387],{},"  \u003CCdtrAgt>\n",[66,389,390],{"class":68,"line":123},[66,391,392],{},"    \u003CFinInstnId>\u003CBICFI>RAIFCH22\u003C\u002FBICFI>\u003C\u002FFinInstnId>\n",[66,394,395],{"class":68,"line":129},[66,396,397],{},"  \u003C\u002FCdtrAgt>\n",[66,399,400],{"class":68,"line":135},[66,401,402],{},"  \u003CCdtr>\n",[66,404,405],{"class":68,"line":141},[66,406,407],{},"    \u003CNm>Zulieferer GmbH\u003C\u002FNm>\n",[66,409,410],{"class":68,"line":147},[66,411,412],{},"    \u003CPstlAdr>\n",[66,414,415],{"class":68,"line":153},[66,416,417],{},"      \u003CCtry>CH\u003C\u002FCtry>\n",[66,419,420],{"class":68,"line":159},[66,421,422],{},"      \u003CAdrLine>Bahnhofstrasse 12\u003C\u002FAdrLine>\n",[66,424,425],{"class":68,"line":165},[66,426,427],{},"      \u003CAdrLine>8001 Zürich\u003C\u002FAdrLine>\n",[66,429,430],{"class":68,"line":284},[66,431,432],{},"    \u003C\u002FPstlAdr>\n",[66,434,435],{"class":68,"line":290},[66,436,437],{},"  \u003C\u002FCdtr>\n",[66,439,440],{"class":68,"line":296},[66,441,442],{},"  \u003CCdtrAcct>\n",[66,444,445],{"class":68,"line":302},[66,446,447],{},"    \u003CId>\u003CIBAN>CH44 3199 9123 0008 8901 2\u003C\u002FIBAN>\u003C\u002FId>\n",[66,449,451],{"class":68,"line":450},22,[66,452,453],{},"  \u003C\u002FCdtrAcct>\n",[66,455,457],{"class":68,"line":456},23,[66,458,459],{},"  \u003CRmtInf>\n",[66,461,463],{"class":68,"line":462},24,[66,464,465],{},"    \u003CStrd>\n",[66,467,469],{"class":68,"line":468},25,[66,470,471],{},"      \u003CCdtrRefInf>\n",[66,473,475],{"class":68,"line":474},26,[66,476,477],{},"        \u003CTp>\n",[66,479,481],{"class":68,"line":480},27,[66,482,483],{},"          \u003CCdOrPrtry>\u003CCd>QRR\u003C\u002FCd>\u003C\u002FCdOrPrtry>\n",[66,485,487],{"class":68,"line":486},28,[66,488,489],{},"        \u003C\u002FTp>\n",[66,491,493],{"class":68,"line":492},29,[66,494,495],{},"        \u003CRef>210000000003139471430009017\u003C\u002FRef>\n",[66,497,499],{"class":68,"line":498},30,[66,500,501],{},"      \u003C\u002FCdtrRefInf>\n",[66,503,505],{"class":68,"line":504},31,[66,506,507],{},"    \u003C\u002FStrd>\n",[66,509,511],{"class":68,"line":510},32,[66,512,513],{},"  \u003C\u002FRmtInf>\n",[66,515,517],{"class":68,"line":516},33,[66,518,519],{},"\u003C\u002FCdtTrfTxInf>\n",[10,521,522,525],{},[38,523,524],{},"EndToEndId"," is the end-to-end reference that travels with the payment through the entire chain. Swiss banks carry this through to the recipient's account statement. Using the supplier's invoice number here makes it easy to see which invoice was paid when reviewing your own bank statement. Maximum 35 characters, alphanumeric.",[10,527,528,531,532,535,536,539,540,543,544,547],{},[38,529,530],{},"RmtInf (Remittance Information)"," is where the payment reference goes. For a QR reference, the code is ",[32,533,534],{},"QRR"," and the reference is the 27-digit number from the supplier's QR-bill. For an ISO creditor reference, the code is ",[32,537,538],{},"SCOR",". For an unstructured reference (free text), use ",[32,541,542],{},"\u003CUstrd>"," instead of ",[32,545,546],{},"\u003CStrd>"," — but unstructured remittance is less reliable for the supplier's automated reconciliation.",[17,549,551],{"id":550},"the-qr-iban-vs-standard-iban-distinction-in-pain001","The QR-IBAN vs standard IBAN distinction in pain.001",[10,553,554,555,558,559,561],{},"If you are paying a supplier who uses a QR-IBAN, the creditor account IBAN in ",[32,556,557],{},"\u003CCdtrAcct>"," is that QR-IBAN, and the remittance information must carry a QR reference (",[32,560,534],{},"). If the supplier uses a standard IBAN, use the standard IBAN and the appropriate reference type. The bank validates this consistency — a QR reference paired with a standard IBAN will be rejected.",[17,563,565],{"id":564},"common-rejection-causes","Common rejection causes",[10,567,568],{},"Swiss banks run validation checks when a pain.001 file is submitted. The most common rejection reasons:",[570,571,572,581,588,591,594,599],"ul",{},[573,574,575,577,578,580],"li",{},[32,576,174],{}," or ",[32,579,178],{}," does not match the actual file content",[573,582,583,584,587],{},"Duplicate ",[32,585,586],{},"MsgId"," — a file with the same message ID was already processed",[573,589,590],{},"Invalid IBAN — check digit failure or account not found",[573,592,593],{},"QR reference paired with non-QR-IBAN or vice versa",[573,595,596,598],{},[32,597,327],{}," in the past or a bank holiday",[573,600,601,602,605],{},"Missing mandatory elements — BIC in ",[32,603,604],{},"CdtrAgt"," when required, missing creditor name",[10,607,608,609,614],{},"Your bank's pain.001 implementation guide will list the specific validation rules they apply, as Swiss banks have minor variations in what they require beyond the base standard. The ",[610,611,613],"a",{"href":612},"\u002Fblog\u002Fpain002-reading-payment-status-reports-from-your-bank","pain.002 post"," covers how to read the status report your bank returns after processing the file.",[616,617,618],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":34,"searchDepth":75,"depth":75,"links":620},[621,622,623,624,625,626],{"id":19,"depth":75,"text":20},{"id":56,"depth":75,"text":57},{"id":193,"depth":75,"text":194},{"id":334,"depth":75,"text":52},{"id":550,"depth":75,"text":551},{"id":564,"depth":75,"text":565},"A detailed walkthrough of the pain.001.001.09 XML structure required for submitting payment files to Swiss banks.","md","2026-12-27",{},true,"\u002Fblog\u002Fpain001-deep-dive-building-a-swiss-credit-transfer-file",{"title":5,"description":627},"blog\u002F0064.pain001-deep-dive-building-a-swiss-credit-transfer-file","qmdDS8_HRK2s0WwzFeXLGa-N327h3OR56iESsDhOJT8",1777452177863]