PGI 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.
Number | Position | 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 | Cash Payment Format PGD and PGI 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 can be used. 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 SequenceNumber increments by 1 for multiple runs of the same Electronic Payment Creation in the same day. Each new day resets the PayablesElectronicTransferID.SequenceNumber to 1 and PayablesElectronicTransferID.LastRunDate to system date. There is no edits that prevents running Electronic Payment Creation more than 9 times – not required. The Seq Nbr and Run date are only updated on the PayablesElectronicTransferID record that has the same payer acct nbr. Seq Nbr will also get incremented for every payee record type 2 when PaymentForm not = 0. |
|
5 | 14-100 | Alpha/numeric (87) | Blank | Blank |
Header Record - record Type 1 - Sender Record
- The record header contains the records that are created once per cash code, pay group, payment 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 6.
Number | Position | Data type/size | Field | Description | Instructions | Notes |
---|---|---|---|---|---|---|
1 | 1-1 | Alpha/numeric (1) | Record Type | 1 | 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. Bank account or currency account | |
4 | 17-18 | Alpha/numeric (2) | Sender code | Space | Determined by the sender. Alphanumeric or blank. An account can have multiple sender codes to separate account to order the payment and audit report | |
5 | 19-45 | Alpha/numeric (27)) | Sender Line1 | Name in PayablesCompany | Usually the sender’s address. | |
6 | 46-72 | Alpha/numeric (27) | Sender Line2 | PostalAddress.DeliveryAddress.AddressLine1 in PayablesProcessLevel (Address not available for Payables Company) | Usually the sender’s address. | |
7 | 73-87 | Alpha/numeric (15) | Sender Line3 | PostalAddress.Municipality in PayablesProcessLevel (Address not available for Payables Company) | Usually the sender’s location | |
8 | 88-88 | Alpha/numeric (1) | Cross Border Code | 2 | Cross Border Code = 2 | |
9 | 89-89 | Alpha/numeric (1) | Layout Code | 2 | Layout Code = 2 | |
10 | 90-90 | Alpha/numeric (1) | Currency | Currency in CashCode table | Currency from which payment is made. E= EUR; S=SEK (Not ISO standard due to space restrictions. | Position 1 of Cash Code from Electronic Payment Creation |
11 | 91-100 | Alpha/numeric (10) | ElectronicPaymentUserField1 from BankTransactionCode | ElectronicPaymentUserField1 from BankTransactionCode | Sender organization number |
Payee record - Record Type 2 - Recipient Name Record
The payee records are created once per vendor.
Number | Position | Data type/size | Field | Description | Instructions | Notes |
---|---|---|---|---|---|---|
1 | 1-1 | Alpha/numeric (1) | Record Type | 2 | Recipient Record | |
2 | 2-2 | Alpha/numeric (1) | Payment Method | PaymentForm on Vendor/VendorLocation 0 = Deposit 9 = Check |
Payment method 0 = deposit; 9 = Check | Position 1 of Vendor/VendorLocation PaymentForm |
3 | 3-17 | Alpha/numeric (15) | Recipient ID | Payment method = 0 BankAccountNumber Vendor/VendorLocation or Payment method = 9 serial number |
Set option, but the current recipient unique, alphanumeric Recipient ID. Right or left aligned and blank filled | If PaymentForm = 0 value = BankAccountNumber Else value =PayablesElectronicTransferID.SequenceNumber (incremented by 1 from Type 1 record) |
4 | 18-22 | Alpha/numeric (5) | Blank | Blank | ||
5 | 23-23 | Alpha/numeric (1) | Recipient Code | Priority Code Payment method = 0 (1 or 2) Payment method = 9 (1) |
The Deposit shall apply: 1 Normal, 2 Express The check is always 1 Normal |
If PaymentForm= 9 and NormalOrExpressCode = E value =2 |
6 | 24-56 | Alpha/numeric (33) | Recipient Line1 | Payment method = 0 BankAccountNumber Vendor/VendorLocation (IBAN nbr) or Payment method = 9 VendorName Vendor/VendorLocation |
At Deposit: Enter the recipient’s account number. If possible, in the IBAN format. At Check: Enter the recipient’s name | If PaymentForm not = 9 value = Vendor/VendorLocation BankAccountNumber else Value = Vendor/VendorLocation VendorName |
7 | 57-89 | Alpha/numeric (33) | Recipient Line2 | Payment method = 0 VendorName Vendor/VendorLocation or payment method = 9 PostalAddress.DeliveryAddress.AddressLine1 in VendorAddress | At Deposit: Enter the recipient’s name | If PaymentForm not = 9 Value = Vendor/VendorLocation VendorName else value = VendorAddress.PostalAddress.DeliveryAddress.AddressLine1 |
8 | 90-92 | Alpha/numeric (3) | Payment Category | PaymentCategoryCode in Vendor/VendorLocation | Payment code according to the Swedish tax office applies to subsequent payment to the same recipient unless the code is not different that the code referred to on the amount records. Is entered in the record amount. Not required for payment code indicated in amount records. | |
9 | 93-100 | Alpha/numeric (8) | Blank | Space | Blank |
Payee record - Record Type 3 - Recipient Address Record
The payee records are created once per vendor.
Number | Position | Data type/size | Field | Description | Instructions | Notes |
---|---|---|---|---|---|---|
1 | 1-1 | Alpha/numeric (1) | Record Type | 3 | Recipient Address Record | |
2 | 2-2 | Alpha/numeric (1) | Payment Method | Payment method | Same as record type 2, position 2 | |
3 | 3-17 | Alpha/numeric (15) | Recipient ID | Payment method = 0 BankAccountNumber Vendor/VendorLocation Payment method = 9 serial number | Same record type as 2, position 3-17 | If PaymentForm = 0 value = BankAccountNumber Else value = PayablesElectronicTransferID.SequenceNumber (incremented by 1 from Type 1 record) |
4 | 18-50 | Alpha/numeric (33) | Recipient Line3 | Payment method = 0 Vendor/VendorLocation Bank Code, Bank ID. Sweden Plusgiro In Sort Codes Payment method = 9 |
The payment method 9, check, specific
recipient;s address. For recipients in Europe the IBAN is referenced
in record type 2, position 24-56. This field shouldn’t be left
blank. For certain countries outside Euripe a special code is
needed. Australia: The code is called BSB (Bank/State/Branch) and
has 6 digits. On the invoice often states the branch 123-456. The
payment assignment recorded in the field for bank account code as
//AU123456 Canada: The code is called Payment Routing Number and consists of 9 digits and always starts with 0. Register as //CC012345678 South Africa: The code is called sort code and has 6 digits. There are sometimes 8 digits, even then, only the first 6 are used. Register as //ZA123456 USA: The code is called Fedwire Routing Number (Alt ABA) and consists of 9 digits. Register as //FW123456789 |
If PMT-FORM = 0 value = 11, Bank Code, Bank ID (No commas) |
5 | 51-72 | Alpha/numeric (22) | Recipient Location City | Payment method = 0 Bank Location on screen AP16 (CBE) or Payment method =9 Town in VendorAddress | The Deposit: Enter the receiving bank location The Check: Enter the recipient’s location |
If = value =
BankEntity.PostalAddres.Municipality Else value = VendorAddress.PostalAddress.Municipality |
6 | 73-82 | Alpha/numeric (10) | Recipient Record Postal Code | Payment method = 0 Bank Postal Code from Bank Entity or Payment method =9 Postal Code in VendorAddress | Alphanumeric, right or left aligned and blank filled | If 0 value = BankEntity.PostalAddres.PostalCode else Value = VendorAddress.PostalAddress.PostalCode |
7 | 83-84 | Alpha/numeric (2) | Recipients Country | BankEntity Bank Country code | ISO standard. The country that the money will be sent. It need not be the same country as the recipient lives in. | If PaymentForm = 0 and
BankEntity.PostalAddress.Country = spaces value =
VendorAddress.PostalAddress.Country If PaymentForm = 0 and BankEntity.PostalAddress.Country not = spaces value = VendorAddress.PostalAddress.Country If PaymentForm not = 0 value = VendorAddress.PostalAddress.Country |
8 | 85-97 | Alpha/numeric (13) | Internal reference | PayablesInvoice.VoucherNumber | The sender’s internal reference | |
9 | 98-100 | Alpha/numeric (3) | Blank | Blank |
Payment record - Record Type 5 - Message record – Debit Amount record
Created only for debit amount payments and messages up to 4 message records can be created. 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 | 5 | Debit Amount Record | |
2 | 2-2 | Alpha/numeric (1) | Payment Method | Payment Method | Same as record type 2, position 2 | |
3 | 3-17 | Alpha/numeric (15) | Recipient ID | Payment method = 0 BankAccountNumber Vendor/VendorLocation or payment method =9 serial number |
Same as record type 2, positions 3-17 | |
4 | 18-50 | Alpha/numeric (33) | Message | Payment method = 0 Line 1 = BIC Code/Swiftnr Line 2 = Invoice Number Line 3 = OUR on Charge Code =0 Line 4 = Comments or Payment method =9 Line 1 = Invoice in Payables Invoice Line 2 = OUR on charge Code =0 in Vendor/VendorLocation Lines 3 and 4 = Comments |
Message to the payment recipient. If additional space is needed for the message, as long as the debit amount record is not repeated more than 3 times per payment without any further information, ie blank in position 51-2100. Message Records precede amount records. OUR in this field indicates that the recipient’s expenses are paid by the sender. If not specified, each pays their own expenses. | If PaymentForm = 0 value = Vendor/VendorLocation
SwiftId If Vendor/VendorLocation ChargeCode = 0 value = “:OUR” If API comments value comment text If payment value = PayablesInvoice.Invoice |
5 | 51-52 | Alpha/numeric (2) | Blank | Comment in PayablesInvoice | Blank | |
6 | 53-63 | Numeric (11) | SEK Amount Amount in SEK or EURO |
NetPaymentAmount in PayblesInvoicePayment | Amount in Base/Co currency (including
penny/cent, currency is currently SEK or EUR) Right aligned and zero filled without signs or decimal points (Positions 87-89) |
|
7 | 64-69 | Numeric (6) | Due Date | Check Date /Due Date | YYMMDD. The day the sender’s account will be charged. | If PayablesInvoicePayment.DueDate <
Electronic Payment Creation Payment Date value = Electronic Payment
Creation Payment Date Else value = PayablesInvoicePayment.DueDate |
8 | 70-71 | Alpha/numeric (2) | Blank | Blank | ||
9 | 72-86 | Numeric (15) | Amount | Zero/Invoice NetPaymentAmount in PayablesInvoicePayment | Amount in currency other than the base/co. Entered with decimal places, but without signs and decimal points. Right-aligned and zero filled. If the invoice amount is in currency other than the base/co state it here, otherwise zero filled. The amount is dispensed in the currency specified in the Currency Code field below. | If PayablesInvoicePayment.InvoiceCurrency = SEK value = 0 else value = NetPaymentAmount |
10 | 87-89 | Alpha/numeric (3) | Currency Code | InvoiceCurrency in PayablesInvoicePayment | ISO standard. Currency in which payment is to be dispensed in | |
11 | 90-90 | Alpha/numeric (1) | Amount Code | 1 or NOTE! | Specifies the amount for the basis for the
payment. 1= If the amount is in another currency than the base/co currency specified. 2= If only the amount of base/co currency specified |
If PayablesInvoicePayment.InvoiceCurrency = SEK value = 2 else value =1 |
12 | 91-91 | Alpha/numeric (1) | Merging | BankTransactionCode.SortOption | Payment in the same currency and with the same
accounting date to the same recipient can be combined into one
payment. 1= no merging. Each payment is sent separately. 2= merging of all methods of payment. Intermediate specified. |
|
13 | 92-94 | Alpha/numeric (3) | Payment Category | PaymentCategoryCode in Vendor/VendorLocation | Indicated if different from payment code in record type 2, otherwise blank. If a payment includes installments with different payment codes these would be reported separately | |
14 | 95-100 | Alpha/numeric (6) | Blank | Space | Blank |
Payment record - Record Type 6 - Amount record - credit
Created for credit memos only. No Record type 5 messages created for credit memos. 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 | Vendor/VendorLocationPayment Form | Must be the same as in the debit record as the credit note will be deducted against | |
3 | 3-17 | Alpha/numeric (15) | Recipient ID | Payment Method = 0 BankAccountNumber Vendor/VendorLocation or Payment method = 9 serial number |
Must be the same as in the debit record as the credit note will be deducted against | |
4 | 18-50 | Alpha/numeric (33) | Message | Invoice in PayablesInvoice | Messages to the payee | |
5 | 51-52 | Alpha/numeric (2) | Blank | Blank | ||
6 | 53-63 | Numeric (11) | SEK Amount | NetPaymentAmount in PayablesInvoicePayment SEK/EURO |
Amounts in the Base/Co currency (including cents, the currency is currently SEK/EUR). Right aligned and zero filled without signs or decimal points. Stated in the same way as the debit record as credit note is deducted against. | |
7 | 64-69 | Numeric (6) | Accounting Date | Check Date/Due Date | First accounting date (YYMMDD). Earliest date of that the settlement of credit note may take place. | Same as debit record |
8 | 70-75 | Numeric (6) | Last Accounting Date | Check Date + 340 days | The last accounting date (YYMMDD). The last date for settlement of the credit note can take place. First accounting date should be at least + 10 days. | Payment Date /Due Date + 340 days |
9 | 76-77 | Alpha/numeric (2) | Blank | Blank | ||
10 | 78-92 | Numeric (15) | Amount | NetPaymentAmount in PayablesInvoicePayment | Amount in currency other than the base.co. Right aligned and zero filled without signs or decimal point. Displayed in the same way for the debit records. | |
11 | 93-95 | Alpha/numeric (3) | Currency Code | InvoiceCurrency In PayablesInvoicePayment | Must be the same for the debit record as for the credit note in order to deduct the credit. ISO standard | |
12 | 96-96 | Alpha/numeric (1) | Amount Code | 2 if InvCurrency = SEK otherwise 1 | The same for the debit record as the credit note
to offset. Specifies the amount of base for the payment. 1= If the amount is in another currency than the Base/Co. 2= If only the amount of currency out of Base/Co |
|
13 | 97-99 | Alpha/numeric (3) | Payment Category | Invoice Payment Category | Payment Code | |
14 | 100-100 | Alpha/numeric (1) | Blank | Space | 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 record type 0 | |
3 | 7-16 | Alpha/numeric (10) | Sender Account Electronic Transfer ID Nbr |
ElectronicTransferID in PayablesElectronicTransferID table | Same as record type 1 | |
4 | 17-18 | Alpha/numeric (2) | Sender Code | Space | Determined by the sender. An account can have multiple sender codes to have separate account in the accounting payment orders and audit report. Not required | |
5 | 19-19 | Alpha/numeric (1) | Currency Code | Currency in CashCode table | Currency base/co from which payment is made. E=EUR S=SEK |
Cash Code from ElectronicPaymentCreation |
6 | 20-20 | Alpha/numeric (1) | Blank | Blank | ||
7 | 21-33 | Numeric (13) | Total Amt | Calculated | Total amount in base/Co currency. Net amounts, ie debits summed as positive and credits as negative. Indicated by signs (+or-) in position 33. Zero filled if position 80 is blank. | Total NetPaymentAmount If Total NetPaymentAmount < 0 value = “-“ else value = “+” |
8 | 34-35 | Alpha/numeric (2) | Blank | Blank | Blank | If Total NetPaymentAmount < 0 value = “-“ else value = “+” |
9 | 36-52 | Numeric (17) | Nonsense Total | Blank | Total Nonsense in currencies other than Base/Co. Net summary of all amounts regardless of currency. Indicated by signs (+ or -) in position 52. Zero filled if position 80 is blank | |
10 | 53-89 | Alpha/numeric (27) | Blank | Blank | Blank | |
11 | 80-80 | Alpha/numeric (1) | Payment Execution | 1 | 1 = The payments are implemented | |
12 | 81-87 | Numeric (7) | Number of Records | Calculated | Number of records, excluding the initial record. Right aligned and zero filled. | |
13 | 88-88 | Alpha/numeric (1) | Cross Border Code | 2 | Cross Border Code = 2 | |
14 | 89-100 | Alpha/numeric (12) | Blank | Blank |