Transactions

The transactions flow can be used to acquire a list of transactions of a specific account of the consumer.

Request

POST /xs2a/v1/consents/{consent-id}/transactions/get HTTP/1.1
Content-Type: application/json; charset=utf-8
Authorization: Bearer <Token>
Host: <Host>
{
    "consent_token": string,
    "account_id": string,
    "from_date": string,
    "to_date": string,
    "psu": ?{
        "user_agent": string,
        "ip_address": string
    }
}

consent_token String, required

The consent_token can be obtained as described here.

account_id String, required

The account identifier provided in the result from an accounts request (from either the XS2A API or the Consent API) has to be passed in the payload of the request. A transactions flow is only possible for account type DEFAULT.

from_date Date (String: "YYYY-MM-DD"), required

The from_date property (in combination with the to_date property) is used to determine the start date of the transactions search range. It has to be provided in the YYYY-MM-DD format according to ISO 8601.

to_date Date (String: "YYYY-MM-DD"), required

The to_date property (in combination with the from_date property) is used to determine the end date of the transactions search range. It has to be provided in the YYYY-MM-DD format according to ISO 8601.

psu Object, optional

The psu object is optional, however, if the consumer is present, it is recommended to provide it. Some banks soften their daily consent usage restrictions if the PSU data is available.

psu.user_agent String, required

The user_agent property holds the user agent string of the consumer's client application, e.g. the web browser.

psu.ip_address String, required

The ip_address property holds the IP address of the consumer. Both IPv4 and IPv6 are accepted formats.

Response

{
    "data": {
        "result": ?{
            "transactions": Array<Transaction>,
            "from_date": string,
            "to_date": string
        },
        "consent_token": string
    }
}

data.result.transactions Transaction[], always present

An array that contains the extracted transactions.

data.result.from_date Date (String: "YYYY-MM-DD"), always present

The start date of the timeframe for which the transactions were extracted. It is provided in the YYYY-MM-DD format according to ISO 8601.

data.result.to_date Date (String: "YYYY-MM-DD"), always present

The end date of the timeframe for which the transactions were extracted. It is provided in the YYYY-MM-DD format according to ISO 8601.

data.consent_token String, always present

The response contains a new consent_token that has to be used in the following request.

NOTE: The returned information can differ depending on the selected bank, as some banks provide more information than others.

Example

Request

POST /xs2a/v1/consents/gp4cb0g6d9r3qf4d68fkrlb7ejo8mqqk/transactions/get

{
    "consent_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6IjEyMzQ1Njc4OTAifQ.na71ipK8ASvggoM6C5vMjBKgJlZLxV-m6ElgHBrNtlU",
    "account_id": "fdff8f6f-d923-4489-90b3-43d11c021e1b",
    "from_date": "2018-10-05",
    "to_date": "2018-10-25",
    "psu": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36",
        "ip_address": "192.168.2.1"
    }
}

Response

200 OK

{
    "data": {
        "result": {
            "transactions": [
                {
                    "reference": "Flight 123",
                    "amount": {
                        "amount": 12345,
                        "currency": "EUR"
                    },
                    "counter_party": {
                        "id": "123e4567-e89b-12d3-a456-426655440000",
                        "alias": "Girokonto",
                        "account_number": "123456789",
                        "iban": "DE44500105175407324931",
                        "holder_name": "Max Mustermann",
                        "holder_address": {
                            "street_address": "Konrad-Adenauer-Straße 21",
                            "street_address2": "Backside of the House, Floor 2",
                            "postalcode": "35440",
                            "city": "Linden",
                            "region": "Hesse",
                            "country": "DE"
                        },
                        "bank_code": "51091700",
                        "bic": "VRBUDE51XXX",
                        "bank_name": "VR Bank Untertaunus eG",
                        "bank_address": {
                            "street_address": "Konrad-Adenauer-Straße 21",
                            "street_address2": "Backside of the House, Floor 2",
                            "postalcode": "35440",
                            "city": "Linden",
                            "region": "Hesse",
                            "country": "DE"
                        },
                        "transfer_type": "NONE",
                        "account_type": "DEFAULT"
                    },
                    "date": "2018-10-23",
                    "state": "PROCESSED",
                    "type": "DEBIT",
                    "method": "TRANSFER"
                }
            ],
            "from_date": "2018-10-05",
            "to_date": "2018-10-25"
        },
        "consent_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbiI6Ijg4OTk3Nzg4In0.QQscn9a6-nQXuVK4Rwbft_LFMF3-r2xzWROEZMS2lW0"
    }
}

results matching ""

    No results matching ""