PGD payment files

Header Record - record Type 0 - Initial Record

The record header contains the records that are created once per cash code, pay group, payment code (aka Bank Inst Code). Always listed as the first record per unit of production and production numbers. The initial record may be common to domestic and international payments.

Note: Each initial record that is reported to Bank Account must be unique.
Position Number Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 0 Initial Record
2 2-6 Alpha/numeric (5) Customer Nbr ElectronicPaymentOrganizationIdentifier in BankTransactionCode table Customer number – assigned by bank account
3 7-12 Numeric (6) Production date System Date System Date in AP161 – YYMMDD.

Sender processing date

4 13-13 Alpha/numeric (1) Prod nbr SequenceNumber in PayablesElectronicTransferID 1-9, as a rule 1. On several initial records with the same customer number and production date, the production number must be unique in each initial record. The production unit is perceived otherwise as already loaded.

The Seq Nbr increments by 1 for multiple runs of the same AP161 in the same day. Each new day resets the APE-SEQ-NBR to 1 and APE-LAST-RUN-DATE to system date. There is no edits that prevents running AP161 more than 9 times – not required.

5 14-100 Alpha/numeric (87) Blank Blank
6 101-101 Alpha/numeric (1) NL 0A – All rec types need Rec expanded by 1 to include tne new Line Character

Header Record - record Type 2 - Sender Record

The record header contains the records that are created once per cash code, pay group, payment code (aka Bank Inst Code). Always listed as the first record per customer, account and code. Sender record should always precede a group of the record type 3, 4, 5, 6 and 7.

Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 2 Sender Record
2 2-6 Alpha/numeric (5) Customer Nbr ElectronicPaymentOrganizationIdentifier in BankTransactionCode table Customer number (assigned by Bank Account)
3 7-16 Alpha/numeric (10) Sender Account

Electronic Transfer ID Number

ElectronicTransferID in PayablesElectronicTransferID table Right aligned and blank filled. The last digit is the check digit. To clarify: ElectronicTransferID field in Lawson is 18 characters Alpha (left justified). We are taking the last 10 characters and right aligning and blank filling at the front if there are not at least 10 characters.
4 17-18 Alpha/numeric (2) Sender code 1 Sender Code
5 19-45 Alpha/numeric (27) Company name Name in PayablesCompany Registered account name. Registered account name.
6 46-72 Alpha/numeric (27) Payment Instruction ElectronicPaymentInstruction1 inBankTransactionCode. Payment instructions 1 For example: Address or telephone.
7 73-75 Alpha/numeric (3) Currency Code Currency in CashCode table Currency code for payment from ISO standard. EUR/SEK
8 76-78 Alpha/numeric (3) Monetary Currency Currency in CashCode table Monetary currency for amount. ISO standard EUR/SEK
9 79-91 Alpha/numeric (13) Blank Currency in CashCode table Blank
10 92-100 Alpha/numeric (9) Blank Space

Payee record - Record Type 3 - Payment

The payee records are created once per vendor. Specified as the first item in the payment to recipients without Bank Account. Recipient record may be followed by more amount records for payments with the same method of payment.

Note: This record will not be created if the VEN/VLO-VBANK-ACCT-NO is not populated and VEN/VLO-VBANK-IDENT = P, S, Q or K.
Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 3 Recipient Record PG, payment method = 5
2 2-2 Alpha/numeric (1) Payment Method 5 Payment Method = 5 for payments to recipient’s with a fixed payment number
3 3-7 Alpha/numeric (5) Blank Blank
4 8-17 Alpha/numeric (10) Recipient (Payee) Vendor number in PayablesInvoicePayment table Recipient = fixed payment number in the sender’s accounts payable account such as vendor number or social security number with payment method 5.
5 18-22 Alpha/numeric (5) Postal Code PostalAddress.PostalCode in VendorAddress Recipient postal code
6 23-55 Alpha/numeric (33) Recipient VendorName in Vendor/VendorLocation It also indicates and c/o address, which can be shortened. For example, listed c/o Eriksson as c/o E-son. C/o address can be specified after the employee’s name in either positions 23-55 or 56-82 or in both fields depending on the name and address length.
7 56-82 Alpha/numeric (27) Recipient Addr Current PostalAddress.DeliveryAddress.AddressLine1 from Vendor/VendorLocation Recipient’s street address
8 83-95 Alpha/numeric (13) Address record Current PostalAddress.Municipality from Vendor/VendorLocation Recipient’s address
9 96-100 Alpha/numeric (5) Blank Blank

Payee record - Record Type 3

Bank account payments and account deposits to other banks. Designated as the first item in payments to bank account number and account deposits to other banks. The payee records are created once per vendor. This record will only be created if the VEN/VLO-VBANK-ACCT-NO is populated and VEN/VLO-VBANK-IDENT not = P or S.

Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 3 Recipient Record PG, payment method = 4 only if the bank account is there
2 2-2 Alpha/numeric (1) Payment Method 4 Payment Method = 4 bank account payment and deposit accounts
3 3-7 Alpha/numeric (5) Blank Blank
4 8-17 Alpha/numeric (10) Recipient ID Vendor number from PayablesInvoicePayment Recipient ID, expressed numerically, right aligned and blank filled. Recipient ID should be unique per recipient, and can for example, be a vendor number; social security number or other unique number for the recipient. For bank account payments, and especially in connection with the credit notes do not use serial number as Recipient ID.
5 18-22 Alpha/numeric (5) Blank Blank
6 23-55 Alpha/numeric (33) Recipient Name VendorName in Vendor/VendorLocation Recipient Name
7 56-71 Alpha/numeric (16) Recipient Account BankAccountNumber from Vendor/VendorLocation Bank Account Payment : Enter the recipient’s bank account number numeric, right aligned, zero or left blank.
8 72-100 Alpha/numeric (29) Blank Blank

Payment record - Record Type 4 - Message record

The payment records are created for each payment per vendor. Message record used on the message field in the record amount is not enough. Message records can not be used for OCR payments and bank account deposits. Up to 2 API comment records per invoice are processed. Each comment record will create up to 5 message type 4 records with each message record containing up to 2 message lines of text. Up to 5 message records may precede an amount record. 1st message record consists of 2 message lines.

Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 4 Message Record, CMTAPI for invoice retrieved
2 2-2 Alpha/numeric (1) Payment Method 3, 4, 5

3 – if Account Type = S or S

4 – if Account Type = Q or K

5 – if payment cards

Account Type is BankAccountValidationType from Vendor/VendorLocation

Payment Method = 3 for credit transfer to bank account and personal account.

Payment Method = 4 for payment to recipients with bank account number

Payment Method = 5 for payments to recipients with a fixed payment number

3 3-7 Alpha/numeric (5) Blank Blank
4 8-17 Alpha/numeric (10) Recipient ID

Bank Acct or Vendor

BankAccountNumber from Vendor/VendorLocation Recipient account /Recipient ID.

Expressed numerically, right aligned and blank filled. Bank Account and 10-digit personal account (payment method = 3). Recipient ID for payment to the bank account number (payment method = 4). Recipient ID for payment card (Payment method = 5). Recipient ID must comply with the record type 3, position 8-17.

If payment method = 3 value is bank acct. if payment method is 4 or 5 value is vendor
5 18-57 Alpha/numeric (40) Message Line1 Comment in APINVOICE Each message line will extract comment text data from positions 1-23 and 28-39 and store it in the message line as 1 contiguous string of data.
6 58-97 Alpha/numeric (40) Message Line2 Comments in APINVOICE Each message line will extract comment text data from positions 1-23 and 28-39 and store it in the message line as 1 contiguous string of data.
7 98-100 Alpha/numeric (3) Blank Blank

Payment record - Record Type 5 - Amount record - debit

The payment records are created for each payment per vendor. Specify for each payment to be enforced. Created for debit payments only.

Number Position Data type/style Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 5 Amounts record, debit
2 2-2 Alpha/numeric (1) Payment Method

Q = Bankgiro

P= Postgiro

K= Bank Account

S= Social Security Number

3, 4, 5

3 – If Account Type = P or S

4 – If Account Type = Q or K

5 – If Notification = Y /missing giro number

Payment method = 3 for credit transfer to Bank Account and personal account.

Payment method = 4 for bank account payments and account deposits to other banks.

Payment method = 5 for payments to recipient’s with a fixed payment number

If BankAccount and BankAccountValidationType = P or S, value = 3

If BankAccount and BankAccountValidationType = Q or K, value = 4

otherwise value = 5

3 3-3 Alpha/numeric (1) Merging 1 / space

BankTransactionCode.SortOption

Blank = merging desired by several payment cards (payment method =5) to the same receiver with common payment date.

1= merging is not desired. Each payment order is reported separately.

If BankTransactionCode.SortOption = 1 value = 1 Else value = Space
4 4-6 Alpha/numeric (3) Amount Currency InvoiceCurrency in PayablesInvoiceCurrency table (pay method = 3) or SEK (Pay method = 5) Amounts Currency for amounts according to ISO standards. SEk /EUR. When payment method is 4 or 5 only SEK If Payment Method = 3 value = PayablesInvoicePayment.InvoiceCurrency else value = SEK
5 7-7 Alpha/numeric (1) Same Day execution N (permanent) Same day execution = N
6 8-17 Alpha/numeric (10) Recipient ID Bank Acct or Vendor BankAccountNumber from Vendor/VendorLocation (pay method =3) or Vendor Number in PayablesInvoice table (Pay method = 4 or 5) Recipient Account /Recipient ID. Bank Account or personal account number with payment method 3. Numeric, right aligned and blank filled. Recipient ID per recipient with payment method 4 or 5. Numeric, right aligned and blank filled. Recipient ID must coply with the record type 3, positions 8-17. If payment method = 3 value is bank acct. if payment method is 4 or 5 value is vendor
7 18-44 Alpha/numeric (27) Message Invoice In PayablesInvoice Left or right aligned and blank filled. Message line should contain some form of identification for payment, eg invoice number. Bank Account recommendation is the invoice number specified left aligned and are separated by at least one blank position with any following message. Report together the amount with lines of credit transfer and payment cards.
8 45-55 Numeric (11) Amount NetPaymentAmount in PayablesInvoicePayment Amount in cents. Numeric, zero filled and right aligned. The amount may not be zero. The signs and decimal points are not given.
9 56-61 Numeric (6) Account Date Check Date/Due Date YYMMDD Desired date of posting on Bank Account If PayablesInvoicePayment.DueDate < Electronic Payment Creation Payment Date or BankTransactionCode.PaymentOption = P value = Electronic Payment Creation Date

Else Value = PayablesInvoicePayment.DueDate

10 62-91 Numeric (30) Sender’s Ref OUR REF: VoucherNumber in PayablesInvoice Can be used for the sender’s internal accounting tasks. Not Required
11 92-99 Alpha/numeric (8) Verification Nbr Spaces Payment sender’s own verification number. Not Required
12 100-100 Alpha/numeric (1) Blank Spaces Blank

Payment record - Record Type 6 - Amount Record - Credit (Plusgiro Payment and payment cards)

Created only for credit memos. Same rules apply as noted in record type 5 except for currency – If Payment Method = 3 OR 4 value = APP Curr Else = SEK. Specify for each credit note to be deducted. The payment records are created for each payment per vendor.

Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 6 Amounts record, credit
2 2-2 Alpha/numeric (1) Payment method 3, 4, 5

3-If Account Type = P or S

4 – is not used

5 – If Notification = Y/missing account number

Payment method = 3 for credit transfer to Bank Account and personal account.

Payment method = 5 for payments to recipients with a fixed payment number.

Payment method = 7 for payments to recipients with current payment number.

3 3-3 Alpha/numeric (1) Blank Blank
4 4-6 Alpha/numeric (3) Amount Currency InvoiceCurrency in PayablesInvoice table (pay method = 3 or 4) or SEK (pay method =5) Amounts Currency for amounts according to ISO standards. SEK/EUR. The payment method 5 and 7 only SEK
5 7-7 Alpha/numeric (1) Blank Blank
6 8-17 Alpha/numeric (10) Recipient ID BankAccountNumber from Vendor/VendorLocation (pay method = 3 or 4) or Vendor Number PayablesInvoice table (pay method =5 Recipient Account /Recipient ID. Bank Account or personal account number with payment method 3. Right aligned and blank fille.d Recipient ID per recipient for payment method 5 and 7. Numeric right aligned and blank filled. Recipient ID must comply with record type 3, positions 8-17
7 18-44 Alpha/numeric (27) Message Invoice In PayablesInvoice Edited by the sender. Should contain some form of identification for the payment. Eg invoice number. Together with sum a range of credit transfers and payment cards
8 45-55 Numeric (11) Amount InvoiceAmt in PayablesInvoice Amount in cents. Numeric, zero filled and right aligned. The amount may not be zero. The signs and decimal points are not given
9 56-61 Numeric (6) Accounting Date Check Date / Due Date First posting date (YYMMDD). First date of settlement of credit notes may be made
10 62-67 Numeric (6) Last Account Date Check Date / Due Date + 340 days The last accounting date (YYMMDD). Final date for the settlement of credit notes may be made. For a credit record that will be monitored, specify the same posting date for first and last date of posting.
11 68-97 Alpha/numeric (30) Sender Ref Spaces Can be used for the senders’s internal accounting data. Not required. Note: Not transferred to the recipient. Shown on the accounting report order payment orders.
12 98-100 Blank Blank Spaces Blank

Total Record - Record Type 7

The trailer record is created once per Cash Code, Pay Group, Payment Code

Number Position Data type/size Field Description Instructions Notes
1 1-1 Alpha/numeric (1) Record Type 7 Total Record
2 2-6 Alpha/numeric (5) Customer Nbr ElectronicPaymentOrganizationIdentifier in BankTransactionCode table Same as in senders record
3 7-16 Alpha/numeric (10) Sender Account

Electronic Transfer ID Nbr

ElectronicTransferID in PayablesElectronicTransferID table Same as in senders record To clarify: ElectronicTransferID field in Lawson is 18 characters Alpha (left justified). We are taking the last 10 characters and right aligning and blank filling at the front if there are not at least 10 characters.
4 17-18 Alpha/numeric (2) Sender Code 1 Same as in senders record
5 19-31 Numeric (13) Total Amount Calculated Total amount in cents. Net amounts, eg debit total as positive and credits as negative. Signs can be specified in position 31. Numeric without decimal right aligned and zero filled
6 32-63 Alpha/numeric (32) Blank Blank
7 64-66 Alpha/numeric (3) Currency Currency in CashCode table Currency for payment from ISO standard. EUR/SEK

Using Cash Code from Electronic Payment Creation

8 67-69 Alpha/numeric (3) Amount Currency Currency in CashCode table Currency for payment from ISO standard. EUR/SEK

Using Cash Code from Electronic Payment Creation

9 70-100 Alpha/numeric (31) Blank Blank