SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
Tervise ja Heaolu Infosüsteemide Keskus
SEB gateway olemasolev teenus asendatakse uue lahendusega ja sellega
seonduvalt SKAIS1-s vajalike muudatuste tegemine
SKAIS raamleping nr 1.8-2/351-1 pakkumus nr 24
AS Medisoft
Pakkumus
Tallinn 2019
1
SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
Sisukord
1 KINNITUSED..................................................................................................................................................... 3
2 AUTORIÕIGUSED ........................................................................................................................................... 3
3 TÖÖ LÄBIVIIMISEKS KAVANDATAVAD TEGEVUSED ........................................................................ 4
3.1 Tööde tulemid.................................................................................................................................................. 5
4 PROJEKTIS OSALEJATE NIMEKIRI.......................................................................................................... 5
5 AJAKAVA .......................................................................................................................................................... 5
6 RISKID................................................................................................................................................................ 5
7 MAKSUMUSVORM.......................................................................................................................................... 6
2
SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
1 Kinnitused
1. Käesolevaga kinnitame, et oleme nõus pakkumuse tingimustega.
2. Käesolevaga kinnitame, et oleme ülesande püstitusest aru saanud.
3. Käesolevaga kinnitame, et ülesanne on realiseeritav.
4. Pakkumise punkt 6 sisaldab ärisaladust.
5. Käesolev pakkumus on konfidentsiaalne ja seda ei tohi edastada kolmandatele
osapooltele ilma Pakkuja nõusolekuta.
Kuupäev: 21.08.2019
Pakkuja nimi ja andmed: Medisoft AS, registrikood 10047646, Räägu 35A, 13417 Tallinn,
tel 659 5760, faks 659 5761, e-mail
[email protected]
2 Autoriõigused
Käesolevas pakkumises tekivad autoriõigused vastavalt raamlepingu nr 1.8-2/351-1
30.08.2017.a. punktile 9.4.1. Töövõtja loovutab kõik üleantava tarkvara varalised autoriõigused
Tarkvarale tervikuna Tellijale.
Kuupäev: 21.08.2019
Pakkuja nimi ja andmed: Medisoft AS, registrikood 10047646, Räägu 35A, 13417 Tallinn,
tel 659 5760, faks 659 5761, e-mail
[email protected]
3
SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
3 Töö läbiviimiseks kavandatavad tegevused
Töö läbiviimiseks kavandatavad tegevused asuvad dokumentides:
1. Lisa 3. SEB Baltic Gateway Technical Specification.pdf
2. Lisa 4. Allkirjastatud maksefaili näide 1 signed_pain.001_example.asice
3. Lisa 5. Allkirjastatud maksefaili näide 2 pain.002.xml
Hetkeolukord: SEB poolt on loodud SonicMQ baseeruv java klient mis on integreeritud
rakendusse.
Uus lahendus: SEB Baltic Gateway on REST-XML API, mille tugi tuleb rakenduses
realiseerida. Esialgse info järgi edastavate failide struktuurid ei muutu.
Arendatav ja muudetav funktsionaalsus
1. Maksete saatmine panka. Muudetav komponent: veebirakendus SkaisRmpWeb.
2. Makse tagasiside saamine. Muudetav komponent: Java rakendus SkaisRmpSEBClient. Kui vana
realisatsioon oli message queue, st pank saatis meile ise tagasiside, siis nüüd peab hakkama
rakendus ise küsima perioodiliselt iga maksefaili kohta ise tagasisidet, selleks tuleb ise pidada
arvet kas faili kohta on tagasiside saadud. Osaline tagasiside?
3. Automaatselt genereeritava väljavõtte salvestamine. Muudetav komponent: Java rakendus
SkaisRmpSEBClient. Kui vana realisatsioon oli message queue, st. pank saatis meile ise
tagasiside, siis nüüd peab rakendus ise küsima õigel ajal tagasiside faili.
Märkused:
1. SEB Baltic Gateway dokumentatsioon ütleb, et maksete allkirjastamisel on toetatud asice
formaat. Mauno Lindmäe poolt meile vahendatud SEB kirjas on kirjas et „..Allkirja osas
toetame edasi ka .bdoc formaati, ehk kui te hetkel seda kasutate, siis pole vaja muuta.“
See tuleb kindlasti ära märkida, et allkirjastamise formaati ei muudeta, st kasutatakse BDOCi
edasi. Selle muutmiseks tuleb võtta vananenud jdigidoc asemel kasutusele uus DigiDoc4j
mis on eraldi töö ja ei ole skoobis.
2. SEB Baltic Gateway võimaldab koostada ka väljavõtteid etteantud perioodide kohta, see on
asi mis puudus varasemas versioonis. Seda funktsionaalsust ei arendata. Laetakse alla vaid
kogu pangapäeva kohta eelkoostatud väljavõtteid.
4
SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
3.1 Tööde tulemid
Pakkuja tööde tulemid on loetletud alljärgnevalt:
Nr Tegevused Tulemid
1
Analüüs ja Analüüsi dokument
projekteerimine
Programmeerimine SkaisRmpWeb, SkaisRmpSEBClient
Testimine Installeerimise juhend, testimise dokumentatsioon
4 Projektis osalejate nimekiri
Nimi Roll käesolevas projektis
Thea Tramberg Projektijuht
Marko Parman Analüütikud
Marko Parman, Alo Ohmann Programmeerijad
Marko Parman Testijad
5 Ajakava
Tegevus Tähtaeg
Analüüs 27.09.2019
Tellija test 31.10.2019
Reliis 14.11.2019
6 Riskid
Riskid on loetletud alljärgnevalt:
Mõju Esinemise Tagajärjed riski
Nr Risk tugevus tõenäosus avaldumisel Maandamise meede
1 Testimine on takistatud kõrge kõrge Live minek on takistatud TEHIK peab tagama
juurdepääsud
testkeskkondadele
5
SKAIS raamleping pakkumus nr 24
________________________________________________________________________________________________________
7 Maksumusvorm
Arendus- Arendustööde etapp / Tööde profiil Raamlepingu roll Ühe töötunni Tundide Koguhind Koguhind
ülesanne hind arv (eurot km-ta) (eurot km-ga)
(eurot km-ta)
SEB gateway olemasolev teenus asendatakse uue
lahendusega ja sellega seonduvalt SKAIS1-s vajalike
Töö 1 muudatuste tegemine
Analüüs ja projekteerimine Süsteemianalüütik 70 120 8 400,00 10 080,00
Programmeerimine Programmeerija 60 200 12 000,00 14 400,00
Testimine Testija 60 240 14 400,00 17 280,00
Projekti juhtimine Projektijuht 70 40 2 800,00 3 360,00
600 37 600,00 45 120,00
Kuupäev: 21.08.2019
Pakkuja esindaja ees- ja perekonnanimi: Jako Heinmets, juhatuse liige
6
Baltic Gateway API v1
Service specification
Valid from 01.07.2019
Contents
1. General .................................................................................................................................................. 3
2. Authentication ....................................................................................................................................... 4
3. Baltic Gateway account information ..................................................................................................... 5
3.1. Intraday report .............................................................................................................................. 5
3.2. EOD pre-generated statement ...................................................................................................... 6
3.3. Past days statement ...................................................................................................................... 7
4. Baltic Gateway payment........................................................................................................................ 8
4.1. Payment initiation ......................................................................................................................... 9
4.2. Payment file status ...................................................................................................................... 12
4.3. Payment status report (pain.002) ............................................................................................... 13
5. API error management ........................................................................................................................ 15
5.1. HTTP status codes and general errors ......................................................................................... 15
5.1. Account information API errors ................................................................................................... 15
5.2. Payment API errors ...................................................................................................................... 16
1
Baltic Gateway API v1
Service specification
Valid from 01.07.2019
Document versions
Date Change
01.01.2019 Initial version of the document
01.07.2019 Added description of Baltic Gateway v1 payment API;
Added more details to authentication paragraph;
Updated description of account information endpoints;
Moved error handling description to separate chapter and added list of more detailed
errors
2
SEB BALTIC GATEWAY API SPECIFICATION 2019
1. General
This is the SEB Baltic Gateway (BGW) API (Application Programming Interface) specification. Here you
can find out about the functionality available through the Baltic Gateway, and how you can integrate
SEB banking services into your current and future business processes. This is designed to allow you to
automate your business operations.
Available countries: SEB Lithuania (CBVILT2X), SEB Latvia (UNLALV2X), SEB Estonia (EEUHEE2X).
Baltic Gateway APIs are based on REST architecture, data transfer is ensured using:
HTTPS (HTTP 1.1 and TLS 1.2) protocol;
PKI-based client authentication with SEB issued certificate;
ISO 20022 XML data format – format descriptions aren’t part of BGW service specification but
added as separate documents;
UTF-8 encoding is used by default for all endpoints;
URL to access PRODUCTION services: https://api.bgw.baltics.sebgroup.com;
URL for TEST services: contact below support emails to get more details.
Services:
Available Services:
Intraday (current day) account report (ISO XML camt.052)
End of Day (EOD) pre-generated account statement (ISO XML camt.053)
Past days account statement (ISO XML camt.053)
Payment initiation (ISO XML pain.001) and Payment status (ISO XML pain.002)
In Development:
E- invoice forwarding and e-invoice orders report
API Versioning – API version number is included into the URL:
https://api.bgw.baltics.sebgroup.com/v1/
After release of new version, previous versions will be maintained at least for 6 months.
API documentation with code examples is kept in SEB’s developer portal:
https://developer.baltics.sebgroup.com/bgw/apis
Contacts for technical questions and getting access to test environment:
Estonia
[email protected]
Latvia
[email protected]
Lithuania
[email protected]
3
SEB BALTIC GATEWAY API SPECIFICATION 2019
2. Authentication
Baltic Gateway communication uses certificate based authentication (X.509 public key infrastructure
(PKI) standard). Regular HTTPS (HTTP/1.1 over TLS1.2) is used for secured communication. Certificate
for authentication is issued by SEB for which client needs to provide Certificate Signing Request (CSR).
Common Name value of the certificate is agreed in BGW service agreement.
Follow these instructions to generate CSR for SEB Baltic Gateway with OpenSSL or you can also use
some other tool.
1. Use the following command to generate a private key that is file encrypted. You will be asked to add
password to access the file. In case you lose the passphrase private key is not usable and you have to
order new certificate from SEB.
openssl genrsa -aes256 -out sebbgw.key 2048
Option to create a private key without file encryption:
openssl genrsa -out sebbgw.key 2048
IMPORTANT: Store your private key safely and keep in mind that anyone who can use it can access
your data through Baltic Gateway. When your private key gets compromised notify SEB immediately to
block access to API-s.
2. Use the following command to create CSR:
openssl req -new -key sebbgw.key -out company.csr -sha256
*For generating CSR you’ll be asked for your passphrase if you included it in previous step.
3. When generating a CSR you have to add following values:
Field Value Example
Common Name (CN) Add your Baltic Gateway agreement number BGW11111
Organization (O) Legal name of your organization Company SIA
Organization Unit (OU) Unit of the organization IT
City or Locality (L) City of your organization location Riga
State or Province (S) State of your organization location Latvia
Country (C) ISO country-code of your organization LV
4. Send the CSR to SEB together with signed Baltic Gateway agreement. In return SEB will provide you
the certificate (with CN value from agreement) which can be used for authentication to access API-s.
Supporting third party certificate for authentication is in development plan:
TLS/SSL certificates issued by selected trusted Certificate Authorities (CA)
Authentication certificate issued by trusted service provider, for example
o SK ID Solutions AS, more information about SK certificate for authentication can be
found here – https://www.sk.ee/en/services/authentication-certificate/
4
SEB BALTIC GATEWAY API SPECIFICATION 2019
3. Baltic Gateway account information
3.1. Intraday report
Intraday report includes transactions of the request day (current day) up to day closure of books (End
Of Day - EOD).
It’s possible to receive only newer transactions by using path parameter transactionIdGreaterThan with
value from previously requested statement. This transaction ID is stated in statement as part of Entry
Details in Proprietary Reference (ISO XML tag 2.155 see example below). In this case page parameter
can’t be applied.
<NtryDtls>
<TxDtls>
<Refs>
<AcctSvcrRef>RO123456789L02</AcctSvcrRef>
<InstrId>12345</InstrId>
<Prtry>
<Tp>SEQ</Tp>
<Ref>15397525410675201267</Ref>
</Prtry>
</Refs>
Time of EOD date switch isn’t exactly 23:59:59 but takes place sometime after 23. All transactions
after EOD switch will be booked with next day’s date. In order to receive data about transactions after
EOD but for current calendar date parameter “includeFutureDate” can be used.
Entry (transaction) sequence in report is from oldest to most recent (ascending), which means that new
transactions will be added as last or to greatest page in case paging is used. In case of multi-currency
account, currency parameter should be used for request, otherwise <Rpt> part is repeated for each
currency and last entry can’t be decided for transactionIdGreaterThan functionality or in case of paging.
: /v1/accounts/{IBAN}/current-transactions
IBAN
currency
page
size
transactionId
GreaterThan
includeFuture
Date
5
SEB BALTIC GATEWAY API SPECIFICATION 2019
OrgId
GET {{URL}}/v1/accounts/LT123456789012345678/current-
transactions?currency=EUR&page=1&size=200&includeFutureDate=yes
OrgId: 12345678
Accept: application/xml
3.2. EOD pre-generated statement
End of Day (EOD) pre-generated statement includes all transactions executed in previous day (day
before current). In response, full statement file without split in pages will be received. In case of
multicurrency account, transactions for all currencies will be included.
NB! Statements are only generated for accounts specified for this service in BGW agreement.
: /v1/accounts/{IBAN}/eod-transactions
IBAN
date
OrgId
GET {{URL}}/v1/accounts/LV12UNLA1234567891234/eod-
transactions?date=2019-05-01
OrgId: 87654321
Accept: application/xml
6
SEB BALTIC GATEWAY API SPECIFICATION 2019
3.3. Past days statement
Past statement includes transactions for longer period in past (2 years from current date) up to current
day for use cases such as initial data migration or to support contingency situations and incidents. Data
can be requested for last two years. Date and entry sequence is oldest to newest.
: /v1/accounts/{IBAN}/transactions
IBAN
currency
from
to
page
size
OrgId
GET
{{URL}}/v1/accounts/EE123456789012345678/transactions?currency=USD&from
=2018-10-01&to=2018-10-31&page=1&size=3000
OrgId: 11112222
Accept: application/xml
7
SEB BALTIC GATEWAY API SPECIFICATION 2019
4. Baltic Gateway payment
API allows sending requests to SEB to fulfill payment orders from customer’s own current account in
SEB Estonia, SEB Latvia or SEB Lithuania and receive statuses for request and each individual payment.
In first stage only requests with signed files are supported and transfer orders don’t need any further
confirmation in other channel to be processed. Endpoints are only accessible for customer who has BGW
agreement with payment service option included.
Currently there are 3 endpoints for payment API:
POST /v1/signed-payment-files: to upload signed file of XML pain.001.001.03 format message
for immediate processing of transfer orders it contains and receive response with link to file
processing status.
GET /v1/payment-initiations/{paymentFileId}: to receive status of processing of the payment file
and link to pain.002 message.
GET /v1/payment-initiations/{paymentFileId}/pain002: to receive statuses of each individual
payment in XML pain.002.001.03 format message.
Payment types
Baltic Gateway allows initiating different types of European payments listed below. More information
about payment types, rules and applicable fees can be found at SEB’s webpage.
Intrabank –internal payment if both remitter’s and beneficiary’s account are in SEB (same country).
European (SEPA) – payment in euros to another local (domestic) or European Economic Area (EEA)
bank.
Instant – European payment which is transferred to the beneficiary’s account in seconds if instant
payment rules are fulfilled and the bank of the beneficiary has joined the instant payment system. If
possible SEB always processes payment as instant. List of participants can be found here.
European express – payment in euros (only allowed to Eurozone countries) that reach the beneficiary’s
bank on the same settlement date.
Cross-border (in development) – payment in another currency than euro to any bank (also in case local
or EEA bank) or a euro payment to a bank outside the European Economic Area. There are 3 types of
urgencies for cross-border payment: ordinary, urgent and express.
In case customer doesn’t add payment type and urgency selection to pain.001 message then bank
decides it based on payment information. Overall selection logic for payment type is the following:
Code filled in Beneficiary SEPA Beneficiary If instant payment Beneficiary not
Local Beneficiary reachable instant fails due to SEPA/instant
Instrument or in same Instant not supported reachable technical or reachable and/or
Service Level SEB Currency = EUR Currency = EUR beneficiary’s issues currency not EUR
No code used Intrabank SEPA Instant Processed as SEPA Ordinary cross-border
SEPA Intrabank SEPA Instant Processed as SEPA REJECTED
INST Intrabank REJECTED Instant Credited back REJECTED
NURG or NORM Intrabank Not suitable Not suitable Not suitable Ordinary cross-border
URGP or HIGH Intrabank Not suitable Not suitable Not suitable Urgent cross-border
SDVA or EXPR Intrabank European Express Not suitable Not suitable Express cross-border
8
SEB BALTIC GATEWAY API SPECIFICATION 2019
Duplication
3 levels of duplicate check – in all cases values are compared to used values in last 10 days:
1. Request duplication – Idempotency-Key for request needs to be unique;
2. File duplication – MsgId value in pain.001 need to be unique otherwise full file rejected with
error DU01;
3. Payment duplication – in case payment with equal data for below fields sent again then
payment is rejected with error AM05:
PmtInf_DbtrAcct_Id_IBAN
PmtInf_CdtTrfTxInf_PmtId_InstrId
PmtInf_CdtTrfTxInf_PmtId_EndToEndId
PmtInf_CdtTrfTxInf_Amt_InstdAmt Ccy
PmtInf_CdtTrfTxInf_RmtInf_Ustrd
PmtInf_CdtTrfTxInf_RmtInf_Strd_CdtrRefInf_Ref
PmtInf_CdtTrfTxInf_CdtrAcct_Id_IBAN or PmtInf_CdtTrfTxInf_CdtrAcct_Id_Othr_Id
Payment options
For first stage only regular payments with same value date are allowed – extra functionality is in
development:
Future value date payments – in case ReqdExctnDt value in pain.001 is future date then SEB will
store payments until specified date and start processing them on that date.
Waiting for funds – option with header parameter to choose if payments should be on hold not
rejected if debtor account doesn’t have enough funds and tried again after some time.
Consolidated payment - payments included in consolidated payment (e.g. salary payments) are
shown in debtor account statement as a single consolidated payment amount.
4.1. Payment initiation
Content type and signature
Described endpoint accepts containers which includes pain.001 format message and signature(s). For
such result customer has to use standard ASiC (Associated Signature Containers) which is a digital
container using the ZIP format to bind together signed objects with advanced electronic signatures.
More specifically supported type of container is AsiC Extended (ASiC-E) with .asice file extension. It can
hold one or more signature files which are based on XAdES (XML Advanced Electronic Signatures).
Additional information about containers and electronic signature:
DigiDoc4j description (Java library for digitally signing documents and creating digital signature
containers of signed documents) - https://github.com/open-eid/digidoc4j
.bdoc/.asice specification (Estonia) - https://www.id.ee/public/bdoc-spec212-eng.pdf
Information for developers about signatures, signing methods and formats (Estonia) -
https://www.id.ee/index.php?id=30469
Electronic signature information (Latvia) - https://www.eparaksts.lv/en/eSignature
Electronic signature information (Lithuania) - http://www.elektroninis.lt/en
SK ID Solutions AS services - https://www.sk.ee/en/services/
9
SEB BALTIC GATEWAY API SPECIFICATION 2019
In order to add electronic signature to files qualified certificate is needed. SEB supports certificates from
main Baltic Certification Authorities (CA):
SK ID Solutions AS (SK);
Latvian State Radio and Television center (LVRTC);
State Enterprise Centre of Registers (Lithuania);
Identity Documents Personalisation Centre under the Ministry of the Interior (Lithuania).
Accepted signature creation devices:
Estonian Latvian Lithuanian
eID card eID card* eID card
Digi-ID RC smart card
RC USB Token
Smart-ID Smart-ID** Smart-ID**
Mobile-ID Mobile-ID
*Only in case OCSP and timestamp certificate issuer for signature is SK; support for LVRTC will be added
during 2019.
**Smart-ID basic is not supported.
All options are usable in any country. This means that for example Lithuanian Mobile-ID can be used to
sign payments from SEB Latvia’s accounts. In addition to private person devices in SEB Estonia and
Lithuania customers can use company’s e-Seal for stamping files and in that case no additional
electronic signature is needed. This offers the way to automate signing and payment initiation process.
Signatures are validated and limits calculated depending on the used device:
For all devices with certificate for private person – this person needs to have payment right for
debtor account used in pain.001 in SEB’s Internet bank for business. Same applies for daily and
monthly limits. In case payment requires more than one signature (signing weights used for
users) then all needed signatures needs to be added to container and limits are checked and
updated (in case successful payments) for the last signer.
Company’s e-Seal – rights, daily and monthly limits are agreed in Baltic Gateway agreement and
container can only include one e-seal stamp. Personal electronic signature and e-seal can’t be
used together, in such case file will be rejected.
Only one file (container) is allowed to be added for each request and container can include one
pain.001 XML. Recommended maximum size for one pain.001 file is 5000 payments or 5MB.
UTF-8 encoding should be used for pain.001 and the same is used by default for all responses.
: /v1/signed-payment-files
OrgId
Idempotency-
Key
10
SEB BALTIC GATEWAY API SPECIFICATION 2019
Content-Type
Accept
POST {{URL}}/v1/signed-payment-files
OrgId: 12345678
Idempotency-Key: 0ce05d1b-bc73-4c03-bfd9-ec4f39b57730
Content-Type: multipart/form-data
Accept: application/xml
Content-Disposition: form-data; name=”paymentFile”;
filename="test.asice"
<PaymentFile>
<paymentFileId>cf8a9cf6-18e2-4f55-a9bc-cfef4644355f</paymentFileId>
<status>PENDING</status>
<errorCode/>
<errorMessage/>
<links>
<links>
<rel>self</rel>
<href>/v1/payment-files/cf8a9cf6-18e2-4f55-a9bc-cfef4644355f</href>
</links>
</links>
</PaymentFile>
{
"paymentFileId": "986167e2-7a24-4e3b-a61d-b6257d64331e",
"status": "PENDING",
"errorCode": null,
"errorMessage": null,
"link": [
{
"rel": "self",
"href": "/v1/payment-files/986167e2-7a24-4e3b-a61d-b6257d64331e"
}
]
}
11
SEB BALTIC GATEWAY API SPECIFICATION 2019
4.2. Payment file status
This endpoint allows customer to get processing status of the payment file and link to payment status
report (pain.002) using the specific paymentFileId value. In case the file processing fails in full, error
code and message is returned and no payments are created. This can happen mainly due to invalid
signature, lack of payment right or limits for account, XSD validation failure or error regarding pain.001
rules.
There are 3 different statuses used:
PENDING – not a final status, processing of (some) payments from the file is still in progress.
COMPLETED – final status, all payments from the file have received final status (either accepted
or rejected). This status should be awaited to request for payment status report (pain.002) to
avoid multiple requests before all payments have status.
REJECTED – final status, payment file processing failed and no payments were created.
: /v1/payment-initiations/{paymentFileId}
OrgId
Accept
paymentFileId
GET {{URL}}/v1/payment-initiations/2f13113f-278d-455f-90f0-111bb095a47a
OrgId: 12345678
Accept: application/xml
<PaymentFile>
<paymentFileId>2f13113f-278d-455f-90f0-111bb095a47a</paymentFileId>
<status>COMPLETED</status>
<errorCode/>
<errorMessage/>
<links>
<links>
<rel>self</rel>
<href>/v1/payment-files/2f13113f-278d-455f-90f0-111bb095a47a</href>
</links>
<links>
<rel>pain002</rel>
12
SEB BALTIC GATEWAY API SPECIFICATION 2019
<href>/v1/payment-files/2f13113f-278d-455f-90f0-111bb095a47a/pain002</href>
</links>
</links>
</PaymentFile>
{
"paymentFileId": "2f13113f-278d-455f-90f0-111bb095a47a",
"status": "COMPLETED",
"errorCode": null,
"errorMessage": null,
"link": [
{
"rel": "self",
"href": "/v1/payment-files/2f13113f-278d-455f-90f0-111bb095a47a"
},
{
"rel": "pain002",
"href": "/v1/payment-files/2f13113f-278d-455f-90f0-111bb095a47a/pain002"
}
]
}
<PaymentFile>
<paymentFileId>060dba0f-0c8f-4d7c-9523-631ea04953c8</paymentFileId>
<status>REJECTED</status>
<errorCode>AM16</errorCode>
<errorMessage>Control Sum at the Group level is invalid</errorMessage>
<links>
<links>
<rel>self</rel>
<href>/v1/payment-files/060dba0f-0c8f-4d7c-9523-631ea04953c8</href>
</links>
</links>
</PaymentFile>
4.3. Payment status report (pain.002)
This endpoint allows the customer to get statuses in pain.002.001.03 format for all payments sent with
pain.001. It includes original file and payment identifiers from customer’s pain.001, group level statuses
and single payment status. In case rejection of the payment, also reason is added using standard ISO
status reason codes. List of statuses isn’t final, with extra payment functionalities new codes will be
introduced according to ISO standard.
Group level statuses – OrgnlGrpInfAndSts_GrpSts and OrgnlPmtInfAndSts_PmtInfSts:
Code Name Definition
ACSC AcceptedSettlementCompleted Final status - all payments from original pain.001 and/or under
Payment Information block were successfully processed and
debited from customer’s account
PART PartiallyAccepted Final status - in case pain.001 and/or Payment Information block
contains both accepted and rejected payments
13
SEB BALTIC GATEWAY API SPECIFICATION 2019
RJCT Rejected Final status - all payments from original pain.001 and/or under
Payment Information block have been rejected
PDNG Pending All or some payments from original pain.001 and/or under Payment
Information are in pending status, processing in progress and not
yet debited from account
Single payment statuses – OrgnlPmtInfAndSts_TxInfAndSts_TxSts:
Code Name Definition
ACSC AcceptedSettlementCompleted Final status - accepted, settlement on the debtor's account has been
completed
RJCT Rejected Final status - all payments from original pain.001 and/or under
Payment Information block have been rejected
PDNG Pending Payment initiation is pending, further checks and status update will
be performed
: /v1/payment-initiations/{paymentFileId}/pain002
OrgId
Accept
paymentFileId
GET {{URL}}/v1/payment-initiations/2f13113f-278d-455f-90f0-
111bb095a47a/pain002
OrgId: 12345678
Accept: application/xml
14
SEB BALTIC GATEWAY API SPECIFICATION 2019
5. API error management
5.1. HTTP status codes and general errors
For request statuses regular HTTP codes are used:
HTTP status Description
200 OK Request has succeeded.
201 Created Request has succeeded, new resource has been created.
400 Bad Request The request cannot be fulfilled due to bad syntax.
401 Unauthorized Similar to 403 Forbidden, but specifically for use when authentication is
possible but has failed or not yet been provided.
403 Forbidden The request was valid, but the server is refusing action. The user might not
have the necessary permissions for a resource.
404 Not Found The requested resource could not be found but may be available again in
the future.
406 Not acceptable The requested resource is capable of generating only content not
acceptable according to the Accept headers sent in the request.
429 Too Many Requests You have sent too many requests in a given amount of time.
500 Internal server Error Request failed due to connection problems.
In case of not successful status, more specific error code and text is added. NB! List of codes is not final,
some might be removed from use and new errors added for different endpoints and then list will be
updated under this chapter with next documentation version.
This is the list of general access and request errors used for all Baltic Gateway API endpoints:
Code Message HTTP
LBR_ARGUMENT_TYPE_MISMATCH_ERR "Argument type mismatched with required one" 400
LBR_BAD_FORMAT_REQUEST "Bad property format provided in request" 400
LBR_BAD_REQUEST "Bad request" 400
LBR_MESSAGE_NOT_READABLE "Http message is not readable" 400
LBR_MISSING_ORG_ID "Missing org id" 400
LBR_MISSING_HEADER "Missing mandatory header" 400
LBR_NOT_AUTHORIZED "Access to this resource requires authorization" 401
LBR_ACCESS_DENIED "Access denied" 403
LBR_SERVICE_NOT_ACTIVE "Service is not active" 403
LBR_NOT_FOUND "Requested resource not found" 404
LBR_UNSUPPORTED_MEDIA_TYPE "Supported media types: %s" 406
LBR_SYS_ERR "System error" 500
5.1. Account information API errors
In addition to general error codes for API access and requests, below codes are used for account
information endpoints:
Code Message HTTP
LBR_BAD_TRANSACTION_HISTORY_QUERY "Transaction history query is invalid" 400
LBR_CANNOT_RETRIEVE_PAGE "Cannot retrieve pages other than the first, if 400
using transactionId filtering"
LBR_DATE_INVALID "%s should be in the past" 400
15
SEB BALTIC GATEWAY API SPECIFICATION 2019
LBR_EOD_DATE_INVALID "date should be in the range of 5 working days in 400
past"
LBR_PAGE_NUMBER_INVALID "Invalid page number. Page numbering starts 400
from 1"
LBR_PAGE_SIZE_EXCEEDED "Asking for bigger page size than maximum" 400
LBR_TRANSACTION_DEPTH_EXCEEDED "Asking for too old info. Asking from: %s. Limit in 400
years is %s"
LBR_TRANSACTION_RANGE_EXCEEDED "Asking transaction history ranges are incorrect. 400
Asking transaction history for: %s days. Max
allowed: %s days"
LBR_TRANSACTION_RANGE_INCORRECT "Asking transaction history ranges are incorrect. 400
Date to is earlier than date from"
LBR_TRANSACTIONS_MISSING "No transactions for defined period" 400
LBR_EOD_STATEMENT_NOT_GENERATED "Statement has not been generated yet for date 404
%s"
5.2. Payment API errors
General access and request errors listed under 5.1 are used for all payment endpoints. In case request
has succeeded (200) but file or payment processing failed then status reasons from ISO 20022
External Code Set are used for file status and pain.002 endpoints.
File level errors – full file is rejected:
Code Message Reason
TA01 The transmission of the file was not successful – it had to be aborted (for technical System error
reasons)
FF01 Dynamic reason pointing to mistake in pain.001 or "File Format incomplete or invalid" pain.001 XSD
DS0A Data signature is required Signature/container
DS0B Data signature for the format is not available or invalid Signature/container
DS0D The signer certificate is not valid (revoked or not active) Signature/container
NARR Signature validation failed Signature/container
NARR Multiple e-Seal signatures Signature/container
NARR File signed with both e-Seal and user signature Signature/container
AC02 Debtor account number invalid or missing Signing rights
AM14 Transaction amount exceeds limits agreed between bank and client Signing rights
DS19 The user’s rights (concerning his signature) are insufficient to execute the order Signing rights
DS0H Signer is not allowed to sign for this account Signing rights
DU01 Request with the same MsgId is already processed Duplication
DU02 Payment Information Block is not unique XML rules
AM12 Amount is invalid or missing XML rules
AM16 Control Sum at the Group level is invalid XML rules
AM17 Control Sum at the Payment Information level is invalid XML rules
AM19 Number of transactions at the Group level is invalid or missing XML rules
AM20 Number of transactions at the Payment Information level is invalid XML rules
CH03 Value in Requested Execution Date or Requested Collection Date is too far in the future XML rules
CH04 Requested Execution Date or Requested Collection Date is too far in the past XML rules
DT01 Invalid date - not allowed to use multiple different Requested Execution Dates XML rules
NARR BtchBookg is not supported XML rules
16
SEB BALTIC GATEWAY API SPECIFICATION 2019
Payment processing errors – individual transaction is rejected:
Code Message
AM05 Payment is a duplicate of another payment
AC01 Account number is invalid or missing
AC02 Debtor account number invalid or missing
AC03 Creditor account number invalid or missing
AC05 Debtor account number closed
AC06 Account specified is blocked, prohibiting posting of transactions against it
AC07 Creditor account number closed
AC09 Account currency is invalid or missing
AC10 Debtor account currency is invalid or missing
AC11 Creditor account currency is invalid or missing
AG01 Transaction forbidden on this type of account
AG03 Transaction type not supported/authorized on this account
AG08 Transaction failed due to invalid or missing user or access right
AM02 Specific transaction/message amount is greater than allowed maximum
AM03 Specified message amount is an non processable currency outside of existing agreement
AM04 Amount of funds available to cover specified message amount is insufficient
AM05 Payment is a duplicate of another payment
AM11 Transaction currency is invalid or missing
AM12 Amount is invalid or missing
AM14 Transaction amount exceeds limits agreed between bank and client
BE09 Country code is missing or invalid
BE16 Debtor or Ultimate Debtor identification code missing or invalid
BE19 Charge bearer code for transaction type is invalid
BE22 Creditor name is missing
CNOR Creditor bank is not registered under this BIC in the CSM
DS04 The order was rejected by the bank side (for reasons concerning content)
DS19 The user’s rights (concerning his signature) are insufficient to execute the order
DS0H Signer is not allowed to sign for this account
FF03 Payment Type Information is missing or invalid
FF06 Category Purpose code is missing or invalid
FF10 File or transaction cannot be processed due to technical issues at the bank side
RC04 Creditor bank identifier is invalid or missing
RR05 Regulatory or Central Bank Reporting information missing, incomplete or invalid
RC06 Debtor BIC identifier is invalid or missing
RR09 Structured creditor reference invalid or missing
RR10 Character set supplied not valid for the country and payment type
RR12 Invalid or missing identification required within a particular country or payment type
TM01 Payment was received after agreed processing cut-off time
NARR Creditor account cannot match Debtor account
NARR Creditor bank is not INST reachable
NARR Creditor bank is not SEPA reachable
NARR Express payment is not possible due to local holiday in beneficiary country
NARR Incorrect beneficiary name
NARR Payment type is not allowed
NARR Payments to creditor account are forbidden
NARR Payments to creditor bank are forbidden
NARR Structured or unstructured remittance information required
NARR Unable to process payment: please contact the bank for more information
17
Raamlepingu 1.8-2/351-1 alusel sõlmitud hankeleping 3-9/1959-1
HANKELEPING nr 3-9/1959-1
Tervise ja Heaolu Infosüsteemide Keskus (registrikood 70009700), asukohaga Uus-Tatari 25, 10134
Tallinn, keda põhimääruse alusel esindab direktor Katrin Reinhold (edaspidi tellija) ja
Sotsiaalkindlustusamet (registrikood 70001975), asukohaga Endla 8, 15092 Tallinn, keda
põhimääruse alusel esindab peadirektor Egon Veermäe (edaspidi teenuse saaja), ja
AS Medisoft (registrikood 10047646), aadress Räägu 35A, 13417 Tallinn, keda esindab põhikirja alusel
Jako Heinmets (edaspidi töövõtja),
edaspidi eraldi pool või koos pooled, sõlmisid raamlepingu nr 1.8-2/351-1 alusel käesoleva
hankelepingu (edaspidi leping) alljärgnevas.
1. Lepingu ese
1.1 Lepingu esemeks on lisas 1 nimetatud töö koos garantiiteenustega (edaspidi töö).
2. Lepingu hind
2.1 Tellija kohustub tasuma töö eest kokku 45 120,00 (nelikümmend viis tuhat sada kakskümmend)
eurot koos käibemaksuga 30 (kolmekümne) tööpäeva jooksul arvates arve saamisest.
2.2 Töövõtja esitab tellijale arve pärast töö üleandmise-vastuvõtmise akti allkirjastamist.
3. Töö üleandmise ja vastuvõtmise tingimused
3.1 Töövõtja annab töö üle vastavalt ajaplaanile käesoleva lepingu lisas 3.
3.2 Tellija vaatab töö üle vastavalt raamlepingu punktile 8.
4. Autoriõigused
4.1 Vastavalt pakkumusele võõrandab töövõtja tellijale kõik üle antava töö varalised autoriõigused.
5. Poolte vastutus
5.1 Juhul kui tellija ei tasu üle antud töö eest tähtaegselt, on töövõtjal õigus nõuda tellijalt viivise
tasumist suuruses 0,15% iga tasumisega viivitatud päeva eest tähtajaks tasumata summalt.
5.2 Juhul kui töövõtja ei anna tööd tellijale üle punktis sätestatud tähtajaks või viivitab puuduste
kõrvaldamisega, kohustub töövõtja maksma tellijale leppetrahvi 0,15% lepingu hinnast (lepingu punkt)
iga üleandmise või puuduste kõrvaldamisega viivitatud päeva eest.
5.3 Garantiitingimuste rikkumise korral on tellijal õigus nõuda töövõtjalt leppetrahvi kuni 30% lepingu
hinnast iga juhtumi korral.
5.4 Lepingust tulenevate viiviste ja leppetrahvide maksmine, samuti tekitatud kahju hüvitamine ei
vabasta lepingut rikkunud poolt mistahes lepingujärgsete kohustuste täitmisest.
6. Poolte vahelised teated ja kontaktisikud
6.1 Teadete edastamine toimub üldjuhul telefoni, e-posti või posti teel. Juhul, kui teate edastamisel on
olulised õiguslikud tagajärjed, peavad teisele poolele edastatavad teated olema edastatud taasesitamist
võimaldavas vormis (s.o kirjalikus vormis, faksi või e-posti teel). Informatiivset teadet võib edastada ka
telefoni teel.
6.2 Teate edastamise hetkeks loetakse faksi või elektronkirja tehniliselt tõendatud saatmise hetk või
kirjaliku teate allkirjaga tõendatud vastuvõtmise hetk.
Raamlepingu 1.8-2/351-1 alusel sõlmitud hankeleping 3-9/1959-1
6.3 Tellija kontaktisikuks lepingu täitmisel on Mari Paloson, e-post:
[email protected].
6.4 Teenuse saaja kontaktisikuteks lepingu täitmisel on Signe Uustal tel 518 1787, e-post:
[email protected]
6.5 Töövõtja kontaktisikuks lepingu täitmisel on Thea Tramberg, tel 659 5764, e-post:
[email protected].
7. Lepingu kehtivus
7.1 Leping on koostatud eesti keeles ja allkirjastatud digitaalselt.
7.2 Leping jõustub sellele poolte poolt allakirjutamise hetkest ja kehtib kuni poolte poolt oma
lepinguliste kohustuste täitmiseni.
8. Lõppsätted
8.1 Lepingu täitmisel tekkinud vaidlused ja lahkarvamused lahendavad pooled läbirääkimiste teel.
Kokkuleppe mittesaavutamisel lahendatakse vaidlused Harju Maakohtus.
8.2 Lepingu täitmisel ja lepingust tulenevate vaidluste lahendamisel lähtutakse Eesti Vabariigi
õigusaktidest.
8.3 Pooled ei tohi Lepingust tulenevaid õigusi ja kohustusi üle anda kolmandatele isikutele ilma teise
poole kirjaliku nõusolekuta.
8.4 Lepingu dokumendid koosnevad käesolevast lepingust, lepingu lisadest ning lepingu muudatustest,
milles pooled võivad kokku leppida lepingu allakirjutamise järgselt.
8.5 Lepingu lahutamatuteks osadeks lepingu sõlmimise hetkel on järgmised dokumendid:
8.5.1 Lisa 1 Hankelepingu eseme SEB Gateway tehniline kirjeldus (SEB Baltic Gateway Technical
Specification).
8.5.2 Lisa 2 Medisofti pakkumus.
8.5.3 Lisa 3 ajaplaan.
Poolte allkirjad:
Tellija: Teenuse saaja: Töövõtja:
(allkirjastatud digitaalselt) (allkirjastatud digitaalselt) (allkirjastatud digitaalselt)
Raamlepingu 1.8-2/351-1 alusel sõlmitud hankeleping 3-9/1959-1
Lisa 3 ajaplaan
Töö Tegevus Tähtaeg
Analüüs ja projekteerimine 27.09.2019
Tellija test 31.10.2019
Reliis 14.11.2019