Bankgiro

  • This component is not suitable for users that require assistive technologies. This component is not suitable for users who require assistive technologies.

Interacts with Bankgirot and generates and parses related files.

Component modes: Bankgiro Link | Process files | Generate files | FTP via Internet | Third party files via FTP

Component mode: Generate files

Generates files and stores them in the database.

Bankgiro, plusgiro, and bank account numbers

For bankgiro and plusgiro columns, the component will strip the characters '.', '-', and ' '. All other non-numeric characters will result in an error. The resulting number must contain 10 digits or less.

Bank account numbers should start with the clearing number (four digits) followed by the account number. For clearing numbers with five digits (Swedbank), do not include the fifth digit.

SQL

SQL Call: Get actions (mandatory)

May modify database: Yes

Parameters

@Action string
Set to 'Init' for this call.

Resultset: Actions

Table count: repeated exactly once
Row count: exactly one row
Columns
AgBetMak optional bit
Triggers call 'AgBetMak'.
AgBetUnd optional bit
Triggers call 'AgBetUnd'.
AgMedgivReg optional bit
Triggers call 'AgMedgivReg'.
BatchId optional int
Will be included as a parameter in subsequent calls if set.
CustomerNumber mandatory int
The customer number to use.
Ef optional bit
Triggers call 'Ef'.
LbIn optional bit
Triggers call 'LbIn'.

SQL Call: Order supplier payments (LBIN) [To Bankgirot]

SQL with rows corresponding to supplier payments. Is used to send LBIN files to Bankgirot.

May modify database: No

Parameters

@Action string
Set to 'LBIN' by Softadmin® for this call.
@BatchId string
Passes the current batchid.

Resultset: Payments

Resultset that contains information to be sent to Bankgirot. One row corresponds to one payment.
Table count: repeated exactly once
Row count: zero or more rows
Columns
Amount mandatory decimal
The amount being transferred. Two decimals for ören or cents, depending on currency.
Should be negative for credit invoices (PaymentType 16 or 17).
BankAccountText mandatory string
A message to the receiver. Texts longer than 12 characters will be truncated.
BankAccountTo optional string
The account to which the payment should be made.
BankgiroFrom mandatory string
The account from which the payment should be made.
BankgiroTo optional string
The account to which the payment should be made.
Currency mandatory string
The currency in which the payment is being made. Currently, Bankgirot only supports SEK.
Possible value Description
SEK Specifies Swedish Krona as the currency for the transaction.
PayDate mandatory datetime
The payment date. For credit invoices, this is the last monitoring date.
PaymentId mandatory string
A number uniquely identifying the payment. Used in the LBUT call.
PaymentType optional int
Specifies the type of payment.

Credit invoices are monitored by Bankgirot until the date specified in the PayDate column, and are automatically matched against debit invoices to the same receiver.

Note: Credit invoices can not be used with PlusGiro.
Possible value Description
14 Payment
16 Credit invoice
17 Credit invoice, whole amounts
PlusGiroTo optional string
The account to which the payment should be made.
Reference mandatory string
OCR number, invoice number, or similar. Texts longer than 25 characters will be truncated.
Salary optional bit
Indicates a salary payment. Only applicable to bank account payments.

SQL Call: Autogiro admissions (AGMEDGIVREG) [To Bankgirot]

Is used to send AGMEDGIVREG files to Bankgirot. SQL with rows corresponding to payers whose admission, to be eligible for automatic transactions, should be registered or withdrawn. Accounts must be registered with AGMEDGIVREG before automatic transactions can be set up using AGBETUND.

May modify database: No

Parameters

@Action string
Set to 'AGMEDGIVREG' for this call.
@BatchId string
Passes the current batchid.

Resultset: Admissions and withdrawals

Resultset with one row for every admission or withdrawal.
Table count: repeated exactly once
Row count: one or more rows
Columns
BankgiroFrom optional string
Deprecated. The payer's Bankgiro account. Used as payer number if PayerNumber has not been specified.
BankgiroTo mandatory string
The account to which the payment should be made.
IsRejected optional bit
Set to 1 to reject a new mandate via the Internet bank.
OrganizationNumber optional string
The payer's organization number (10 digits).
PayerBankAccount optional string
The payer's bank acccount number. Must be returned if admission have been announced by mail form. Formatted as XXXXYYYYYYYYYYYY, where XXXX is the clearing number. If the account number is shorter than twelve digits, insert zeroes between clearing no. and account no. If account is "personkonto", using SSNO, the clearing no. should be 3300, if account is in "Handelsbanken" the clearing no. should be 6000. Not used with the service "Autogiro Företag".
PayerElectronicId optional string
ID number from electronic annoucement of admission. Retrieved from an AGMEDGIVANM file. Must be returned if admission has been announced electronically. Not used with the service "Autogiro Företag".
PayerNumber mandatory string
The payer number to use. Can contain at most 16 digits.
SSNO optional string
The payer's social security number. Formatted as YYYYMMDDXXXX. Used as payer number if PayerNumber has not been specified.
Withdraw optional bit
Set to one to withdraw admission. Leave blank or set to zero to register.

SQL Call: Autogiro payments (AGBETUND) [To Bankgirot]

Is used to send AGBETUND files to Bankgirot. SQL returning details for automatic transaction initiation. Payers must have been registered for automatic transactions by means of AGMEDGIVREG previously.

May modify database: No

Parameters

@Action string
Set to 'AGBETUND' for this call.
@BatchId string
Passes the current batchid.

Resultset: Autogiro transactions

Resultset with one row for every assignment of automatic transactions.
Table count: repeated exactly once
Row count: one or more rows
Columns
Amount mandatory decimal
The amount to be debited at every occasion within the assignment. If negative, the amount will be credited. Accepts the amount with up to two decimal spaces.
BankgiroFrom optional string
Deprecated. The payer's Bankgiro account. Used as payer number if PayerNumber has not been specified.
BankgiroTo mandatory string
The account to which the payment should be made.
PayDate mandatory datetime
The date when first payment for this assignment should be made. If is NULL the payment will be carried out as soon as possible (only allowed if PaymentInterval is set to "ONCE").
PayerNumber mandatory string
The payer number to use. Can contain at most 16 digits.
PaymentCount mandatory int
Number of times payment should be carried out until the assignment expires. If value is omitted or NULL, the assignment will run indefinitely.
PaymentInterval mandatory string
Interval between payments.
Possible value Description
FULLYEAR Transaction occurs yearly.
HALFYEAR Transaction occurs every half year.
MONTH Transaction occurs monthly.
ONCE Transaction occurs only once.
QUARTER Transaction occurs quarterly.
Reference mandatory string
OCR No, Invoice No. or similar. Maximum length 16 characters.
SSNO optional string
Deprecated. The payer's social security number. Formatted as YYYYMMDDXXXX. Used as payer number if PayerNumber has not been specified.

SQL Call: Withdraw autogiro assignments (AGBETMAK) [To Bankgirot]

Is used to send AGBETMAK files to Bankgirot. SQL returning identification info for assignment to be withdrawn. Withdrawal will be effective for all assigments corresponding to a combination of payer number and BankgiroTo number. Only revokes the assignments from AGBETUND, not the admission through AGMEDGIVREG.

The following combinations are available for cancellations:
PayerNumber
The above + DueDate
The above + Amount
The above + Reference

The following combinations are available for amendments:
NewDueDate
The above + DueDate
The above + PayerNumber
The above + Amount
The above + Reference

Recurring payments can not be amended.

May modify database: No

Parameters

@Action string
Set to 'AGBETMAK' for this call.
@BatchId string
Passes the current batchid.

Resultset: Withdraw assignments

Resultset with one row for every combination of Bankgiro number and payer SSNO whose assignments should be withdrawn.
Table count: repeated exactly once
Row count: one or more rows
Columns
Amount optional decimal
The cancellation/amendment only applies to payments with this amount.
BankgiroFrom optional string
Deprecated. The payer's Bankgiro account. Used as payer number if PayerNumber has not been specified.
BankgiroTo mandatory string
The account to which the payment should be made.
DueDate optional date
The cancellation/amendment only applies to payments with this due date.
NewDueDate optional date
Indicates that this is an amendment instead of a cancellation, and that the due date should be changed to this due date.
PayerNumber mandatory string
The payer number to use. Can contain at most 16 digits.
Reference optional string
The cancellation/amendment only applies to payments with this reference.
SSNO optional string
Deprecated. The payer's social security number. Formatted as YYYYMMDDXXXX. Used as payer number if PayerNumber has not been specified.

SQL Call: Create electronic invoice to receiver (EF) [To Bankgirot]

Is used to send BGC INVOICE files to Bankgirot.
The call is only made if the EF column is set in the 'Get Actions' database call.

May modify database: No

Parameters

@Action string
'EF'
@BatchId string

Resultset: Batch info

Table count: repeated exactly once
Row count: zero or one row
Columns
SenderAccountBG mandatory string
The bankgiro account of the Sender.

Ett bankgiro- eller plusgironr anges som ett rent numeriskt värde. Numret har fastlängd, 10 tecken, högerställt samt nollutfyllt utan bindestreck enligt formatet ZZNNNNNNNN.
SenderAccountPG optional string
The postgiro account of the Sender.

Ett bankgiro- eller plusgironr anges som ett rent numeriskt värde. Numret har fastlängd, 10 tecken, högerställt samt nollutfyllt utan bindestreck enligt formatet ZZNNNNNNNN.
SenderAddress1 optional string
The first address row of the Sender.
SenderAddress2 optional string
The second addressrow of the Sender.
SenderAddressCity optional string
The city of the Senders address.
SenderAddressCountry optional string
The country name of the Senders address.
SenderAddressCountryCode optional string
The country code of the Senders address.
SenderAddressZipCode optional string
The zip code of the Senders address.
SenderName mandatory string
The name of the Sender.
SenderOrgNo mandatory string
The organization number of the Sender.
SenderVATNo mandatory string
The VAT number of the Sender.
SenderVATText optional string
The VAT info of the Sender. i.e. "Innehar F-skattsedel".
TestCode optional string
Electronic invoices can only be sent to Bankgirot in a production environment.
To do a test, a test code has to be applied.
Valid codes are C (Certify) or T (Test).
In a B2C scenario:
- Applying "C" or "T", the invoices will only reach Bankgirot.
In a B2B scenario:
- Applying "C", the invoices will only reach Bankgirot but will be validated against the receivers unique controls.
- Applying "T", the invoices will be sent so the receiver. The receiver has to be able to handle the test.

Resultset: Invoice headings

The order will be used in the output to Bankgirot.
Table count: repeated exactly once
Row count: one or more rows
Columns
AmountNet mandatory decimal
The net amount of the invoice.
AmountTotal mandatory decimal
The total amount of the invoice.
AmountVat mandatory decimal
The VAT amount of the invoice.
Autogiro optional bit
Set to '1' if receiver pay by autogiro
ChangeableAmount optional bit
Set to 1 if the amount can be changed.
Currency mandatory string
The currency of the invoice.
DueDate mandatory datetime
The due date of the invoice.
InvoiceAddress1 optional string
The first address line of the invoice.
InvoiceAddress2 optional string
The second address line of the invoice.
InvoiceAddressCity optional string
The city of the invoice address.
InvoiceAddressCountry optional string
The country name of the invoice address.
InvoiceAddressCountryCode optional string
The country code of the invoice address.
InvoiceAddressZipCode optional string
The zip code of the invoice address.
InvoiceDate mandatory datetime
The invoice date of the invoice.
InvoiceNumber mandatory int
The invoice number of the invoice.
This is the key column. Any duplicates will be ignored.
ReceiverBankCode optional string
The code that indentifies the receivers bank (B2C). Mandatory for B2C.
Possible value Description
AAB Ålandsbanken
FINN Sparbanken Öresund
FSPA Swedbank
ICA ICA banken
LFB Länsförsäk.bank
NB Nordea
OEB Danske Bank
SBAB SBAB
SEB SEB
SHB Handelsbanken
SKB Skandiabanken
SYD Sparbanken Syd
ReceiverBankId optional int
MUST be included if the receiver has "automatiskt kvitterad anmälan". DO NOT INCLUDE OTHERWISE.

For a table of bank id values, see the last page of the manual "E-faktura Anmälningsärende", available online at https://www.bankgirot.se/globalassets/dokument/tekniska-manualer/e-faktura_tekniskmanual_anmalningsarende_sv.pdf
ReceiverCostCenter optional string
The cost center given by the invoice Receiver.
ReceiverName mandatory string
The name of the invoice Receiver.
ReceiverNr optional string
The Senders number of the invoice Receiver.
ReceiverOrderNr optional string
The order number given by the invoice Receiver.
ReceiverReference optional string
The reference given by the invoice Receiver.
ReceiverRegNo mandatory string
The 12 digit Social Security Number (B2C) or the 10 digit Organization Number (B2B) of the invoice Receiver.
Reference mandatory string
Must be a valid OCR number.
SenderEmail optional string
An email address given by the invoice Sender.
SenderFax optional string
A fax number given by the invoice Sender.
SenderMessage optional string
A message given by the invoice Sender.
SenderOrderNr optional string
An ordernumber given by the invoice Sender.
SenderPhone optional string
A phone number given by the invoice Sender.
SenderReference optional string
A reference given by the invoice Sender.

Resultset: Invoice rows

The order will be used in the output to Bankgirot.
Table count: repeated exactly once
Row count: one or more rows
Columns
APriceNet optional decimal
The unit net price of the invoice row.
APriceVat optional decimal
The unit VAT price of the invoice row.
ArticleNr optional string
The article number of the invoice row.
Description mandatory string
The article description of the invoice row.
InvoiceNumber mandatory int
The invoice number (OCR) of the invoice that the invoice row belongs to.
If this number has no match in the previous action, the row will be ignored.
Quantity optional int
The quantity of the invoice row.
QuantityUnit optional string
The quantity unit of the invoice row.
RowIndex mandatory int
Combined with the invoice number this is the unique key of the invoice row.
The row index do not override the order of output. It is only a key in the collection.
If there is a match in the previous rows, the row will be ignored.
RowText optional string
A text describing the invoice row.

SQL Call: Save file (mandatory)

Called once for each file generated.

May modify database: Yes

Parameters

@Action string
The type of file.
Possible value Description
AgBetMak
AgBetUnd
AgMedgivReg
Ef
LbIn
@BankFile binary
The generated file.
@BatchId int
The parameter is only set if a batch ID has been specified.

SQL Call: Finished (mandatory)

This call is made after all other calls have been made.

May modify database: Yes

Parameters

@Finished bit
Set to 1 for this call.

SQL Call: Validate parameters

Allows you to validate the SQL parameters before any other SQL is run in the component. This call is only made if the SQL is a stored procedure and Validate parameters is checked.

May modify database: No

Parameters

@Force bit
Set to 1 if the last call to validate parameters used admin_force and the user clicked OK in the OK/Cancel dialog.
@ValidateParams bit
Set to 1 when this call is made.

Resultset: Messages (optional)

Table count: repeated zero or one time
Row count: zero or one row
Columns
ADMIN_Force optional string
Message asking the end user to confirm their parameters.
ADMIN_Message optional string
Message explaining why the parameters are rejected.

Custom access control and logging

SQL Call: Custom access control and logging

Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.

Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.

The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.

If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.

May modify database: Yes

Resultset: Access permissions

Return whether the user is allowed to visit the menu item with the current parameters.
Table count: repeated exactly once
Row count: exactly one row
Columns
GrantAccess mandatory bit
1 if the user is allowed to view the menu item, 0 if the user should not be allowed to view the menu item.

If 0 then an error will be logged as the user should not have been able to reach the menu item with the given parameters in the first place.

Querystring parameters

menuitemheading optional
String that replaces the menu item name when the menu item is loaded. It does not replace the name before that (like for example in the navigator). It is ignored if the menu item is displayed as a part in a multipart in which case the name can be set from the multipart procedure.