Interface IScraperSessionAccountInformation

Namespace
Subsembly.Scraper
Assembly
Subsembly.Scraper.dll

This interface shall be implemented by scrapers that support account information.

public interface IScraperSessionAccountInformation

Remarks

The methods in this interface may only be invoked after a successful Login(JsonObject).

A scraper that implements this interface shall advertise it through the ImplementsStatement flag, and optionally the ImplementsBalance flag.

Properties

MaxStatementDays

Provides the max number of history days for which statement data can be downloaded via DownloadStatement(out SepaDocument, JsonObject, DateTime).

int MaxStatementDays { get; }

Property Value

int

Remarks

By default the PSD2 RTS default value 90 should be assumed.

Methods

ContinueDownloadStatement(out SepaDocument, JsonObject)

ScraperResult ContinueDownloadStatement(out SepaDocument aCamtDoc, JsonObject jsAuthCredentials)

Parameters

aCamtDoc SepaDocument

A complete and valid ISO 20022 CAMT document. Depending on the scraper implementation and data available, this may be either a CAMT.052 account report, or a CAMT.053 account statement. Usually this is a matter of whether the account service provides a closing balance, or not. May return null on error, or if no statement data is available for the requested date range.

jsAuthCredentials JsonObject

Authentication credentials that have been requested for the previous DownloadStatement(out SepaDocument, JsonObject, DateTime). It may contain:

ChallengeResponseThe authentication code (TAN number or similar).

Returns

ScraperResult

DownloadBalances(out SepaBalance[], JsonObject)

Downloads and returns all available balances.

ScraperResult DownloadBalances(out SepaBalance[] vaBalances, JsonObject jsAcct)

Parameters

vaBalances SepaBalance[]

Array of balances with different SepaBalanceType type. If the ScraperResult indicates success, then at least one balance must be returned in this array. On failure, a null reference shall be returned.

jsAcct JsonObject

Returns

ScraperResult

Remarks

All implementations must return at least either an Expected balance (XPCD), or a ClosingBooked balance (CLBD). They may return both or even more balances. Additional permitted balance types are ClosingAvailable balance (CLAV) and ForwardAvailable balance (FWAV).

If a line of credit is available, then it should be included in the CreditLineAmount property of all returned balances.

DownloadStatement(out SepaDocument, JsonObject, DateTime)

Download statement entries for the requested time period.

ScraperResult DownloadStatement(out SepaDocument aCamtDoc, JsonObject jsAcct, DateTime tFromDate)

Parameters

aCamtDoc SepaDocument

A complete and valid ISO 20022 CAMT document. Depending on the scraper implementation and data available, this may be either a CAMT.052 account report, or a CAMT.053 account statement. Usually this is a matter of whether the account service provides a closing balance, or not. May return null on error, or if no statement data is available for the requested date range or additional authentication is needed.

jsAcct JsonObject
tFromDate DateTime

The booking date from which statement entries shall be returned. If this is DateTime.MinValue, then all available statement entries are returned.

Returns

ScraperResult

Remarks

If the statement data was downloaded successfully, then a ScraperResult with Success will be returned. If the service needs an additional authentication code, then ChallengeResponseNeeded is returned. If so, the client shall obtain the authentication code from the given challenge and call ContinueDownloadStatement(out SepaDocument, JsonObject), including the authentication code in the `ChallengeResponse`.