SEPA pain.001 or Positive Pay File Rejected by the Bank in Business Central

Where Business Central chooses the payment export format, which bank account fields feed the debtor agent, and how to fix the export with a data exchange definition or a small AL extension.

The export format is chosen on the company bank account card: Payment Export Format for SEPA credit transfers and Positive Pay Export Code for check files, each pointing to a code in Bank Export/Import Setup that runs a codeunit, an XMLport or a data exchange definition. A missing debtor agent almost always means the SWIFT Code (BIC) or IBAN on that bank account card is empty or wrong. A wrong pain.001 version means the code exports pain.001.001.03 while the bank expects a newer schema, or the reverse. Fix it by selecting the right shipped format, adjusting a copied data exchange definition, or, when the bank needs fields the standard file never writes, a small AL extension.

Where does Business Central decide what the payment file looks like?

On the company bank account card, not in the payment journal. Two fields matter. Payment Export Format is used when you run Export Payments to File from the payment journal for SEPA and other electronic credit transfers. Positive Pay Export Code is used when you export positive pay files for checks from the bank account. Each holds a code from the Bank Export/Import Setup page, and each code points to the object that writes the file: a processing codeunit, an XMLport, and often a data exchange definition that maps Business Central fields to file elements.

So when a bank rejects a file, the first question is not what is wrong with the payment, but which code, which object and which definition produced it. The list of shipped codes differs between the W1 version and the country versions, so check yours in the tenant.

What you exportField on the bank account cardTypical object behind it
SEPA credit transfer (pain.001)Payment Export FormatAn export code such as SEPACT, running a SEPA credit transfer XMLport or a data exchange definition
SEPA direct debit (pain.008)SEPA Direct Debit Exp. FormatA direct debit export code and XMLport
Positive pay for checksPositive Pay Export CodeA data exchange definition with header, detail and footer lines in the bank layout
Other bank specific filesPayment Export FormatA data exchange definition you or your partner created

Why does the bank say the debtor agent is missing?

The debtor agent (DbtrAgt in the pain.001 file) is your own bank, identified by its BIC. Business Central takes it from the SWIFT Code field on the company bank account card used for the payment, and the debtor account from the IBAN on the same card. If the SWIFT Code is empty, the element is written empty or omitted, and a bank that requires it rejects the whole file. The same happens when the journal uses a different bank account from the one you checked, for example a payment journal batch whose balancing account is another bank account.

Some banks accept files without a BIC for domestic SEPA payments, which is why a file that worked with one bank fails with another. On the creditor side, a missing or invalid SWIFT Code or IBAN on a vendor bank account fails the same way, usually only on that payment line. Fix the master data first; only change the export when the data is right and the bank still wants a different structure.

Why is the pain.001 version wrong and how do you change it?

Because the export code exports one schema and the bank expects another. The SEPA credit transfer setup long shipped with pain.001.001.03, which many banks still accept; others now require pain.001.001.09 or a national variant with extra mandatory elements. Some country versions of Business Central ship newer formats alongside the old one, and Microsoft has been adding updated SEPA formats over time, so first look in Bank Export/Import Setup for a code that already matches what the bank asks for and point Payment Export Format at it.

If no shipped code matches, the change is not a text edit of the file after export. Either copy and adjust a data exchange definition, or build a small extension with an XMLport for the required version. Hand-editing exported files breaks the audit trail and will be repeated every payment run.

Why does the bank reject the positive pay file?

Positive pay files are flat files in the bank's own layout, and there is no single standard. Business Central exports them from the bank account card using the data exchange definition behind the Positive Pay Export Code, built from check ledger entries for the date range you choose. Rejections usually come from the layout, not the data.

  • Column order, fixed widths or delimiter differ from the bank specification.
  • Date and amount formats: the bank wants MMDDYY and implied decimals, the file has another format.
  • Header and trailer records: missing, with the wrong record type code, or with a total or count the bank recalculates differently.
  • Voided checks: the bank expects a void indicator or a separate record, and the file sends them as issued or not at all.
  • Account number or routing number padded or formatted differently from what the bank set up.
  • Payee name included or excluded when the bank service requires the other.

How do you adjust the export through a data exchange definition?

Copy before you change. On the Data Exchange Definitions page, export the definition behind the code to an XML file, import it again under a new code, and change the copy: file type and delimiters, line definitions for header, detail and footer, column definitions with data types, lengths and formats, and the field mappings from Business Central tables to columns. Then create a new code in Bank Export/Import Setup that uses the copied definition and point the bank account card at it. The original stays intact for comparison and for other bank accounts.

Data exchange definitions handle layout, formats, constants and simple mappings well. They are a poor fit for logic: grouping payments into batches by date or currency, conditional elements that appear only for some payments, or values calculated from several tables. That is where an extension is the cleaner fix.

When is a small AL extension the right fix?

When the bank needs structure the standard export cannot produce: a newer pain.001 schema that is not shipped in your version, mandatory elements such as structured remittance or ultimate debtor, payment information blocks grouped by execution date and urgency, a bank specific header, or validation that stops a payment journal from exporting when a vendor bank account is incomplete. A small extension adds an XMLport or codeunit, registers it as a new code in Bank Export/Import Setup and leaves the base application untouched, so it survives updates. It is the same kind of focused AL work described on Business Central AL development, and it is usually a short piece of work once the bank specification is clear.

What are the steps from a rejected file to a payment run the bank accepts?

The order we work in when suppliers are waiting. The first three steps usually find the cause within the day.

StepWhat happens
1. Read the rejection exactlyGet the bank's rejection report or status message (often a pain.002 file or a portal error) and note the schema version it expected, the element it complains about, such as DbtrAgt or BIC, and the line it failed on.
2. Check the bank account cardOn the company bank account card, check IBAN, SWIFT Code, Bank Account No., Payment Export Format, Positive Pay Export Code and Credit Transfer Msg. Nos., and compare them with what the bank set up for the account.
3. Check Bank Export/Import SetupOpen the code that the bank account points to and note the direction, the processing codeunit or XMLport, and the data exchange definition, so you know which object produced the file.
4. Compare with the bank specificationOpen the exported file and the bank's implementation guide side by side: namespace and pain.001 version, mandatory elements, character set, batch booking, service level, charge bearer, and for positive pay the column order, widths, date format and header and trailer records.
5. Fix vendor and payment dataCorrect vendor bank accounts with missing IBAN or SWIFT Code, non SEPA currencies or countries in a SEPA batch, and remittance text longer than the bank allows.
6. Change the format, not the fileSelect a shipped format that matches the bank, or copy the data exchange definition, adjust the mapping and point a new export code at it. Use a small AL extension when the bank needs elements or logic the definition cannot express.
7. Test with the bank before the next runExport a test file from a sandbox copy, send it to the bank's test channel or validator, and only switch production when it is accepted. Re-export the rejected batch from the Credit Transfer Register once the fix is live.

How do you pay suppliers today while the export is being fixed?

Pay the urgent ones manually in the bank portal and record them correctly in Business Central, so nothing is paid twice. Post the payments in the payment journal without exporting, or mark the lines as exported only after you have confirmed that the bank executed them, and keep a list of what was paid outside the file. When the fix is live, re-export the remaining batch from the Credit Transfer Register or a new journal, and check that the manually paid entries are not in it. Bank details that changed during the incident should go through the same approval as always; vendor bank account change controls covers that, and payment runs across several companies and banks are on multi-company payment runs.

What does Solzet deliver when a bank rejects Business Central payment files?

Solzet reads the rejection and the bank's implementation guide, checks the bank account cards and vendor bank data, selects or builds the export format the bank needs, as a copied data exchange definition or a small AL extension with a new export code, tests it against the bank's validator from a sandbox copy, and documents the setup for your finance team. Our own senior consultants and AL developers do the work. The service line is Dynamics 365 Business Central.

Where customer and pipeline data sit in a CRM next to the ERP, buyers who would rather not carry Microsoft licensing for it can choose a custom CRM. We recommend the right solution: Dynamics 365 (Customer Engagement, Business Central or Finance and Operations), Power Platform, or a custom-built CRM. One team for CRM, ERP and the integration between them.

What do people ask us?

Where do I set the SEPA export format in Business Central?

On the company bank account card, in Payment Export Format. It holds a code from Bank Export/Import Setup, which points to the codeunit, XMLport or data exchange definition that writes the pain.001 file when you run Export Payments to File.

Why is the debtor agent missing from my SEPA file?

The debtor agent is your bank BIC, taken from the SWIFT Code on the company bank account card used for the payment. If that field is empty, or the journal uses another bank account, the element is empty or missing and banks that require it reject the file.

How do I export pain.001.001.09 instead of pain.001.001.03?

First check Bank Export/Import Setup for a shipped code that already exports the version your bank wants, which depends on your country version and update. If none exists, build a new export code with an adjusted data exchange definition or a small AL extension.

Why does my bank reject the Business Central positive pay file?

Positive pay layouts are bank specific. Rejections usually come from column order, widths, date or amount formats, header and trailer records, or how voided checks are shown. Copy the data exchange definition behind the Positive Pay Export Code and adjust it to the bank specification.

Can I edit the exported payment file by hand?

You can, but you should not. Manual edits break the audit trail and have to be repeated every run. Fix the master data or the export format so that Business Central produces a file the bank accepts.

Do I need a developer to fix a rejected payment file?

Not always. Master data fixes and layout changes in a data exchange definition are configuration. A newer schema that is not shipped, conditional elements or grouping logic are better done in a small AL extension.

Can Solzet fix our Business Central bank payment export?

Yes. We diagnose the rejection, correct the setup and master data, build the export format your bank needs as a data exchange definition or AL extension, and test it with the bank before your next payment run.

Which solution is right for your business?

Tell us what you need. A senior consultant replies within one business day with a recommendation (Customer Engagement, Business Central, Finance and Operations, Power Platform or a custom-built CRM), not a sales script.