Skip to content

Payment files to DNB automatically

DNB receives ISO 20022 payment files through DNB File Gateway. Every file has to be signed and encrypted with PGP. This guide takes you from the agreement to your first real payment.

Last checked

In brief#

DNB
Channel DNB File Gateway (DFG) with SFTP. Also applies to Swedish accounts.
Protection PGP signing and encryption, with AES and SHA-256 among others.
Format ISO 20022 XML according to DNB's MIG.
Reports Account information and incoming payments in ISO 20022.
Test tools A test environment. You get the username and password for it from tci@dnb.no.
Agreement Ask your contact person at DNB which agreement DNB File Gateway needs.

The agreement#

At DNB, payment files go to DNB File Gateway, Swedish accounts included. All file communication now goes through the bank instead of through Bankgirot.

Ask your contact person at DNB for the following:

  • access to DNB File Gateway with SFTP for your accounts
  • the payment services you need, such as supplier payments and salaries
  • reports for the payments and for incoming payments
  • details of how the PGP keys are exchanged between you and the bank

The channel#

DNB File Gateway is an SFTP server at the bank. Your system logs in and puts the payment files there. The reports are fetched from the same server. DNB gives you the address and the login details once the agreement is in place.

With SafeSeal it is SafeSeal that logs in, not the finance system. The finance system just puts the file in a folder on your server, as it does today.

The keys#

DNB requires payment files to be both signed and encrypted with PGP. So two keys are exchanged:

  • Your public key is sent to DNB. With it the bank can see that the file comes from you.
  • DNB's public key you get from the bank. It encrypts the file, and only DNB can read it.

Your private key and its password stay on your server. SafeSeal encrypts with AES-256 and signs with SHA-256, which DNB's instructions mention.

A key is not valid for ever. Ask DNB how long the bank's key is valid and how you will hear when it changes. Put the date in your operating routine. See the PGP guide.

The file format#

DNB wants payment files in ISO 20022 XML according to the bank's own format description, DNB's MIG. It states which version of pain.001 applies. Send the latest version to your system supplier.

The banks check more than they used to. This is usually what decides whether a file is accepted:

  • the payee's name on every payment
  • the correct OCR number
  • one reference per payment
  • the right payment date, which for salaries is the pay date

Go through the ISO 20022 checklist before you send the first file. If the finance system can only create old files such as LB, Format conversion turns them into pain.001 on your server.

Reports#

DNB sends account information and incoming payments in ISO 20022. Ask the bank which files come with your agreement. Usually it is pain.002 with the status of each payment file, camt.054 for each incoming payment and camt.053 with the account statement. Ask your system supplier which of them the finance system can import. More about incoming payments is in the guide to incoming payments and camt.054.

Ask the bank to send the reports unencrypted. The transfer is still encrypted by SFTP, and SafeSeal fetches the files and puts them where the finance system reads them in.

Testing#

DNB has a test environment. You get the username and password for it from tci@dnb.no. Send a test file there first. Check that it is accepted and that the status report comes back.

Once the tests pass, send a real payment with a small amount. Check that it arrives. The receipt should then come back and be imported into the finance system.

Setting it up in SafeSeal#

You need two flows. One sends the payment files, the other fetches the reports. You set up both in SafeSeal Config, and the service then runs them around the clock.

The key#

Open Tools › PGP keys.... Choose New to create a key pair and enter Username, Password and Repeat password. Send the public key to DNB. Add DNB's public key with Import. If you already have a key pair that DNB knows, import it the same way. The keys are saved in the PgpKeys folder and never leave the server.

The flow for payment files#

Fetch#

Choose Type File system and the Folder where the finance system puts the payment files, for example C:\SafeSeal\Out\Payments. Set File pattern, for example *.xml. With Min file age no file is sent half finished while it is still being written.

Send#

Choose Method PGP. Open PGP settings… and choose Action Encrypt and sign. Point to the bank's key in Public key and to your own in Secret key. Enter its password in Password. Under Recipient choose Type FTP and Protocol SFTP. Fill in Host, Port, Path, Username and Password from DNB. If you log in with an SSH key, point to the key file in RSA.

Afterwards#

Choose Action Move to folder, for example C:\SafeSeal\Archive\Payments. The original is then kept.

The PGP Options window with action, compression, output format, public key, secret key and password

Click Check connection in the Send step. SafeSeal logs in and lists the files in the folder on the bank's server. With Test writing on the server you can see that files can be put there. Check the folders in Fetch and Afterwards with Check permissions.

The flow for reports#

Fetch from the bank's server with Type FTP and Protocol SFTP. Use the same login as above, but the folder for reports. Poll frequency sets how often SafeSeal looks for new files. Send with Method No processing to the folder that the finance system imports from. Ask DNB what should happen to the file on the server afterwards.

Run both flows once with Run now. The All flows overview shows every file that has been sent and fetched. If something goes wrong, you get an email. Every setting is described in the manual's chapter on flows.

Common errors#

The bank rejects the key#

DNB does not recognise the signature. Check that DNB has the right public key. The flow has to sign with the private key that belongs to it. If the bank has changed its key, import the new one and point to it in the flow.

Wrong version of pain.001#

The bank rejects the file before it reads the content. Compare the version in the file with DNB's MIG and ask your system supplier to change it.

The payee's name is missing#

Payments without the payee's name are rejected. The name comes from the finance system and has to be on the supplier there.

Wrong OCR number#

The banks check the OCR reference. A wrong reference can get the payment rejected.

Sources#

Checked 28 November 2026.

Try it on your own file Try SafeSeal free for 30 days, or let us set up the first flow with you.