openapi: 3.0.0
servers:
  - description: XS2A API
    url: 'https://api.xs2a.com/v1'
info:
  description: >-
    # Introduction

    XS2A offers easy to use and easy to integrate client and server-side 
    APIs based on our XS2A platform.

    The API provides an interface for connecting and extracting online banking account 
    information to meet your individual business requirements. We like to call it the 
    "access to the account" concept.

    This is the Swagger Documentation for the XS2A API. More Info at 

    [https://tink.com/de/fts](https://tink.com/de/fts).

    ## SDKs

    We have released a range of client- and serverside SDKs for easy consumption of this API.
    You can find those on our [Github](https://github.com/fintecsystems).

    ## JSON Request Bodies
    
    Please make sure to include the HTTP header Content-Type `application/json` with 
    your JSON body, if you decide to use JSON for your POST data instead of URL encoded data.

    ## Transaction Data Policy

    Please note that to comply with our privacy policy we only keep transaction data for 
    30 days. The transaction data will not be available after this period.

    ## Pagination

    Most calls which return a list-like data structure allow pagination:

      ```js
    {
        "total": 15,
        "per_page": 15,
        "current_page": 1,
        "last_page": 8,
        "from": 1,
        "to": 15,
        "data": [
            // ... user data ...
        ]
    }
      ```

    Explanation of response fields are as follows.

      | Parameter                | Type    | Description                                      |
      |--------------------------|---------|--------------------------------------------------|
      | total                    | integer | Total number of results.                         |
      | per_page                 | integer | Number of objects per page.                      |
      | current_page             | integer | Current page                                     |
      | last_page                | integer | Last page, usually the total of available pages. |
      | from                     | integer | Showing results from index element.              |
      | to                       | integer | Showing results from index element.              |
      | data                     | array   | An array of user data with the actual results.   |

    ### API Compatibility

    We consider the following changes as 'non-breaking' changes to the API.
    
    - Adding a field to an object

    - Introducing a new API endpoint that did not exist before

    - Adding a search parameter


    However we consider these examples as 'breaking' changes.


    - Changing the datatype of a field

    - Removing a field from an object

    - Changing the semantics of an existing field

    - Changing URLs


    We consider the HTML that is generated by our xs2a.js and possibly styled by your own 
    application as a form of API, and also try to limit changes to the structure and semantics 
    of the generated markup, however we might add certain markup in the future which is the 
    reason why you have to include the xs2a_base.css file in your HTML.

    # Authentication

    You can create and manage API keys from your account. Multiple API keys can be 
    active at the same time. 
    Endpoints are only available via HTTPS. Plain HTTP requests will not be processed.

    In general, all authentication is done via `http basic`:
      - Username: `api`
      - Password: `Your_API_Key`

    You can find `Your_API_Key` here:
    [https://manage.xs2a.com/configure/apikeys](https://manage.xs2a.com/configure/apikeys).

    Please be aware of the different modes for API keys. An API key in mode `Test` is 
    not allowed to access `Live` transactions. `Live` API keys are not able to access data 
    made from test transactions.
    <!-- ReDoc-Inject: <security-definitions> -->
  version: ''
  title: XS2A API
  contact:
    email: support@tink-germany.com
  x-logo:
    url: './img/FTS_Logo_2018_Claim.svg'
tags:
  - name: Bankcodes API
    description: >-
      XS2A might not support every bank. To help you decide whether or not 
      you should offer a XS2A product to a customer, you can call this API 
      endpoint to determine whether or not XS2A supports the bank code of 
      the customer.
      If you are unsure whether the customer has entered a BIC or a bank code,
      use the `q` parameter as described in the parameters.
  - name: Embeddable Risk Checks
    description: >-

      In the following sections, the available risk-checks for xs2a.risk are 
      documented. 
      
      ### How do I use a risk check?
      
      You can use them individually or in combination by embedding them inside 
      a xs2a.risk object as described in the [request body](#tag/XS2A.risk/paths/~1risks/post)
      of the xs2a.risk object.

      ### How do I get the results of a risk check?

      After the customer has finished the wizard process, you can `GET` the results 
      at the [risks endpoint](#tag/XS2A.risk/paths/~1risks~1{transaction-id}/get), they will be
      in the response body. 
      

      **Please Note**: The risk check 'xs2a_account_snapshot'
      will not be shown with its full results there, as they
      can get very large. The detailed results for it can be retrieved at its respective
      endpoints [account snapshot download](#tag/XS2A.risk/paths/~1risks~1{transaction-id}~1accountSnapshot/get).


      ## xs2a.account_snapshot

      A XS2A.account_snapshot is more an additional option than a whole check. 
      A XS2A.account_snapshot offers direct access to the raw account data. 
      The account data reflects the information at the time of the transaction.

      If you use XS2A.risk for example for a loan application process, 
      you can use the account snapshot to complete your files of the customer.

      A typical workflow for a XS2A.risk check with a XS2A.account_snapshot 
      option enabled works as follows.

      1. Create a XS2A.risk session with enabled XS2A.account_snapshot

      2. Initialize and the Wizard, customer completes the login with the bank

      3. The XS2A application prepares the account statement (snapshot).

      4. Using an API call you can retrieve/download the created account statement.


      The range of the returned turnovers in the the account snapshot can be either 
      constrained by a number of days, starting from the current date or optionally 
      by explicitly stating a `from` and `to` parameter. Notice however, that the complete 
      account snapshot will be restricted to the given date range. That also means 
      that the account balance will be from the last day of the given date range.


      For the full list of filters visit the [test call page](https://manage.xs2a.com/integration/test) 
      and select "XS2A.risk" from the product dropdown and click the checkbox at
      "XS2A.account_snapshot". You will be presented with a full list of filters.


      If you want all turnovers with all available filter without specifying any 
      filters in the first place you may supply the `all_tags` parameter. Keep in mind 
      however that the filter rules we apply internally may change a lot. To keep your 
      set of filters, and therefore your API, from unexpected changes it is advisable 
      to provide a full list of filters when creating the session.

      #### Download the Account Snapshot Result

      The account statement can be downloaded via a GET call to the following URL


      ```
      GET https://api.xs2a.com/v1/risks/<transaction-id>/accountSnapshot?format=pdf
      ```


      The format parameter is optional. The account snapshot is available in the following 
      formats: `pdf`, `csv`, `json` and `json2`. This call defaults to `pdf` if the format parameter 
      is omitted. Please note that you have to use `json2` as format if the `all_accounts`
      parameter was set to `true`.

      ## xs2a.balance_check

      The XS2A.balance_check allows the check of the account coverage against a given amount.


      This check verifies all available accounts of the user with the used login data. The result shows the following attributes for each available accounts:

      - Account holder

      - Name: Giro, Credit, save etc.

      - IBAN

      - BIC

      ## xs2a.balance_overview

      XS2A.balance_overview returns the current running total of the chosen account.

      An XS2A.balance_overview has no additional parameters. Just append an empty object to 
      the XS2A.risk object to indicate you would like this check to be performed.

      ## xs2a.cashflow_overview

      XS2A.cashflow_overview provides an cashflow overview for the requested risk date range.

      An XS2A.cashflow_overview has no additional parameters. Just append an empty object to 
      the XS2A.risk object to indicate you would like this check to be performed.

      ## xs2a.chargeback_check

      XS2A.chargeback_check returns the number of detected chargeback transactions for the account.

      An XS2A.chargeback_check has no additional parameters. Just append an empty object to the XS2A.risk 
      object to indicate you would like this check to be performed.

      ## xs2a.children_check

      The XS2A.children_check gathers payments from governmental facilities, which indicate how many children the account has.


      This check, as its name suggests, checks if the account holder has children.
      Especially for insurances is this check important. Based to some indicator like
      child benefits payment , child education payments (pre school, kindergarten etc)
      the amount of children in a household will be detected and displayed here in this check.

      This risk-check has no configuration.
      
      ## xs2a.insurance_contract_check
      
      The XS2A.insurance_contract_check provides an overview of the users existing insurance contracts and provides important informations (e.g. insurance policy number) about the users insurance situation.

      ## xs2a.profit_loss_check

      The P&L check (profit and loss check) provides a simplified P&L statement for B2B customers as well as an overview of other relevant
      operational KPIs. These can be, for example, other relevant income, expenses and cash flows from the account. In addition,
      the tax number is also shown (initially, however, only in Germany).

      ## xs2a.income_check

      The Income Check provides an overview of the account holder's various types of income.
      Each type of income is listed separately and the corresponding key figures are calculated so that the customer can only take into account the types of income that are relevant for him/her.


      ## xs2a.account_linked_offers_check

      The Account Linked Offers Check validates with the consent of the user, based on an account view, whether third party offers might be of
      interest to the user and hands over an advertising link for one-time use to a Tink Germany business partner.
      With the consent of the user (a consent check box will be included during the wizard session flow), a one-time use advertising link with third party offers might be of interest to the user will be hand over to user, based on an account view.


      ## xs2a.credit_check

      The XS2A.credit_check gathers various information about a customer. The check was designed 
      for example to be used in a loan application process without the need to resort to some other 
      medium. Currently information on all available tags are available. For further
      information see our [tag documentation](https://manage.xs2a.com/documentation/tags).

      ## xs2a.direct_debit_check

      The XS2A.direct_debit_check uses various metrics to determine the best date to execute a direct 
      debit to minimize the risk of a default due to a lack of account coverage.

      ## xs2a.name_check

      The XS2A.name_check compares a given name and firstname with the extracted account holder.


      A provided name will be concatenated with the account holder name, which we get from the bank in order to see if the user is also the account holder. If the names are not equal, then result gets the value “not successful“ otherwise successful.


      The name (firstname and name) does not need to match 100%. If a name matches at least 75 % than the name_check will be successful.


      Example from Testbank: name: Musermann firstname: Hartmut.

      - Case 1
        - You enter for name Mustermann and for Firstname: Bianca. Here the check has 50% match and the name_check is not successful.
      - Case 2
        - You enter for name Mustermann and for Firstname: Hart (almost match to Hartmut) so the whole check has 80% match and the name_check is successful.
      - Case 3
        - You enter for name Mustermann and for Firstname: Har (the match is not so big) so the whole check has 70% and the name_check is not successful.

      ## xs2a.overdraft_limit_check

      XS2A.overdraft_limit_check returns the number of booking days of the given risk range. 
      The number of days the account used the overdraft limit, the maximum amount of overdraft 
      used, the average and the median used overdraft.

      An XS2A.overdraft_limit_check has no additional parameters. Just append an empty object to 
      the XS2A.risk object to indicate you would like this check to be performed.


      ## xs2a.seizure_check

      XS2A.seizure_check allows you to check for a seizure account. In addition the request can be
      filtered over a period in days.

      ## xs2a.standing_orders_check

      XS2A.standing_orders_check allows you to retrieve all standing orders from an account. 
      An XS2A.standing_orders_check has no additional parameters. Simply append an empty object to 
      the XS2A.risk object to indicate you would like this check to be performed.

      The standing_orders-property contains the list of all standing orders objects.


      This check shows


      - the amount of standing orders

      - The detailed informations for each standing order like sender and recipient account data, purpose, amount of payment, frequency (m=month), execution start etc.


      Considering time: considers also the date of the session/created date.

      ## xs2a_all_accounts_check

      XS2A.all_accounts_check is like the XS2a.account_snapshot more of an 
      additional option than an individual check. If this option is selected, 
      all visible accounts are extracted and reported back.

      An XS2A.all_all_accounts_check has no additional parameters. 
      Just append an empty object to the XS2A.risk object to indicate you want 
      this check to be performed.


      This check verifies all available accounts of the user with the used login data. The result shows the following attributes for each available accounts:


      - Account holder

      - Name: Giro, Credit, save etc.

      - IBAN

      - BIC

      ## xs2a_account_status_check

      With XS2A.xs2a_account_status_check a list of accounts within the bank connection can be requested.
      Basically you have to decide if the account status data for the reference account or all accounts
      within the bank account should be collected. In addition the request can be filtered over a period
      in days. As result you get data about account or accountholder identification, current account balance,
      turnovers and the quality of the turnovers.

      ### Possible input:

      The XS2A.xs2a_account_status_check need a limit of turnover days, which will
      be used in this check. And it is possible to choose between all accounts, or
      only one specific account, which will be used.

      ## xs2a_holder_identification_check

      Using the XS2A.holder_identification_check,  a list of names can
      be checked against the name of the accountholder of all accounts in the
      bank connection. For the request only the first name and last name must
      be transferred. As result you get the information if there is a match per
      account and given name and lastname.
      Possible Match results see below.

      - **NONE**: No match was found

      - **PERSON**: If the expected_person can be identified with name and lastname

      - **COMPANY**: If the expected_person or accountholder is a company, containing lastname

      - **LAST_NAME**: If the lastname can be found in accountholder and is not a company

      - **STRICT_MATCH**: If the name to be checked occurs 1-to-1 in the account_holder – i.e., without spelling errors.

      ## xs2a_risk_calculations_check

      XS2A.risk_calculations_check allows you to get many functions with consideration of the
      chosen tags or/and categories. You can name the functions as you want.
      Choose the period of time and see the results.


      For example, you can select here among the following count functions: count existing month, count of filled month, count of every month

      - count shows the total frequency of the selected category/tag for the selected period of time.

      - count of existing month shows the amount of months within the selected period of time. It doesn’t matter if a month contains a turnover of the selected category or not.

      - count of the filled month shows the number of the month with at least one turnover of the selected category/tag. So that the amount of  count of the filled month <= count of existing month.

      - counts of every month shows the frequency of the selected category/tag as a table with two column (month and frequency) for each month within the selected period of time


      Based on the selected category/tag and the specified time period for each month the turnover amount will be summed.


      - Minimum of all month sums: Shows the min sum

      - Maximum of all month sums: shows the max sum


      Turnover must have tags AND categories:


      - The turnover will be filtered and only these will be selected/shown which has the selected TAG and selected categories. If there are more categories selected, only the turnover which have also the selected TAG, will be shown.

      ## xs2a_account_characteristics_check

      XS2A.account_characteristics_check allows you to retrieve a number of infos
      about the account, like chargebacks, encashment, loans and other. Simply
      append an empty object to the XS2A.risk object to indicate you would like
      this check to be performed.


      The goal of this check is to reduce the risk of non-payment. So in this check the customers account will be analysed for characteristics which could be an indicator for non-payment.


      It shows different characteristics from the user account displayed by categories (e.g. chargebacks, loans, gambling, club, etc.). These characteristics are summarised by showing the count of transactions per category and the sum of each transaction amount.


      The table below shows the different categories and the characteristics which are analysed in this check:

      - **Account movements**: Number of cash payments, Number of cash deposits, GEZ, Schufa, Donation, Party, Club

      - **Chargebacks**: Number coverage chargebacks, Total coverage chargebacks, Number revoke chargebacks, Total revoke chargebacks

      - **Loans**: Number of credits, Total loan amount, Number of lenders

      - **Debt collection**: Number of bookings, Total bookings, Number of owners

      - **Flags**: Gambling, Credit card, Newspaper, Entertainment

      ## xs2a_age_verification_check

      The XS2A.age_verification_check  verifies the legal age of the account holder.


      Based on certain criteria, this check verifies whether the user can be confirmed as of majority age (above 18). If yes, the attribute “Age verification on the basis of account check“ is set to yes.


      The age verification option is available in xs2a.risk and in xs2a.pay Apis. In xs2a.pay if the age verification check can’t be confirmed, then the transaction will be aborted and the payment can’t be executed.
      
      ## xs2a.collection_check

      The XS2A.collection_check is used to check whether the current open amount is available on the account and payment should be initiated. If this is not the case, then an individual installment payment is calculated and proposed. This information is supported by further relevant indicators.

      ## xs2a.fact_sheet_lists

      A XS2A.fact_sheet_lists allows you to create a lists of filtered transaction data from the reference account.
      The request can be filtered using the appropriate filters based on a set number of days,
      categories and/or tags, min. and/or max. amount.

      #### Download the JSON List, with all included turnovers and distinct counter holders

      The json lists can be downloaded via a GET call to the following URL


      ```
      GET https://api.xs2a.com/v1/risks/<transaction-id>/jsonlists
      ```

  - name: XS2A.risk.fullpdf
    description: >-
      XS2A.risk.fullpdf is a wonderful way to show you all the checks in one pdf.


      **Please Note**: Only the risk-cheks will be shown in this pdf, which were selected in the transaction (WizardSession). So if `xs2a_account_snapshot` and `xs2a_name_check` has been selected, only this information of this checks, can be found in the fullpdf.

      ### Download All selected checks as pdf

      ```
      GET https://api.xs2a.com/v1/risks/<transaction-id>/fullpdf
      ```
  - name: XS2A.risk.export
    description: >-
      XS2A.risk.export is a wonderful way to show you all the checks in one pdf or html.


      **Please Note**: Only the risk-cheks will be shown in this pdf, which were selected in the transaction (WizardSession). So if `xs2a_account_snapshot` and `xs2a_name_check` has been selected, only this information of this checks, can be found in the pdf or html.

      ### Download All selected checks as pdf

      ```
      GET https://api.xs2a.com/v1/risks/<transaction-id>/export?format=pdf&locale=de
      ```

      ### Download All selected checks as html

      ```
      GET https://api.xs2a.com/v1/risks/<transaction-id>/export?format=html&locale=de
      ```


      **Locale can be de or en**

  - name: XS2A.risk
    description: >-
      XS2A.risk allows you to collect and validate a bank connection. Additionally
      a range of predefined checks can be applied using the retrieved account
      information. For more information about the predefined checks see the
      [Embeddable Risk Checks section](#tag/Embeddable-Risk-Checks).
  - name: Additional Settings
    description: >-

      We have different additional settings for our clients to customize the experience and to deliver the best solution.
      If you want to know more about one of the following options feel free to reach out to your customer success manager.
      They can give you more information and guidance on these features and activate them for you.
  - name: XS2A.pay
    description: >-
      XS2A.pay is a payment solution. The customer uses his online banking
      credentials. Optional security checks will be executed to counter fraud
      and other suspicious activity. After that, the transfer of a fixed amount
      and purpose will be sent to a predefined recipient account. The customer
      authorizes the transaction with a TAN, after which the bank is executing
      the transfer. In case the sender country is Switzerland (`CH`), the fields
      `recipient_street`, `recipient_zip`, `recipient_city` and `recipient_country_id`
      are required.
  - name: XS2A.api General Information
    description: >-
      The XS2A.api is a set of APIs that make it possible to manage a users bank 
      accounts in an asynchronous way. This makes the suitable for use in for example
      PFM tools. The API authentication is slightly different from the rest of the 
      APIs, which makes it possible to deploy the API client including the API keys 
      directly to mobile devices.

      ### Structure
      
      The entities that can be managed using the XS2A.api are as follows.

      ![XS2A.api Diagram](img/xs2a_api_objects.png)

        | Entity                 | Description                                                                                                        |
        |------------------------|--------------------------------------------------------------------------------------------------------------------|
        | bank_user              | A person with one or more bank logins.                                                                             |
        | bank_user_access_token | Access tokens that belong to a specific user, to access the rest of the API on behalf of that user.                |
        | bank_connection        | A login to a specific bank. The bank login consists of a bank code and a bank name and a synchronisation method.   |
        | bank_account           | `bank_account_balance` and `bank_account_turnovers` - The bank accounts and the bank account contents of the user. |


      ### Basic Flow and Authentication

      The authentication to the API is divided into two parts. The first part 
      or the API is accessed via the standard authentication as described in the 
      [authentication chapter](#section/Authentication). This part of the API can be used to create bank users 
      and manage access tokens. These access tokens enable to access the rest of the 
      API of behalf of a user.

      So the basic flow of this API is as follows.

      1. Create a bank user using the global API key.

      2. Create an access token for that bank user, to be able to access the API on behalf of the user. Use the new access token from here on instead of the global API key. (for more see the notice below)

      3. Create a bank connection for the user.

      4. Display a wizard for that bank connection for the user.

      5. The user completes the wizard, by entering her bank login credentials.

      6. Retrieve the account contents like balance and transactions.


      ### Using an Access Token

      To use the access token and access the rest of the API on behalf of the user, simply replace the global API key with the generated access token. 
      That means, still use Basic-Authentication with `api` as the username and the newly generated access token as the password.

      Subsequent API calls with then be done on behalf of the user, that owns the access token.

  - name: XS2A.api.users
    description: >-
      Allows to create and delete bank users. A bank user is basically a person that has one or more 
      logins to an online banking portal (a bank connection). In XS2A.api, a bank 
      user is mainly an entity which is used to aggregate bank account 
      information on, therefore it does not have many attributes.
  - name: XS2A.api.connections
    description: >-
      A bank connection represents a login to a specific bank. The creation of a bank connection always 
      requires user interaction. The user has to select the bank he/her wants to connect and provide the 
      login credentials to that bank. This process in done in our wizard, that guides the end user 
      through the process.


      The creation of a bank connection always requires user interaction. Therefore the bank connection can not be created immediately.
      Instead this call will return a `wizard_session_key` that must be used to start a wizard.


      A wizard is used to guide the user through the login process to her bank. The login process is modeled as close to the real
      bank login process as possible. A wizard is therefore basically a set of forms that has to be displayed to the user.


      The wizard can either be a Javascript widget, that can be embedded on a website or within a mobile app via webviews, or a pure API solution, 
      that does not require Javascript, but is a little harder to implement.


      For the Javascript wizard integration, please refer to the [chapter on client integration](#tag/Javascript). For the pure API solution, please 
      refer to the [chapter on the Wizard-API](#tag/Wizard-API).

      ### Syncing

      Bank connections can be synced. Syncing a bank connection means that the login to the bank is repeated, 
      the new balance and the new list of turnovers is fetched and the list of accounts associated to the bank 
      user is updated accordingly. Syncing a bank connection can be done in three different `sync_mode`.


        | sync_mode | Description                                                                                                                                                                                                                                                                                                                                                                                                         |
        |-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
        | `full`      | If a bank connections sync_mode is set to full, the bank credentials are stored in XS2A and the connection will be synced automatically once a day.                                                                                                                                                                                                                                                                  |
        | `shared`    | If `sync_mode` is set to `shared`, XS2A will collect the credentials, encrypt them, cut the cipher in half and make one half of the credentials available at the end of the session. This way neither XS2A, nor the client has access to the full set of credentials. The sync of a bank connection has then to be done via API, providing the other half of the credential cipher as an argument to the sync call. |
        | `none`      | The connection will not be synced automatically. Every time a sync is initiated via the API, the user has to provide her bank credentials via the wizard.                                                                                                                                                                                                                                                           |

      **If the sync is a initial sync:**

      1. If `days` and `limit_days` is 0 or null, 60 days are synced.

      2. If `days` or `limit_days` is set and greater than 0, the set value is synced.

      3. If `days` and `limit_days` are set and greater than 0, the smaller value is synced.

      **If its a normal sync:**

      1. If `last_synced` and `limit_days` are set and greater than 0,

         a. if `last_synced` + 5 days is greater than `limit_days`, the `limit_days` is synced.

         b. if `last_synced` + 5 days is smaller than `limit_days`, the `last_synced` + 5 days are synced.

      2. If `last_synced` is set and `limit_days` is not set, the `last_synced` + 5 days are synced.

      3. If `last_synced` and `limit_days` are not set, 60 days are synced.

      4. If `last_synced` is not set and `limit_days` is set and greater than 0,

         a. if `limit_days` is greater than 60, the `limit_days` is synced.

         b. if `limit_days` is smaller than 60, 60 days are synced.


      In the normal sync the `limit_days` value is the value from the initial sync.


      **Note**: Every event that occurs when synchronizing bank connections is sent out to a webhook URL. See the [Bank Connection Events Section](#tag/XS2A.api-Bank-Connection-Events) for more details.

      ### Error Handling

      Any bank connections that are in sync_mode `full` are synced automatically by XS2A. No further steps are needed, the 
      turnovers and balance information on the accounts will always be up to date. If a sync process fails for some reason, 
      for example if the user has changed the password, the automatic sync will stop. The field `sync_message` will contain more 
      information about the error. The field `sync_fail_counter` will have the number of subsequent failures. The parameter `sync_active` will 
      be set to false an the connection will not be synced again.

      However, in the case described above, the sync can be forced via the API. See also [syncing a bank connection](#tag/XS2A.api.connections/paths/~1api~1connections~1{connection-id}~1sync/post) for details. 
      After 2 failures in a row, the bank connection will be disabled and can not be synced again. It will have to be deleted and recreated.
      The user will have to re-enter his credentials via the wizard.
  - name: XS2A.api Bank Connection Events
    description: >-
      Every event that occurs when synchronizing bank connections is sent out to a webhook URL, that can be configured in the [customer cockpit](https://manage.xs2a.com/).
      The following events will be automatically sent to the webhook URLs as they occur.


      - `bank_accounts.new_bank_account` - If a new bank account pops up during syncing that is not yet present in the list of account.

      - `bank_accounts.new_turnovers` - If a bank account has gained some new turnovers.

      - `bank_accounts.sync_failed` - If a bank connection automatic sync failed for some reason.

      - `bank_accounts.sync_finished` - If a bank connection automatic sync finished successfully.

      - `bank_accounts.detached_bank_account` - If a bank account is detached from bank connection.

      - `bank_connection.sync_expires` - If a PSD2 consent will expire within the next 8 days.

      - `bank_connection.disabled` - If a bank connection has been disabled.


      The URLs will be called using the POST method. Unless a successful response code of 200 is seen the URL will be called again up to 
      30 times in growing time frames. The events are accompanied by a payload that contains information a about what changed.

      ### Payload for `bank_accounts.new_bank_account` and `bank_accounts.new_turnovers`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_accounts.new_turnovers",
          "message": "User has new turnovers on a bank account",
          "data": {
              "bank_user_id": "bus_UcupnDXT1p6WSpWI",
              "bank_account_id": "bac_1aQL65xB8ASjvbiJ"
          },
          "testmode": "0",
          "created_at": "2017-12-28 13:44:34",
          "object": "xs2a_event"
      }

      ```

      ### Payload for `bank_accounts.sync_failed`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_accounts.sync_failed",
          "message": "Bank connection synchronization failed.",
          "data": {
              "id": "bcn_A0bkAL1h1POZNKMr",
              "bank_user_id": "bus_UcupnDXT1p6WSpWI",
              "bic": "TESTDE88XXX",
              "bank_name": "Testbank",
              "country_id": "DE",
              "sync_mode": "full",
              "sync_active": false,
              "sync_message": " Der Login zu Ihrer Bank ist fehlgeschlagen.",
              "sync_fail_counter": 2,
              "last_synced": "2017-12-27T14:57:59Z",
              "testmode": false,
              "created_at": "2017-12-27T14:57:59Z",
              "object": "bank_connection"
          },
          "testmode": "0",
          "created_at": "2017-12-28 13:44:34",
          "object": "xs2a_event"
      }

      ```

      ### Payload for `bank_accounts.sync_finished`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_accounts.sync_finished",
          "message": "Bank connection synchronization finished.",
          "data": {
              "id": "bcn_A0bkAL1h1POZNKMr",
              "bank_user_id": "bus_edcfrebnhgztud",
              "bic": "TESTDE88XXX",
              "bank_name": "Testbank",
              "country_id": "DE",
              "sync_mode": "full",
              "sync_active": true,
              "sync_message": " Die Synchronisation wurde erfolgreich abgeschlossen.",
              "sync_fail_counter": 0,
              "last_synced": "2017-12-28T14:57:59Z",
              "testmode": false,
              "created_at": "2017-12-28T14:57:59Z",
              "object": "bank_connection"
          },
          "testmode": "0",
          "created_at": "2017-12-28 13:44:34",
          "object": "xs2a_event"
      }

      ```

      ### Payload for `bank_accounts.detached_bank_account`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_accounts.sync_detached",
          "message": "Bank connection synchronization detached.",
          "data": {
              "bank_connection_id": "bcn_I07SbPeysQkQV5yq",
              "bank_account_id": "DE62888888880012345678",
              "bank_user_id": "usr_3mvhflqpe95mdjb0",
          },
          "testmode": "0",
          "created_at": "2017-12-28 13:44:34",
          "object": "xs2a_event"
      }

      ```

      ### Payload for `bank_connection.sync_expires`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_connection.sync_expires",
          "message": "PSD2 Consent expires at 2020-09-05",
          "data": {
              "id": "bcn_A0bkAL1h1POZNKMr",
              "bank_user_id": "bus_edcfrebnhgztud",
              "transaction": null,
              "bic": "TESTDE88XXX",
              "bank_name": "Testbank",
              "country_id": "DE",
              "sync_mode": "full",
              "sync_active": true,
              "sync_message": "",
              "sync_fail_counter": 0,
              "last_synced": "2020-08-27 09:32:10",
              "testmode": false,
              "metadata": null,
              "created_at": "2020-06-09 16:05:45",
              "object": "bank_connection"
          },
          "testmode": "0",
          "created_at": "2020-09-06 00:00:04",
          "object": "xs2a_event"
      }

      ```

      ### Payload for `bank_connection.disabled`:


      ```json

      {
          "id": "ev_vJnkqIQ8f3AMszf2",
          "transaction": null,
          "type": "bank_connection.disabled",
          "message": "Bank connection is disabled.",
          "data": {
              "id": "bcn_A0bkAL1h1POZNKMr",
              "bank_user_id": "bus_edcfrebnhgztud",
              "transaction": null,
              "bic": "TESTDE88XXX",
              "bank_name": "Testbank",
              "country_id": "DE",
              "sync_mode": "full",
              "sync_active": false,
              "sync_message": "",
              "sync_fail_counter": 1,
              "last_synced": "2020-08-27 09:32:10",
              "testmode": false,
              "metadata": null,
              "created_at": "2020-06-09 16:05:45",
              "object": "bank_connection"
          },
          "testmode": "0",
          "created_at": "2020-09-06 00:00:04",
          "object": "xs2a_event"
      }

      ```
  - name: XS2A.api.accounts
    description: >-
      Allows to fetch the list of bank accounts for a user. This endpoint is
      accessed in the scope of a user with a user specific access token. Bank
      accounts are automatically read from bank connections.
  - name: Wizard API
    description: >-
      The Wizard API allows to avoid the usage of the Javascript library
      xs2a.js.

      The Wizard-API provides an API that is queried to guide the user through the bank login process.
      Whenever embedding the Javascript wizard on a page or an app is not option, the use of the Wizard-API should be considered.
      Estimated timeout time can be expected around 15 minutes without customer interaction.
      Whenever a user triggers an action such as TAN/login-data/bank selection, the timer is set back to zero.
  - name: Blacklist API
    description: >-
      The Blacklist API allows you to manage a personal blacklist of IBANs.
      After adding an iban to the blacklist, the customer won't be able to use
      it in the XS2A Wizard. **Note:** Keep track of the ID given when adding 
      and IBAN to the blacklist. Once you add an IBAN to the blacklist, 
      you will receive an ID. To later remove that IBAN from the blacklist or 
      retrieve details about it, you will need that ID again.
  - name: Whitelist API
    description: >-
      The Whitelist API allows you to manage a personal whitelist of IBANs.
      After adding an IBAN to the whitelist, the customer will be checked with different
      security settings.
      **Note:** Keep track of the ID to when adding an IBAN to the whitelist. You will need it later,
      if you want to remove IBANS.
  - name: Sessions API
    description: This will return a wizard_session object.
  - name: Events API
    description: >-
      An event is basically the API representation of a webhook. Every webhook
      you receive fires an event, that you can process further.
  - name: General Information
    description: >-
      XS2A offers the possibility of building entire product families based on our 
      "access to the account" concept. It is possible to seamlessly integrate XS2A functionality
      into your own software or processes. To achieve this flexibility, our API is composed of 
      two major components.


      - Client Integration

      - Server API Integration


      Client side integration aims towards seamlessly embedding the wizard into your web pages or mobile apps via webviews,
      or into your mobile apps using our mobile SDKs for [iOS](https://github.com/FinTecSystems/xs2a-ios),
      [Andriod](https://github.com/FinTecSystems/xs2a-android) or [React Native](https://github.com/FinTecSystems/xs2a-react-native).


      Direct integration using a Javascript library and a set of CSS themes:
      Both will be embedded directly into your web interface. The GUI elements are created with DOM-Operations 
      an allow easy styling via CSS.

      On the server side we offer a REST-API and webhooks for easy integration of your server components.

      The following describes the basic steps for a transaction:


      - Using the REST-API, your server initiates a new session with XS2A. In the response you will receive 
      a unique and once-only valid `wizard_session_key`.
      
      - Using this key you are now able to initiate the Wizard which is seamlessly embedded in your website. 
      The Wizard offers various interaction possibilities during the transaction.
      
      - While the customer is using the Wizard, you are able to customize and individualize the interaction 
      through various Javascript callbacks.
      
      - After the customer has finished the transaction and interaction with the Wizard, you will receive a 
      client Javascript callback and also a server side webhook will be executed. Your application will be 
      notified on both the client and server side that a transaction has finished.
  - name: Javascript
    description: >-
      You will have to embed our Javascript library into your website.

      The library can be embedded into the `<head>` section of your website. It has to be hotlinked
      directly from our XS2A server. This will ensure you will always use the latest build.


      ```html
        <script src="https://api.xs2a.com/xs2a.js"></script>
      ```

      To load the styling, you can call in your `<body>`:

      ```js
        xs2a.useBaseStyles();
      ```
      
      This will fetch our `xs2a_base.css` and will provide a base for any custom styles you might want to write.

      In case you run into CSP related issue or the like, hotlink the file directly in the `<head>` section of your page:

      ```html
        <!-- Optional, in case of issues with xs2a.useBaseStyles() -->
        <link rel="stylesheet" href="https://api.xs2a.com/xs2a_base.css">
      ```

      The `xs2a.js` will register the new global Javascript object `xs2a`. Use this global object to interact with
      XS2A forms. You will also have to include a container element into the `<body>` of your website.


      ```html
        <noscript>
          <h2>Your browser does not support Javascript.</h2>
          Please deactivate Javascript Blocker, AdBlocker etc. to use the service.
        </noscript>
        <div id="XS2A-Form" data-xs2a="<your-wizard-session-key-here>"></div>  
      ```


      The XS2A Wizard will be rendered within the container element. We strongly recommend to leave the id 
      attribute `XS2A-Form` unchanged. Our CSS rules depend on it. Please see also the CSS styleguide.


      If you do include our container element within a form-tag, pressing the enter key might accidentally 
      submit data to your server. There is also the possibility that wrongfully entered login information 
      will be prefilled by the browser.


      Please make sure, that the container element is *not* within a `<form>` tag or the like.


      Initialize xs2a.js by calling the `init()` method. The Javascript will then connect to our servers 
      and start the XS2A-Wizard inside of the container element.

      If you followed our instructions for including our Javascript file the global xs2a object will be available 
      after the `<script>` tag. The xs2a object implements the following methods:


      ## xs2a.configure()

      It is possible to set some configuration options, to alter the default behavior of the wizard.

      This method needs to be called before `init()`.

      ```js
        xs2a.configure({
          'validate-login-credentials': true,
          'autocomplete-suggestions': 5,
          'next-button-text': 'Next', // Deprecated
          'back-button-text': 'Back',
          'abort-button-text': 'Abort',
          'back-button-action': function() {
            console.log('back custom action');
          },
          'focus-onload': true,
          'validate-privacy-policy': true,
          'open-privacy-policy-in-tab': false,
          'logo-variation': 'standard',
          'logo-alignment': 'end',
          'logo-height': 60,
          'reuse-tab-on-redirect': false,
          'enable-password-visibility-toggle': false,
        });
      ```

        | Parameter                  | Description                                                                                                                                                | Default  |
        |----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
        | validate-login-credentials | A warning will be displayed, if the user enters a password which is 4 characters or less.                                                                  | true     |
        | autocomplete-suggestions   | Specify the number of maximum autocomplete suggestions for the BIC/bank name field.                                                                        | 5        |
        | back-button-text           | Customize the text for the "back" button.                                                                                                                  |          |
        | abort-button-text          | Customize the text for the "abort" button.                                                                                                                  |          |
        | back-button-action         | Here you can specify a function which gets called when the user presses the back button, often used in cases where a custom redirect is wanted.            |          |
        | focus-onload               | If set to false, the page where xs2a.js is implemented will not jump to the wizard form on load.                                                           | true     |
        | validate-privacy-policy    | A warning will be displayed, if the user do not accept the privacy policy.                                                                                 | true     |
        | open-privacy-policy-in-tab | Opens the privacy policy in a new tab instead of a modal.                                                                                                  | false    |
        | logo-variation             | Option to display different types of the "provided by Tink Germany" Logo. Options are `standard` (blue hud, gray text), `white` and `black`.              | standard |
        | logo-alignment             | Sets the alignment of the Tink Germany logo. Options are: `start`, `center` and `end`.                                                                    | end      |
        | logo-height                | Sets the height of the Tink Germany logo, the width is automatically set proportionally.                                                                  | 60       |
        | reuse-tab-on-redirect      | Configures the behavior in case a redirect to the banks page is needed. Set to true to *not* open a new tab. Set to true for mobile web view integrations. | false    |
        | enable-password-visibility-toggle | Enable a visibility toggle at the end of the password input to let user check the entered password. | false    |

      
      ## xs2a.init()

      `xs2a.init(HTMLElement, wizardSessionKey)`

      Both `HTMLElement` and `wizardSessionKey` are optional parameters.

      Initializes the XS2A object on the current page. It will look for an HTML element with a data-xs2a attribute (assuming no HTMLElement is passed), 
      like the following.


      ```html
        <noscript>
          <h2>Your browser does not support Javascript.</h2>
          Please deactivate Javascript Blocker, AdBlocker etc. to use the service.
        </noscript>
        <!-- wizard will be rendered into the following element: -->
        <div id="XS2A-Form" data-xs2a="<your-wizard-session-key-here>"></div>
      ```

      Alternatively, instead of defining an element like this in your DOM and let xs2a.js find it, you can specify a HTMLElement that xs2a.js should use
      to render itself into. Likewise, you can pass the wizard session key as a second parameter. In this case, xs2a.js will not look for an element in your DOM
      as described above, but will use the passed parameters.

      Example for passing both DOM element and session key:


      ```js
        // wizard will be rendered into #someElement with the given key
        xs2a.init(document.getElementById('someElement'), 'my_wizard_session_key');
      ```

      ## xs2a.finish(function())

      `xs2a.finish()`


      Is used to register a callback function which will be called after the transaction has finished.

      You must provide a `xs2a-finish()` callback, because after a finished transaction the customer needs to be 
      redirected, like in the following example.


      ```
        xs2a.finish(function(credentials) {
            window.location.href = 'http://<your-success-link>';
        });
      ```

      The shared credentials will only be returned in the `credentials` parameter if the session is a XS2A.api session with `sync_mode` set to `shared`.
      Otherwise the `credentials` is irrelevant.

      ## xs2a.abort(function())

      `xs2a.abort()`


      The callback will be executed in case the customer decides to abort the current transaction. We suggest to 
      redirect the customer accordingly. A callback must be provided.


      ```js
        xs2a.abort(function() {
            // Will be executed in case the customer aborts the transaction
        });
      ```

      ## xs2a.error(function())

      ```js
        xs2a.error(function(errorCode, messages, recoverable) {
            // Will be executed in case an error occurs during transaction
        });
      ```

      The callback will be executed in case an error occurs during the transaction. The `errorCode` can be as 
      follows.
      
      - **login_failed**: Login to bank failed (e.g. invalid login credentials)

      - **session_timeout**: The customer's session has timed out.

      - **tan_failed**: User entered invalid TAN.

      - **tech_error**: An unknown or unspecified error occurred.

      - **testmode_error**: An error occurred using testmode settings.

      - **trans_not_possible**: A transaction is not possible for various reasons.

      - **validation_failed**: Validation error (e.g. entered letters instead of numbers).


      The `recoverable` property indicates whether the error results in an abortion of the transaction. 
      If `recoverable` equals `false` the transaction is aborted.


      Please note, that **`recoverable` can be both `true` or `false` for a given error message**.
      For example, "login_failed" can be recoverable twice, but in order to protect the account from being
      locked due to too many failed login attempts, we abort the session then
      and you would again get "login_failed" but this time with `recoverable = false`.

      ## xs2a.bank(function())

      `xs2a.bank()`


      Allows you to register a function which will be executed before a bank selection page will be shown. 
      For example, you can use this callback to provide some custom information on this page.

      ```js
        xs2a.bank(function() {
            document.getElementById('your-text').style.display = 'block';
        });
      ```

      ## xs2a.isBank()

      `xs2a.isBank()`


      Function that returns `true` if the current step is the `bank` step, `false` otherwise.

      ## xs2a.login(function())

      `xs2a.login()`


      Callback can be registered which will be executed before the bank login page will be displayed. See also xs2a.bank(function()).

      ## xs2a.isLogin()

      `xs2a.isLogin()`


      Function that returns `true` if the current step is the `login` step, `false` otherwise.
      
      ## xs2a.account(function())

      `xs2a.account()`


      Callback which will be executed before the bank account selection page will be displayed. See also xs2a.bank(function()).

      ## xs2a.isAccount()

      `xs2a.isAccount()`


      Function that returns `true` if the current step is the `account` step, `false` otherwise.
      
      ## xs2a.tan(function())

      `xs2a.tan()`


      Callback can be registered which will be executed before the bank enter tan page will be displayed. See also xs2a.bank(function()).

      ## xs2a.isTan()

      `xs2a.isTan()`


      Function that returns `true` if the current step is the `tan` step, `false` otherwise.

      ## xs2a.abortTransaction()

      `xs2a.abortTransaction()` makes it possible to abort the current transaction manually.


      If it fits your use case you may simply add an Abort-Link or Button to your Form and register an event listener, that calls `xs2a.abortTransaction()`,
      like shown in the following example.


      ```html
        <a href="#" id="abort">Abort transaction</a>
        <script>
            document.getElementById('abort').onclick = function() {
                xs2a.abortTransaction();
            };
        </script>
      ```

      ## xs2a.lang()

      `xs2a.lang()` allows to get or set the language during a transaction. If no parameter is passed, 
      `xs2a.lang()` simple returns the current language which may be `de`or `en`. If a parameter is passed, 
      the form will be redisplayed with the new language set. The method will again return the language 
      that was actually set.


      Please note, that setting the language is only allowed if the user is not yet logged in to his or 
      her bank. If the user is already logged in, the language will not be changeable.


      Please also note that bank messages will not always be translated. For example banks, that communicate via HBCI 
      or banks that do not allow to switch the language will be served in German or in the default language 
      provided by the bank.

      ```html
        <select id="lang">
            <option>de</option>
            <option>en</option>
        </select>

        <script>
        document.querySelector('#lang').addEventListener('change', function () {
            let language = this.value;
            // set the language for the xs2a wizard
            xs2a.lang(language);
            // set the language for your app
            document.location.href = "..."
        });
        </script>
      ```

      ## xs2a.render(function())

      `xs2a.render()`

      Callback can be registered which will be executed every time a new form is displayed. So basically it will be executed before every step. See also `xs2a.bank(function())`.


      ## xs2a.intermission(function())


      ```js
        xs2a.intermission(function() {
          // This is your notification that the session is now in intermission state,
          // do any async operations and then either veto or resume the session.
        });
      ```


      Callback that can be registered which will be executed if the widget is sent to the intermission state, which is a waiting/polling state during which you can
      do any asynchronous operations, i.e. see [retrieving account snapshot](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1accountSnapshot/get), and then decide 
      to either [veto](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1veto/post) or [resume](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1resume/post) the session.

      ## Extending the xs2a forms

      The XS2A platform also offers the ability to extend its forms with your own custom fields. That might 
      be useful if you want to ask for some additional information during the transaction. Additional information 
      may be things like an email address or asking the user to confirm additional checkboxes.


      The two forms that can be extended are the bank code entry form and the login form. You may add custom form 
      elements by appending or prepending them to the existing form. The custom form elements that you can add via 
      the API are as follows.

      - Paragraphs - Text paragraphs that can optionally contain a title.  

      - Descriptions - Textual descriptions for input fields.  

      - Checkboxes  

      - Text inputs  


      To extend the forms, the global `xs2a` object provides the method `xs2a.extend()`. This method receives a callback as its 
      first argument. This callback is used to work with a `FormBuilder` that is passed to the callback. The `xs2a.extend()`
      method should be called before `xs2a.init()`.

      ### Examples

      #### Extending the bank code entry form by appending an email text input

      ```js
        xs2a.extend('bank', function(form) {
            form.text('email', 'E-Mail', '', '', ['required', 'email'], form.APPEND);
            form.description('To proceed you need to enter a valid email address.', form.APPEND);
        });

        xs2a.init();
      ```

      #### Extending the login form by appending a required checkbox


      ```js
        xs2a.extend('login', function(form) {
            form.paragraph('Custom title', 'Custom text', form.PREPEND);
            form.checkbox('my_policy', 'I accept this policy.', true, form.APPEND);
            form.description('To proceed you need accept this policy.', form.APPEND);
        });

        xs2a.init();
      ```

      #### Extending both forms with a custom message


      ```js
        xs2a.extend('bank', function(form) {
            form.paragraph('Hallo', 'This is a custom message', form.PREPEND);
        });

        xs2a.extend('login', function(form) {
            form.paragraph('Hallo', 'This is a custom message', form.PREPEND);
        });

        xs2a.init();
      ```

      #### Extending a form with a translations text object


      ```js
        xs2a.extend('bank', function(form) {
          var transParagraphTitle = {
            EN: 'Hello',
            DE: 'Hallo'
          };

          var transParagraphText = {
            EN: 'This is a custom message',
            DE: 'Dies ist eine benutzerdefinierte Nachricht'
          };

          form.paragraph(transParagraphTitle, transParagraphText, form.PREPEND);
        });

        xs2a.init();
      ```

      We support the languages: DE, EN. Default language is english (EN).



      ### Form Builder Methods

      The form builder passed to the callback has the following methods.

      #### form.paragraph()

      `form.paragraph(title, text, where)`  

      Adds a paragraph to the form.

        | Parameter | Type             | Description                                                                |
        |-----------|------------------|----------------------------------------------------------------------------|
        | title     | string \| object | The title of the paragraph (optional).                                     |
        | text      | string \| object | The text of the paragraph (optional).                                      |
        | where     | string           | Where to put the paragraph. One of form.APPEND or form.PREPEND. (optional) |

      #### form.description()

      `form.description(text, where)`  

      Adds a description text to the form.

        | Parameter | Type             | Description                                                                |
        |-----------|------------------|----------------------------------------------------------------------------|
        | title     | string \| object | The title of the paragraph (optional).                                     |
        | where     | string           | Where to put the paragraph. One of form.APPEND or form.PREPEND. (optional) |


      #### form.checkbox()

      `form.checkbox(name, label, required, where)`  

      Adds a checkbox input to the form.

        | Parameter | Type             | Description                                                               |
        |-----------|------------------|---------------------------------------------------------------------------|
        | name      | string           | The name of the checkbox input.                                           |
        | label     | string \| object | The label of the checkbox input.                                          |
        | required  | boolean          | True, if the user has to check this box.                                  |
        | where     | string           | Where to put the checkbox. One of form.APPEND or form.PREPEND. (optional) |


      #### form.text()

      `form.text(name, label, value, placeholder, validation, where)`  

      Adds a text input to the form.

        | Parameter   | Type             | Description                                                                                                   |
        |-------------|------------------|---------------------------------------------------------------------------------------------------------------|
        | name        | string           | The name of the input.                                                                                        |
        | label       | string \| object | The label of the input.                                                                                       |
        | value       | string           | Prefill this input. (optional)                                                                                |
        | placeholder | string \| object | The placeholder text for this input. (optional)                                                               |
        | validation  | array            | An array of validation rules. Allowed validation rules are required, email, numeric and alpha_num. (optional) |
        | where       | string           | Where to put the paragraph. One of form.APPEND or form.PREPEND. (optional)                                    |


      #### Links, Modal Dialogs and Tooltips

      You may also include links, modal dialogs and/or tooltips in the provided text.

      To include a link use the following syntax:  


      `Text with a link [<name>|link::<url>]`  


      A modal dialog can be included with:  


      `Text with a modal dialog [<name>|dialog::<text>]`  


      You can include a tooltip using the following syntax:  


      `Text with a tooltip [tooltip|<text>]`  
    
      ### Retrieving custom Values

      You receive the values, that the XS2A platform collected for you in the metadata attribute of your 
      transaction object, when you finally fetch it via the JSON API.  

      See the API description for the product you are using (e.g. [XS2A.RISK](#tag/XS2A.risk)) for more details on how to get the transaction 
      object after a transaction is finished.

  - name: Events and Webhook
    description: >-
      An event is basically anything that can happen with your XS2A account, e.g. creating a transaction, 
      matching of a transaction and the like. Also includes things like changing your account password.  


      A webhook ist just a URL which will be called whenever an event has happened.

      Webhooks are sent from our public IP: `37.208.107.50`


      You can view events within our admin application or via API. Webhook URLs can be added, edited or deleted. 
      You can enter up to three URLs. All URLs will be called via `POST`. Using HTTPs is required for all webhooks, 
      yet the certificate may be a self signed one.  


      ### Example System Call to your URL

      ```js
          {
              "id": "ev_kdhwWdkshflL237SdkDQ",
              "transaction": "xr_1ewwjEXLPISIGDy2",
              "type": "transaction.created",
              "message": "Transaction xr_1ewwjEXLPISIGDy2 created.",
              "data": {},
              "testmode": "1",
              "created_at": "2014-03-23 14:00:03",
              "object": "xs2a_event"
          }
      ```

      The field **data** will have event dependent information. Currently we support the following events.

      - **transaction.created**: A XS2A transaction has been created. Transaction data will be within the `data`.

      - **transaction.update**: Transactions might get an updated notification. The updated transaction data will be within the `data`.

      - **transaction.password_changed**: Account password has been changed. The field `data` will be empty.


      A connection error or a HTTP status code > 400 will be interpreted by the XS2A platform as a failed webhook. 
      In this case the webhook will keep retrying to call your URL again (with an increasing time span between multiple tries).


      The first five tries will be made within the first minute. All other tries will be within an increased time span. 
      After a total of 40 tries the webhook will be killed.

      ## Webhook Signature

      Our webhooks are singed. Its recommended to check signature for validity.  

      The signature will be sent in HTTP-Header X-Payload-Signature.  

      The X-Payload-Signature is only displayed when Secret is active.  

      You can find your shared secret on your [webhook configuration page](https://manage.xs2a.com/configure/webhooks).

      #### Example signed webhook call to your URL

      ```http
        POST /your-webhook-url HTTP/1.1
        Host: yourserver.com
        X-Payload-Signature: v1=6754b105f95c0cd9c544701451df7ffeebcb4ff7f17b64f75239502b27b1d8ab
        Content-Type: application/json
        Content-Length: 56

        {
            "id": "ev_kdhwWdkshflL237SdkDQ",
            "object": "xs2a_event",
            "type": "transaction.created",
            "testmode": true,
            "data": {},
            "created_at": "2014-03-23 14:00:03"
        }
      ```

      ### Versioning

      To maintain a backward compatibility, we maintain a versioned signature in our HTTP-Header. The format for multiple versions is as followed. 
      `v1=hashv1`
      
      
      ### Checking Signatures for validity

      To check a signature for validity you need to calculate and compare the hash for your corresponding version.
      
      ### v1

      In this version, you need to create a hash over the entire content of the webhook and create a Hash Message Authentication Code (HMAC) with the following settings:

      - **Algorithm**: SHA256

      - **Payload**: Entire payload (including whitespaces)

      - ** Secret**: Shared secret. This can be found on your [webhook configuration page](https://manage.xs2a.com/configure/webhooks).


      #### Example

        - Message: `Hello World!`
          - Secret: `secret_password`
          - Signature: `v1=faeffaa195ee7b044d20f034b5cf7ed1309c9e1f043836a65227d55be6452af2`

  - name: CSS
    description: >-
      The XS2A form embeds itself seamlessly into your website using DOM operations. This enables you to 
      define your own custom CSS rules and customize the look and feel to fit your needs. 

      ### Default Styling

      We provide base styling for the XS2A form, which you can implement by simply calling:

      ```js
        xs2a.useBaseStyles();
      ```

      This will add a stylesheet to the `<head>` section of your page, which fetches the base style file.
      You can then write custom css based on that style.
      
      In case you run into CSP related issue or the like, hotlink the file directly in the `<head>` section of your page:

      ```html
        <!-- Optional, in case of issues with xs2a.useBaseStyles() -->
        <link rel="stylesheet" href="https://api.xs2a.com/xs2a_base.css">
      ```

      ### Custom Styling

      When creating your own styling, the easiest way is to adjust the variables we define at the very top of the xs2a_base.css style file.
      We provide some CSS Variables, where you can change the colors to your corporate design.

      ```html
        <style>
          :root {
            --xs2a-primary: blue;
            --xs2a-error: red;
            --xs2a-warning: yellow;
            /* other overwrites, see top of xs2a_base.css file for all variables */
          }
        </style>
      ```

      If you create your own styles, we recommend to follow these guidelines.

      - **Build upon the base CSS**: This will ensure you correct styling in case future HTML markup changes occur.
      Also the positioning rules are always the latest.

      - **Add a style directly to elements**: The best way is to define a style for the elements as directly as possible. 
      Use simple selectors which should not make assumptions about the HTML structure.

      Please keep in mind that we can not provide support for themes which do not use our base CSS as a basis.
  - name: Testbank
    description: >-
      For testing and integration purposes we offer a Testbank. While using the 
      Testbank, no real transactions will be made.


      **Testbank is only available in Test mode or with a test API key.**


      The Testbank allows you to try out various ways the Wizard and other components can or will behave.
      You can use either of the following test banks, either with their respective bank codes or BIC.

      In case the chosen product requires recipient information, entering almost any data is fine as long it conforms 
      to the basic validation rules set by the chosen product.


      If you provide an account number or IBAN in the initial call, the customer will not be able to choose a different account, 
      even if there are more accounts available to chose from. If the given IBAN is not in the customer list of accounts, the 
      transaction will be aborted.

      ## Testbank Credentials

        | Testbank          | Bank Code | BIC         |
        |-------------------|-----------|-------------|
        | German Testbank   | 88888888  | TESTDE88XXX |
        | Austrian Testbank | 88888     | TESTAT88XXX |


      ## Trigger specific behaviours

      ### Force the Display of Wizard Tabs

      Display of wizard tabs can be forced by using the bank code *88888889* in combination with a test API key.


      ### Force other Behaviours using PIN

      You can use the following options with both banks as **PIN** in the login step to force certain behaviors.
      Use the words in bold to trigger the described behaviour.

        | PIN                | Description                                                                                                                                                    |
        |--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
        | accounts                    | Displays the account selection step with more than one account available.                                                                                      |
        | allforms                    | Displays all possible UI elements (except tabs) in one step. Perfect for writing and debugging CSS/styling. Tabs can be shown using 88888889 as bank code.     |
        | autosubmit                  | Display a form that simulates waiting for authorization from an external source, e.g. customer uses a token device while waiting for tan. (Only works for Pay) |
        | autosubmitLogin             | Display a form that simulates waiting for authorization from an external source, e.g. customer uses a token device while login. Works on all products.         |
        | autosubmitLoginAndTan       | Display a form that simulates waiting for authorization from an external source. (Risk and Pay)                                                                |
        | business                    | Returns business accounts with turnovers instead of private accounts.                                                                                          |
        | config                      | Allows you to configure some custom settings for testing various settings, e.g. turnover types, holder names etc.                                              |
        | error                       | An bank login error will be shown to the user                                                                                                                  |
        | forms                       | Allows you to choose from some prepared forms with various UI elements of the Wizard.                                                                          |
        | next                        | Displays a login next step                                                                                                                                     |
        | no-account                  | A transaction without a valid account type.                                                                                                                    |
        | no-balance                  | The chosen account has no balance.                                                                                                                             |
        | no-standing-orders          | The chosen account has no standing orders.                                                                                                                     |
        | no-turnovers                | No turnovers.                                                                                                                                                  |
        | negative-balance            | A transaction with a negative account balance.                                                                                                                 |
        | redirectFlow                | A transaction with an redirect flow                                                                                                                            |
        | slow                        | Slows down the transaction considerably.                                                                                                                       |
        | unsupported-turnovers       | The error, that the bank is currently unable to provide all the required account information (turnovers)                                                       |
        | unsupported-standing-orders | No standing orders are possible for this transaction                                                                                                           |
        | with-chargeback             | Generates a turnover that indicates a chargeback.                                                                                                              |
        | with-credit-card            | Adds a credit card to the list of accounts                                                                                                                     |
        | with-seizure                | Generates an account under seizure.                                                                                                                            |
        | wrong                       | Provokes a login error.                                                                                                                                        |
        | without-iban                | Adds an account without an iban to the list of accounts.                                                                                                       |

      ### Simulate wrong TAN Attempt

      To simulate a wrong TAN attempt, please enter **WRONG** as TAN.

      ## Test Pinned Accounts

      The following list of banks **must be pinned**, i.e. they must be specified in the API call. They
      **cannot be selected** using the account number field of the Wizard.

      ### Test Pinned Accounts - German Testbank

      In case you want to test pinned account numbers or IBANs, the German Testbank will return the following accounts.

        | IBAN                   | Account Number | Bank Code | Description | Transactions possible |
        |------------------------|----------------|-----------|-------------|-----------------------|
        | DE62888888880012345678 | 12345678       | 88888888  | Girokonto   | Yes                   |
        | DE04888888880087654321 | 87654321       | 88888888  | Extra-Konto | No                    |


      If you use the login-PIN `accounts`, the German Testbank will return the following additional accounts.

        | IBAN                   | Account Number | Bank Code | Description      | Transactions possible |
        |------------------------|----------------|-----------|------------------|-----------------------|
        | DE35888888880012345679 | 12345679       | 88888888  | Girokonto Plus   | Yes                   |
        | DE93888888880043218765 | 43218765       | 88888888  | Kontokorrent     | Yes                   |


      ### Test Pinned Accounts - Austrian Testbank

      In case you want to test pinned account numbers or IBANs, the Austrian Testbank will return the following accounts.

        | IBAN                 | Account Number | Bank Code | Description   | Transactions possible |
        |----------------------|----------------|-----------|---------------|-----------------------|
        | AT248888800012345678 | 12345678       | 88888     | Girokonto     | Yes                   |
        | AT638888800087654321 | 87654321       | 88888     | Sparkonto     | No                    |

      If you use the login-PIN `accounts`, the Austrian Testbank will return the following additional accounts.

        | IBAN                 | Account Number | Bank Code | Description    | Transactions possible |
        |----------------------|----------------|-----------|----------------|-----------------------|
        | AT948888800012345679 | 12345679       | 88888     | Girokonto Plus | Yes                   |
        | AT558888800043218765 | 43218765       | 88888     | Kontokorrent   | Yes                   |

  - name: Diagrams
    description: >-
      This chapter shows a couple of sequence diagrams for common scenarios. 
      The diagrams are quite detailed and designed to further your understanding 
      of how the involved parties interact.

      ## XS2A.pay with JS widget

      This diagram shows a standard integration of the JS widget for a payment initiation service.

      ![XS2A.pay with JS Widget Diagram](img/payment_js_api.png)

      ## XS2A.pay with wizard API

      This diagram shows a standard integration of the XS2A.pay API using the wizard API.

      ![XS2A.pay with wizard API Diagram](img/payment_wizard_api.png)

      ## XS2A.risk with wizard API

      This diagram shows a standard integration of the XS2A.risk API using the wizard API.

      ![XS2A.risk with wizard API Diagram](img/risk_wizard_api.png)

      ## XS2A.risk with JS widget

      This diagram shows a standard integration of the XS2A.risk API using the Javascript widget.

      ![XS2A.risk with JS widget Diagram](img/risk_js_api.png)
  - name: Postman / Insomnia
    description: >-
      ## Postman - Import Request Collection and Environment

      ### Request Collection

      1. **Open Postman**.

      2. In the **top left corner**, click the **Import** button *(or go to File → Import)*.

      3. In the **Import** dialog, select the **File** tab.

      4. Click **Choose Files**.

      5. Select the file **`XS2A.postman_collection.json`** and click **Open**.

      6. The collection will now appear in the **Collections** panel on the left side of the Postman window.

      7. Click the **three dots (⋮)** next to the collection name and choose **Edit**.

      8. In the **Edit Collection** window, go to the **Authorization** tab.

      9. In the **Type** dropdown, select **Basic Auth** *(or the authentication type required by your API)*.

      10. Enter your **Test-API-Key** in the **Password** field.

      11. Enter `"api"` in the **Username** field *(or the username required by your API)*.
      
      12. Click **Save**.


      ### Environment

      1. In Postman, click the **Environments** icon (gear symbol) in the **top right corner**.
      
      2. In the **Manage Environments** dialog, click **Import** in the top right corner.
      
      3. Click **Select File**, choose **`XS2A.postman_environment.json`**, and click **Open**.
      
      4. Close the **Manage Environments** dialog.
      
      5. Select **`XS2A`** from the **Environment dropdown** in the top right corner next to the gear icon.


      ### Download

      <a href="./downloads/XS2A.postman_collection.json" download>XS2A.postman_collection.json</a>


      <a href="./downloads/XS2A.postman_environment.json" download>XS2A.postman_environment.json</a>


      ## Insomnia - Import Request Collection and Environment

      ### Request Collection

      1. **Open Insomnia**.

      2. In the **top left corner**, click the **Workspace dropdown**.

      3. Select **Import/Export** from the menu.

      4. In the **Import/Export** dialog, click **Import Data**.

      5. Choose **From File**.

      6. Select the file **`XS2A.insomnia_collection.json`** (or `.yaml`) and click **Scan** and then **Import**.

      7. The collection will now appear in the **Requests panel** on the left side of the Insomnia window.

      8. Click on a request you want to configure.

      9. In the request view, go to the **Auth** tab.

      10. Select the correct authentication type *(e.g., Basic Auth or Bearer Token)*.

      11. Enter your **Test-API-Key** in the appropriate field (e.g., **Password** for Basic Auth or **Token** for Bearer Token).

      12. Click **Save**.


      ### Environment

      1. In Insomnia, click the **Manage Environments** icon (gear symbol) in the **top left corner** next to the workspace name.
      
      2. In the **Manage Environments** window, click **Import** at the top right.
      
      3. Choose **From File**, select **`XS2A.insomnia_environment.json`** (or `.yaml`), and click **Scan** and **Import**.
      
      4. Close the **Manage Environments** window.
      
      5. In the **Environment dropdown** (top left next to the gear icon), select **`XS2A`**.


      ### Download

      <a href="./downloads/XS2A.insomnia_collection.json" download>XS2A.insomnia_collection.json</a>


      <a href="./downloads/XS2A.insomnia_environment.json" download>XS2A.insomnia_environment.json</a>
  - name: Testbank 2.0
    description: >-
      Tink Germany also offers a Testbank 2.0 with further testing functionalities. For access to documentation please contact support@tink-germany.com
x-tagGroups:
  - name: General
    tags:
    - Testbank
    - Testbank 2.0
    - Versioning
    - Bankcodes API
    - Diagrams
    - Postman / Insomnia
  - name: XS2A.Risk
    tags:
    - Embeddable Risk Checks
    - XS2A.risk.fullpdf
    - XS2A.risk.export
    - XS2A.risk
    - Additional Settings
  - name: XS2A.Pay
    tags:
    - XS2A.pay
  - name: Misc
    tags:
    - Wizard API
    - Blacklist API
    - Whitelist API
    - Sessions API
    - Events API
  - name: XS2A.api
    tags:
    - XS2A.api General Information
    - XS2A.api.users
    - XS2A.api.connections
    - XS2A.api Bank Connection Events
    - XS2A.api.accounts
    - XS2A.api.wizard
  - name: Client Integration
    tags:
    - General Information
    - Javascript
    - CSS
    - Events and Webhook
paths:
  /version:
    get:
      tags:
        - Versioning
      summary: Versioning
      description: >-
        In case we make an API change, we might release a new version of the API. You can retrieve
        the current version by calling the version endpoint. This contains the date of the release
        date of the API. With every change we update the release date.
      security:
        - basicAuth: []
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Versioning'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '500':
          description: An internal server problem occurred
  /bankcodes:
    get:
      tags:
        - Bankcodes API
      summary: Check if a bank is supported by xs2a
      description: >-
        You will receive information about the selected bank. The field 
        `xs2a_supported` can be used to determine whether or not you should offer 
        XS2A products to your customer.
      security:
        - basicAuth: []
      parameters:
        - in: query
          name: bank_code
          description: bank code of the customers bank, optionally a country_id, otherwise Germany will be assumed
          schema:
            type: string
        - in: query
          name: country_id
          description: Two letter country code id, e.g. AT, CH, DE
          schema:
            $ref: '#/components/schemas/country_id'
        - in: query
          name: bic
          description: BIC of the customers bank, no country id is necessary
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
        - in: query
          name: q
          description: Uses the value to search for customers bank as either BIC or bank code
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '500':
          description: An internal server problem occurred
  /bankcodes/all:
    get:
      tags:
        - Bankcodes API
      summary: Get a paginated list of all bank objects
      description: >-
        You will receive a paginated list of all bank objects.
      security:
        - basicAuth: []
      parameters:
        - in: query
          name: country_id
          description: Filter returned results by country_id
          schema:
            $ref: '#/components/schemas/country_id'
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankObjectList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '500':
          description: An internal server problem occurred
  /bankcodes/autocomplete:
    get:
      tags:
        - Bankcodes API
      summary: Get a paginated list of all bankcodes for a query string
      description: >-
        For a paginated result of bankcodes based on a query string, send a
        get request to this endpoint.
      parameters:
        - in: query
          required: true
          name: q
          description: Use a query string to search for a bank by name
          schema:
            type: string
        - in: query
          name: country_id
          description: Two letter country code id, e.g. AT, CH, DE
          schema:
            $ref: '#/components/schemas/country_id'
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
        - in: query
          name: product
          description: Limit your search to a specific product
          schema:
            $ref: '#/components/schemas/product'
      security:
        - basicAuth: []
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankObjectList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '500':
          description: An internal server problem occurred
  /risks:
    post:
      tags:
        - XS2A.risk
      summary: Create xs2a.risk object
      description: >-
        Create a xs2a.risk object and receive a wizard session key in return.


        **Please Note**: In the following documentation of the request body, all available 
        risk checks are defined. It is important to note that they are optional, and that 
        you simply submit the risk check you need. You can find a more detailed explanation 
        of the risk checks [here](#tag/Embeddable-Risk-Checks).


        **Important Note**: Using the request sample, can only be performed if all code sections are fully expanded.

      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WizardSessionResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
      x-codeSamples:
        - lang: Javascript
          label: Node.js SDK
          source: |
            // npm i @fintecsystems/xs2a-node --save

            const { XS2A } = require('@fintecsystems/xs2a-node');
            const xs2a = new XS2A('your-api-key');
            try {
              const { wizard_session_key } = await xs2a.Risk.create({
                xs2a_account_snapshot: {
                  days: 365
                }
              });

              // Use wizard_session_key e.g. with xs2a.js
            } catch (e) {
              // Handle errors ...
            }
        - lang: PHP
          source: |
            require 'vendor/autoload.php';

            $apiKey = 'your-api-key';

            $payload = [
              'xs2a_account_snapshot' => [
                'days' => 365,
              ],
            ];

            $response = \Httpful\Request::post('https://api.xs2a.com/v1/risks')
              ->sendsJson()
              ->authenticateWith('api', $apiKey)
              ->body(json_encode($payload))
              ->send();

            echo $response->body->transaction;
            echo $response->body->wizard_session_key;
        - lang: HTTP
          source: |
            POST /v1/risks HTTP/1.1
            Host: api.xs2a.com
            Content-Type: application/json
            Authorization: Basic base64("api:YOUR_API_KEY_GOES_HERE")
            Cache-Control: no-cache

            {
              "xs2a_account_snapshot": {
                "days":365
              }
            }
        - lang: Java
          label: Java SDK
          source: |
            // Create a RiskService Instance
            RiskService riskService = new RiskService(apiKey);

            // Build a Risk Request
            Xs2aRisk risk = new Xs2aRisk();

            Xs2aAccountSnapshot accountSnapShot = new Xs2aAccountSnapshot(
                10,
                LocalDate.parse("2021-01-01"),
                LocalDate.parse("2021-01-10"),
                List.of("income"),
                true,
                true
            );
            risk.setXs2aAccountSnapshot(accountSnapShot);
            // add more risk checks as necessary ...

            // Fire the request and get a response
            WizardSessionResponse response = riskService.create(risk);
      requestBody:
        $ref: '#/components/requestBodies/xs2a.risk'
    get:
      tags:
        - XS2A.risk
      summary: Get a list of all xs2a.risk transaction objects
      description: >-
        Get a list of all xs2a.risk transaction object, or filter using
        query parameters.
      security:
        - basicAuth: []
      parameters:
        - in: query
          name: account_holder
          description: Filter using account holder of the account
          schema:
            type: string
        - in: query
          name: iban
          description: Filter using iban
          schema:
            type: string
        - in: query
          name: bic
          description: Filter using bic
          schema:
            type: string
        - in: query
          name: country_id
          description: Filter using two letter country id
          schema:
            $ref: '#/components/schemas/country_id'
        - in: query
          name: merchant_id
          description: Filter by merchant_id
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
        - in: query
          name: 'from'
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
          required: false
          schema:
            type: string
            format: date-time
        - in: query
          name: 'to'
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
          required: false
          schema:
            type: string
            format: date-time
        - in: query
          name: since
          description: >-
            Filter by date (format yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ or an
            ISO8601 conform date. You can also supply date expressions like "-2
            weeks" oder "-4 month"). This parameter has been deprecated in
            favor of from and to.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RisksTransactionList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/risks/{transaction-id}':
    get:
      tags:
        - XS2A.risk
      summary: Get a xs2a.risk transaction object
      description: >-
        **Please Note**: In the following documentation, all available risk checks 
        are included in the response body. Note however, that only the ones which you 
        requested will be included in the response, and that 'xs2a_account_snapshot'
        have its own endpoint, where you will get the full results
        of this check.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RiskObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
    delete:
      tags:
        - XS2A.risk
      summary: Delete a xs2a.risk transaction object
      description: >-
        Transaction data also can be deleted manually by sending a DELETE
        request for that transaction.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            Transaction data also can be deleted manually by sending a DELETE
            request for that transaction.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/risks/{transaction-id}/accountSnapshot':
    get:
      tags:
        - XS2A.risk
      summary: Download an Account Snapshot
      description: >-
        An account snapshot can be downloaded in several formats. The response object 
        described here details the JSON2 response.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
        - in: query
          name: format
          description: >-
            The format parameter is optional. The account snapshot is available in 
            the following formats: pdf, csv, json and json2. This call defaults to 
            pdf if the format parameter is omitted. Please note that you have to use 
            json2 as format if the all_accounts parameter was set to true.
          required: false
          schema:
            type: string
            enum: ['pdf', 'csv', 'json', 'json2']
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSnapshotJSON2'
            text/csv; charset=UTF-8:
              example:
                booking_date;purpose;amount;currency;counter_iban;counter_bic;counter_holder;tags;category_id
                26.02.2019;"ABSCHLUSS KEINE BELEG INFORMATIONEN, SIEHE GGF. KONTOAUSZUG !";-9.55;EUR;;;;;
            application/pdf:
              schema:
                type: string
                format: byte
            application/octet-stream:
              schema:
                type: string
                format: byte
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/risks/{transaction-id}/report/{report-id}':
    get:
      tags:
        - XS2A.risk
      summary: Download a Report
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
        - in: path
          name: report-id
          description: ID of the report to be retrieved. If not present, current default report will be used.
          required: true
          schema:
            type: string
        - in: query
          name: format
          description: >-
            The format parameter is optional. The report is available in
            the following formats: html, pdf and json. This call defaults to
            html if the format parameter is omitted.
          required: false
          schema:
            type: string
            enum: ['html', 'pdf', 'json']
        - in: query
          name: locale
          description: >-
            Locale in which the report will be rendered. This has no effect when using json format.
          required: false
          schema:
            type: string
            enum: ["de", "en"]
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/risks/{transaction-id}/events':
    get:
      tags:
        - XS2A.risk
      summary: Get all events for a xs2a.risk transaction object
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction for which all events are to be retrieved for.
          required: true
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /risks/upload/{wizard-session-id}:
    post:
      tags:
      - XS2A.risk
      summary: Complete xs2a.risk by uploading account data to our systems.
      description: This action will complete the started wizard_session and can **not** be done in testmode.
      security:
      - basicAuth: []
      parameters:
      - in: path
        name: wizard-session-id
        description: Wizard-session-id which was recieved using `POST /risks`
        required: true
        schema:
          type: string
      - in: query
        name: format
        description: >-
          The `format` parameter is optional and defines which format you are about to upload. The account snapshot upload function is available in
          the following formats: json and CAMT. This call defaults to
          json if the format parameter is omitted.
          If you are using CAMT format, please insert the whole **camt xml code** as payload. (no json)
        required: false
        schema:
          type: string
          enum: ['json', 'json2', 'camt']
      requestBody:
        $ref: "#/components/requestBodies/xs2a.risk.upload.json"
      responses:
        200:
          description: Requests processed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/xs2a.risk.upload.json.success'
        404:
          description: Invalid WizardSession
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/xs2a.risk.upload.json.404'
        422:
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/xs2a.risk.upload.json.422'
        500:
          description: An internal server problem occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/xs2a.risk.upload.json.500'
  /risks/{transaction-id}/accountSnapshot/?format=json2:
    get:
      tags:
        - Additional Settings
      summary: Get turnover booking_text
      description: Get a turnover booking text from a xs2a.account_snapshot
      security:
        - basicAuth: [ ]
      parameters:
          - in: path
            name: transaction-id
            description: ID of the transaction to be retrieved.
            required: true
            schema:
              type: string
          - in: query
            name: format
            description: >-
              The format parameter is json2. The booking_text is only available in json2.
            required: false
            schema:
              type: string
              enum: ['json2']
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSnapshotJSON2TurnoverBookingText'
            application/octet-stream:
              schema:
                type: string
                format: byte
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /payments/{transaction-id}/signed-pdf:
    get:
      tags:
        - Additional Settings
      summary: Get a signed PDF
      description: Get a signed PDF from a xs2a.api initiated payment
      security:
        - basicAuth: [ ]
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/pdf:
              schema:
                type: string
                format: byte
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/risks/{transaction-id}/jsonlists':
    get:
      tags:
        - XS2A.risk
      summary: Download a fact_sheet_lists json lists
      description: >-
        For detailed information onm fact_sheet_lists check, where the whole turnovers and all distinct counter holders 
        are included. The response object described here details the fact_sheet_lists_check response.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RiskObjectWithLists'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /payments:
    post:
      tags:
        - XS2A.pay
      summary: Create xs2a.pay object
      description: Create a xs2a.pay object and receive Wizard session key in return.
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WizardSessionResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
      x-codeSamples:
        - lang: Javascript
          label: Node.js SDK
          source: |
            // npm i @fintecsystems/xs2a-node --save

            const { XS2A } = require('@fintecsystems/xs2a-node');

            const xs2a = new XS2A('your-api-key');
            try {
              const { wizard_session_key } = await xs2a.Pay.create({
                amount: 35,
                currency_id: 'EUR',
                purpose: 'Order No. 123456',
                recipient_iban: 'DE04888888880087654321',
                recipient_holder: 'MyCompany Inc.'
              });

              // Use wizard_session_key e.g. with xs2a.js
            } catch (e) {
              // ...
            }
        - lang: PHP
          source: |
            require 'vendor/autoload.php';

            $apiKey = 'your-api-key';

            $payload = [
              'amount' => 35,
              'currency_id' => 'EUR',
              'purpose' => 'Order No 123456',
              'recipient_iban' => 'DE04888888880087654321',
              'recipient_holder' => 'MyCompany Inc.',
            ];

            $response = \Httpful\Request::post('https://api.xs2a.com/v1/payments')
              ->sendsJson()
              ->authenticateWith('api', $apiKey)
              ->body(json_encode($payload))
              ->send();

            echo $response->body->transaction;
            echo $response->body->wizard_session_key;
        - lang: HTTP
          source: |
            POST /v1/payments HTTP/1.1
            Host: api.xs2a.com
            Content-Type: application/json
            Authorization: Basic base64("api:YOUR_API_KEY_GOES_HERE")
            Cache-Control: no-cache

            {
              "amount": 35,
              "currency_id": "EUR",
              "purpose": "Order No. 123456",
              "recipient_iban": "DE04888888880087654321",
              "recipient_holder": "MyCompany Inc."
            }
        - lang: Java
          label: Java SDK
          source: |
            // Create a PayService Instance
            PayService payService = new PayService(apiKey);

            // Build your Pay Session Request
            Xs2aPay pay = new Xs2aPay(
                    35,
                    CurrencyId.EUR,
                    "Flowers",
                    "Max Mustermann",
                    "DE04888888880087654321",
                    // other properties such as metadata, language ...
            );

            // Fire the request and get a response
            WizardSessionResponse response = payService.create(pay);
            System.out.println(response.getWizardSessionKey());
      requestBody:
        $ref: '#/components/requestBodies/xs2a.pay'
    get:
      tags:
        - XS2A.pay
      summary: Get a list of all xs2a.pay transaction objects
      description: >-
        Get a list of all xs2a.pay transactions, or filter using query
        parameters.
      parameters:
        - in: query
          name: sender_holder
          schema:
            type: string
          description: Holder of the sender account
        - in: query
          name: sender_iban
          schema:
            type: string
          description: IBAN of the sender account
        - in: query
          name: sender_bic
          schema:
            type: string
          description: BIC of the sender account
        - in: query
          name: sender_account_number
          schema:
            type: string
          description: Account number of the sender account
        - in: query
          name: sender_bank_code
          schema:
            type: string
          description: National bank code of the sender account
        - in: query
          name: sender_country_id
          schema:
            $ref: '#/components/schemas/country_id'
          description: 'Two letter country code id of the sender account, e.g. AT, CH, DE'
        - in: query
          name: recipient_holder
          schema:
            type: string
          description: Holder of the recipient account
        - in: query
          name: recipient_iban
          schema:
            type: string
          description: IBAN of the recipient account
        - in: query
          name: recipient_bic
          schema:
            type: string
          description: BIC of the recipient account
        - in: query
          name: recipient_country_id
          schema:
            $ref: '#/components/schemas/country_id'
          description: 'Two letter country code id of the recipient account, e.g. AT, CH, DE'
        - in: query
          name: amount
          schema:
            type: number
            format: float
          description: Amount to transfer
        - in: query
          name: purpose
          schema:
            type: string
          description: Purpose of transfer
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
        - in: query
          name: from
          schema:
            type: string
            format: date-time
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
        - in: query
          name: to
          schema:
            type: string
            format: date-time
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
        - in: query
          name: since
          schema:
            type: string
            format: date-time
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayTransactionList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/payments/{transaction-id}':
    get:
      tags:
        - XS2A.pay
      summary: Get a xs2a.pay object
      description: >-
        Here you can retrieve a specific xs2a.pay object by its `transaction-id`.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            Transaction data also can be deleted manually by sending a DELETE
            request for that transaction.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
    delete:
      tags:
        - XS2A.pay
      summary: Delete a xs2a.pay transaction object
      description: >-
        Transaction data also can be deleted manually by sending a DELETE
        request for that transaction.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            Transaction data also can be deleted manually by sending a DELETE
            request for that transaction.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/payments/{transaction-id}/received':
    post:
      tags:
        - XS2A.pay
      summary: Change the payment status of a transaction to received
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment Object with the updated payment_status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/payments/{transaction-id}/loss':
    post:
      tags:
        - XS2A.pay
      summary: Change the payment status of a transaction to lost
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Payment Object with the updated payment_status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/payments/{transaction-id}/report/{report-id}':
    get:
      tags:
        - XS2A.pay
      summary: Download a Report
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
        - in: path
          name: report-id
          description: ID of the report to be retrieved.
          required: true
          schema:
            type: string
        - in: query
          name: format
          description: >-
            The format parameter is optional. The report is available in
            the following formats: html, pdf and json. This call defaults to
            html if the format parameter is omitted.
          required: false
          schema:
            type: string
            enum: ['html', 'pdf', 'json']
        - in: query
          name: locale
          description: >-
            Locale in which the report will be rendered. This has no effect when using json format.
          required: false
          schema:
            type: string
            enum: ["de", "en"]
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The object has been deleted intentionally
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedObject'
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/payments/{transaction-id}/events':
    get:
      tags:
        - XS2A.pay
      summary: Get all events for a xs2a.pay transaction object
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            Transaction id of the transaction for which events are to be
            retrieved for.
          required: true
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /payments/refundPayout:
    post:
      tags:
        - XS2A.pay
      summary: Generates a pain file.
      requestBody:
        $ref: '#/components/requestBodies/RefundPayout'
      description: >-
        The payout & refund feature offers the possibility to initiate a payout or refund that are based on XS2A.pay transactions.
        A SEPA pain file is created that can be processed by your bank.
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundPayoutResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundPayoutErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: [ ]
    get:
        tags:
          - XS2A.pay
        summary: Get a list of all refund and payout with their message_id.
        description: >-
          Get a list of all refund and payout with their `message_id`.
        responses:
          '200':
            description: Request successfully processed
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/RefundPayoutList'
          '401':
            description: Authentication failed API key missing or not valid
          '403':
            description: Forbidden Access blocked
          '404':
            description: >-
              Product not enabled or Not found The requested object does not exist
              on the server
          '422':
            description: Validation failed Something is wrong with the user input
          '500':
            description: An internal server problem occurred
        security:
          - basicAuth: [ ]
  /payments/refundPayout/multi:
    post:
      tags:
        - XS2A.pay
      summary: Payments Refund/Payout Endpoint max. 1000 Transactions per File.
      requestBody:
        $ref: '#/components/requestBodies/RefundPayoutMulti'
      description: >-
        The payout & refund feature with the endpoint multi offers the possibility to initiate a payout or refund that are based on XS2A.pay transactions.
        Several SEPA pain files can be created that can be processed by your bank.
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundPayoutMultiResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundPayoutErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: [ ]
  /payments/refundPayout/possible:
    get:
      tags:
        - XS2A.pay
      summary: Possible Payments Refund/Payout
      description: >-
        Get a list of all possible payments that can be either be refunded or paid out.
        The amount will always return 0.01, but can be adjusted to refund or payout more of the origin payment.
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundPayoutMultiList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: [ ]
  '/payments/refundPayout/{message-id}':
    get:
      tags:
        - XS2A.pay
      summary: Get a pain file.
      description: >-
        Here you can retrieve a specific pain file by its `message_id`.
      security:
        - basicAuth: [ ]
      parameters:
        - in: path
          name: message-id
          description: >-
            The message_id is used to get the generated pain file.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/painFileXml'
        '401':
          description: Authentication failed API key missing or not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/authenticationError'
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/payments/{transaction_id}/refundPayout':
    get:
      tags:
        - XS2A.pay
      summary: Get a refund Payout of transaction.
      description: >-
        Here you can retrieve a specific accumulated refund/payout of a transaction.
      security:
        - basicAuth: [ ]
      parameters:
        - in: path
          name: transaction_id
          description: >-
            ID of the transaction to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/refundsPayout'
        '401':
          description: Authentication failed API key missing or not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/authenticationError'
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /api/users:
    get:
      tags:
        - XS2A.api.users
      summary: Get a list of all xs2a.api bank users
      parameters:
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankUserList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    put:
      tags:
        - XS2A.api.users
      summary: Create a xs2a.api bank user
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankUser'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
      requestBody:
        $ref: '#/components/requestBodies/xs2a.api.users'
  '/api/users/{user-id}':
    get:
      tags:
        - XS2A.api.users
      summary: Get a xs2a.api bank user
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankUser'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    delete:
      tags:
        - XS2A.api.users
      summary: Delete a xs2a.api bank user
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: user-id
          description: User ID of the user to delete.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/api/users/{user-id}/accesstokens':
    get:
      tags:
        - XS2A.api.users
      summary: Get a list of accesstokens for a xs2a.api bank user
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user to retrieve a list of accesstokens for.
          required: true
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    put:
      tags:
        - XS2A.api.users
      summary: Create an accesstoken for a xs2a.api bank user
      description: >- 
        The generated access token is valid for one hour before it expires by default. 
        It is possible to set a specific expiration-date using the `valid_until` parameter.
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user to create an accesstoken for.
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/xs2a.api.users.accesstokens'
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/users/{user-id}/accesstokens/{token-id}':
    get:
      tags:
        - XS2A.api.users
      summary: Get a specific accesstoken
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user to retrieve a specific accesstoken for.
          required: true
          schema:
            type: string
        - in: path
          name: token-id
          description: The token-id for the token to retrieve the specific accesstoken for.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    delete:
      tags:
        - XS2A.api.users
      summary: Delete a specific accesstoken
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user to retrieve a specific accesstoken for.
          required: true
          schema:
            type: string
        - in: path
          name: token-id
          description: ID of the accesstoken to delete.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/api/users/{user-id}/accesstokens/{token-id}/refresh':
    post:
      tags:
        - XS2A.api.users
      summary: Refresh an accesstoken
      parameters:
        - in: path
          name: user-id
          description: The user-id for the user to refresh a specific accesstoken for.
          required: true
          schema:
            type: string
        - in: path
          name: token-id
          description: The token-id for the token to refresh.
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/xs2a.api.users.accesstokens'
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/connections':
    put:
      tags:
        - XS2A.api.connections
      summary: Create a bank connection
      description: Create a bank connection and receive wizard session object
      requestBody:
        $ref: '#/components/requestBodies/xs2a.api.connections'
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WizardSessionResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    get:
      tags:
        - XS2A.api.connections
      summary: Get a list of all bank connections for a xs2a.api bank user
      parameters:
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankConnectionList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/connections/{connection-id}':
    get:
      tags:
        - XS2A.api.connections
      summary: Get a specific bank connection
      parameters:
        - in: path
          name: connection-id
          description: >-
            The connection-id for the connection to be retrieved.
            You can also pass `transaction` id here, which you get when you create a bank connection.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankConnection'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    delete:
      tags:
        - XS2A.api.connections
      summary: Delete a specific bank connection
      parameters:
        - in: path
          name: connection-id
          description: The connection-id for the connection to be deleted.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/connections/{connection-id}/sync':
    post:
      tags:
        - XS2A.api.connections
      summary: Sync a bank connection
      description: >-
        Syncing a bank connection means that the login to the bank is repeated,
        the new balance and the new list of turnovers is fetched and the list of accounts associated to the bank 
        user is updated accordingly.

        **Note**: Every event that occurs when synchronizing bank connections is sent out to a webhook URL. See the [Bank Connection Events Section](#tag/XS2A.api-Bank-Connection-Events) for more details.
        
        ### Error Handling

        Any bank connections that are in sync mode full are synced automatically by XS2A. No further steps are needed the 
        turnovers and balance information on the accounts will always be up to date. If a sync process fails for some reason, 
        e.g. the user has changed her password, that the automatic sync will stop. The field sync_message will contain more 
        information about the error. The field sync_fail_counter will have the number of subsequent failures. sync_active will 
        be set to false an the connection will not be synced again.

        If the case above the sync can however be forced via the API, using the `force` parameter as described below. 
        After 2 failures in a row the bank connection will be disabled and can not be synced again. It will have to be deleted and recreated.
        The user will have to re-enter his credentials.
      parameters:
        - in: path
          name: connection-id
          description: The connection-id for the connection to be synced.
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/xs2a.api.connections.sync'
      responses:
        '202':
          description: >-
            If the sync requires any form of user interaction a structure
            containing a new wizard_session_key will be returned, similar to
            creating a new bank connection. The HTTP response code will be 202
            in this case.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WizardSessionResponse'
        '204':
          description: >-
            The server successfully processed the request and is not returning any content. (The sync process will be executed without any user interaction)
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/connections/{connection-id}/reset':
    post:
      tags:
        - XS2A.api.connections
      summary: Reset a bank connection
      description: >-
        Reset a bank connection regardless of his sync mode.
      parameters:
        - in: path
          name: connection-id
          description: The connection-id for the connection to be reseted.
          required: true
          schema:
            type: string
      responses:
        '202':
          description: >-
            A structure containing a new wizard_session_key will be returned.
            The HTTP response code will be 202 in this case.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WizardSessionResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts':
    get:
      tags:
        - XS2A.api.accounts
      summary: Retrieve the list of bank accounts for a xs2a.api bank user
      parameters:
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountsList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/connections/{connection-id}/accounts':
    get:
      tags:
        - XS2A.api.accounts
      summary: Retrieve the list of all bank accounts for a specific bank connection
      parameters:
        - in: path
          name: connection-id
          required: true
          description: The ID of the connection
          schema:
            type: string
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountsList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts/{bank-account-id}':
    get:
      tags:
        - XS2A.api.accounts
      summary: Get a specific bank account of a xs2a.api bank user
      parameters:
        - in: path
          name: bank-account-id
          description: The bank-account-id for the account to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccount'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
    delete:
      tags:
        - XS2A.api.accounts
      summary: Delete a specific bank account of a xs2a.api bank user
      parameters:
        - in: path
          name: bank-account-id
          description: The bank-account-id for the account to be retrieved.
          required: true
          schema:
            type: string
      responses:
        204:
          description: BankAccount was deleted successfully.
        401:
          description: Authentication failed API key missing or not valid
        403:
          description: Forbidden Access blocked
        404:
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        409:
          description: >-
            Conflict. Bank Accounts can not be deleted, if the corresponding BankConnection still exists.
            Delete BankConnection to proceed.
        500:
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts/{bank-account-id}/balance':
    get:
      tags:
        - XS2A.api.accounts
      summary: Retrieve the balance for a specific bank account
      parameters:
        - in: path
          name: bank-account-id
          description: >-
            The bank-account-id for the account for which the balance is to be
            checked.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountBalance'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts/{bank-account-id}/turnovers':
    get:
      tags:
        - XS2A.api.accounts
      summary: Retrieve the turnovers for a specific bank account
      parameters:
        - in: path
          name: bank-account-id
          description: >-
            The bank-account-id for the account for which the turnovers are to
            be retrieved.
          required: true
          schema:
            type: string
        - in: query
          name: from
          description: >-
            Filter turnovers by **booking_date**.
          required: false
          schema:
            type: string
            format: date
            example: '2019-02-14'
        - in: query
          name: to
          description: >-
            Filter turnovers by **booking_date**.
          required: false
          schema:
            type: string
            format: date
            example: '2019-02-22'
        - in: query
          name: only_new
          description: >-
            Filter turnovers by **new flag**.
          required: false
          schema:
            type: boolean
            example: true
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountTurnovers'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts/{bank-account-id}/markAsSeen/{date}':
    post:
      tags:
        - XS2A.api.accounts
      summary: Mark turnovers as seen
      description: >-
        This will set the attribute **new** of all (or up until the date parameter) turnovers in this account
        to seen / false. All new synced turnovers since the last call of this
        endpoint will stay in status **new** until this endpoint is called again.
        The date parameter is optional.
      parameters:
        - in: path
          name: bank-account-id
          description: >-
            The bank-account-id for the account for which the turnovers are to
            be marked as seen.
          required: true
          schema:
            type: string
        - in: path
          name: date
          description: >-
            (Optional) Once you set a **date**, attribute **new** of all turnovers is set to
            false until the given date. If you leave out the parameter date,
            attribute **new** of all turnovers in this account will be set to false.
          required: true
          schema:
            type: string
            format: date
            example: '2019-02-14'
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  '/api/accounts/{bank-account-id}/report/{report-id}':
    get:
      tags:
        - XS2A.api.accounts
      summary: Retrieve a Report for a specific bank account
      description: >-
      parameters:
        - in: path
          name: bank-account-id
          description: >-
            The bank-account-id for the account to be retrieved.
          required: true
          schema:
            type: string
        - in: path
          name: report-id
          description: >-
            ID of the report to be retrieved..
          required: true
          schema:
            type: string
        - in: query
          name: format
          description: >-
            The format parameter is optional. The report is available in
            the following formats: html, pdf and json. This call defaults to
            html if the format parameter is omitted.
          required: false
          schema:
            type: string
            default: "html"
            enum: ["html", "pdf", "json"]
        - in: query
          name: locale
          description: >-
            Locale in which the report will be rendered. This has no effect when using json format.
          required: false
          schema:
            type: string
            default: "en"
            enum: ["de", "en"]
      responses:
        '200':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  /api/wizard:
    post:
      tags:
        - XS2A.api.wizard
      summary: Navigate through the Wizard without xs2a.js
      requestBody:
        $ref: '#/components/requestBodies/wizard.api'
      parameters:
        - in: header
          name: X-User-Ip
          schema:
            type: string
            format: IP
          required: false
          description: IP adress from users browser..
        - in: header
          name: X-User-Port
          schema:
            type: string
          required: false
          description: The user port from users browser..
        - in: header
          name: X-User-Accept
          schema:
            type: string
          required: false
          description: Accepted MIME types by users browser..
        - in: header
          name: X-User-Accept-Charset
          schema:
            type: string
          required: false
          description: Accepted char set by users browser..
        - in: header
          name: X-User-Accept-Encoding
          schema:
            type: string
          required: false
          description: Accepted encoding by users browser..
        - in: header
          name: X-User-Accept-Language
          schema:
            type: string
          required: false
          description: Accepted language by users browser..
        - in: header
          name: X-User-User-Agent
          schema:
            type: string
          required: false
          description: User Agent from users browser..
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WizardResponse'
                  - $ref: '#/components/schemas/WizardFinalResponse'
        '401':
          description: Authentication failed Access token missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The requested session was buried and is not accessible anymore.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuriedSessionObject'
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
      description: >-
        Instead of using the API key as password you have to use the [token](#tag/XS2A.api.users/paths/~1api~1users~1{user-id}~1accesstokens/put) of the bank user for the Authentication.

        The payment service user meta data (psu) of the user on whose behalf the action is triggered should be send by the header parameters below.

        Authentication -> [https://docs.xs2a.com/swagger/#section/Authentication](#section/Authentication)
  /wizard:
    post:
      servers:
        - url: https://api.xs2a.com/v1.1
          description: This endpoint uses the v1.1 prefix.
      tags:
        - Wizard API
      summary: Navigate through the Wizard without xs2a.js
      description: |
        Note that this endpoint uses the `v1.1` prefix, so the URL is `https://api.xs2a.com/v1.1/wizard`.

        ## Validations rules
        | Rule Name              | Description                                                      |
        |------------------------|------------------------------------------------------------------|
        | alpha_num              | Only alpha-numeric characters are allowed.                       |
        | between:min,max        | The field must have a size between min and max.                  |
        | digits:value           | The field must be numeric and must have an exact length of value.|
        | in:value1,value2,...   | The field must be included in the given list of values.          |
        | min:value              | The field must have a minimum value.                             |
        | max:value              | The field must have a maximum value.                             |
        | required               | The field must be present and not empty.                         |
        | size:value             | The field must have a size matching the value.                   |
      requestBody:
        $ref: '#/components/requestBodies/wizard.api'
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/WizardResponse'
                  - $ref: '#/components/schemas/WizardFinalResponse'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '410':
          description: The requested session was buried and is not accessible anymore.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BuriedSessionObject'
        '422':
          description: Validation failed Something is wrong with the user input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An internal server problem occurred
      security:
        - basicAuth: []
  /blacklist:
    post:
      tags:
        - Blacklist API
      summary: Add an entry to the blacklist
      security:
        - basicAuth: []
      requestBody:
        $ref: '#/components/requestBodies/Blacklist.add'
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/blacklist/{id}':
    get:
      tags:
        - Blacklist API
      summary: Get the details about a blacklist item
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: id
          description: The id that you were given when adding the blacklist entry
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
    delete:
      tags:
        - Blacklist API
      summary: Remove an entry from the blacklist
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: id
          description: The id that you were given when adding the blacklist entry
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /whitelist:
    post:
      tags:
      - Whitelist API
      summary: Add an entry to the whitelist
      security:
      - basicAuth: []
      requestBody:
        $ref: '#/components/requestBodies/Whitelist.add'
      responses:
        200:
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhitelistObject'
        401:
          description: Authentication failed API key missing or not valid
        403:
          description: Forbidden Access blocked
        404:
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        422:
          description: Validation failed Something is wrong with the user input
        500:
          description: An internal server problem occurred
  /whitelist/{id}:
    get:
      tags:
      - Whitelist API
      summary: Get the details about a whitelist item
      security:
      - basicAuth: []
      parameters:
      - in: path
        name: id
        description: The id that you were given when adding the whitelist entry
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhitelistObject'
        401:
          description: Authentication failed API key missing or not valid
        403:
          description: Forbidden Access blocked
        404:
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        422:
          description: Validation failed Something is wrong with the user input
        500:
          description: An internal server problem occurred
    delete:
      tags:
      - Whitelist API
      summary: Remove an entry from the whitelist
      security:
      - basicAuth: []
      parameters:
      - in: path
        name: id
        description: The id that you were given when adding the whitelist entry
        required: true
        schema:
          type: string
      responses:
        200:
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhitelistObject'
        401:
          description: Authentication failed API key missing or not valid
        403:
          description: Forbidden Access blocked
        404:
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        422:
          description: Validation failed Something is wrong with the user input
        500:
          description: An internal server problem occurred
  '/sessions/{transaction-id}':
    get:
      tags:
        - Sessions API
      summary: This will return a wizard_session object.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            To query this, you can use the transaction-id, which is returned,
            after the session is created.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/wizard_session_object'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/sessions/{transaction-id}/accountSnapshot':
    get:
      tags:
        - Sessions API
      summary: Get account snapshot of a session in intermission.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            The transaction-id, which is returned after the session is created.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSnapshotJSON2'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '412':
          description: Precondition Failed.
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/sessions/{transaction-id}/veto':
    post:
      tags:
        - Sessions API
      summary: Veto (abort) a session that is in intermission.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            The transaction-id, which is returned after the session is created.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/sessions/{transaction-id}/resume':
    post:
      tags:
        - Sessions API
      summary: Resume a session that is in intermission.
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: transaction-id
          description: >-
            The transaction-id, which is returned after the session is created.
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Request successfully processed
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  /events:
    get:
      tags:
        - Events API
      summary: Get all events for a xs2a transaction object
      description: >-
        An event is basically the API representation of a webhook. Every webhook
        you receive fires an event, that you can process further.
      security:
        - basicAuth: []
      parameters:
        - in: query
          name: transaction-id
          description: transaction id for which all events are to be retrieved for.
          required: false
          schema:
            type: string
        - in: query
          name: type
          description: >-
            The type of event e.g. 'transaction.created' or
            'transaction.updated' etc.
          required: false
          schema:
            $ref: '#/components/schemas/EventType'
        - in: query
          name: per_page
          description: Items per page
          schema:
            type: integer
        - in: query
          name: page
          description: Which page to display
          schema:
            type: integer
        - in: query
          name: 'from'
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
          required: false
          schema:
            type: string
            format: date-time
        - in: query
          name: 'to'
          description: >-
            Filter by date. Pass ISO8601 conform dates
            (yyyy-mm-ddThh:mm:ss-zzzz). The time and timezone portions are
            optional and may be omitted (e.g yyyy-mm-dd or yyyy-mm-ddThh:mm:ss).
          required: false
          schema:
            type: string
            format: date-time
        - in: query
          name: since
          description: >-
            Filter by date (format yyyy-mm-dd or yyyy-mm-ddThh:mm:ssZ or an
            ISO8601 conform date. You can also supply date expressions like "-2
            weeks" oder "-4 month").
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventsList'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
  '/events/{event-id}':
    get:
      tags:
        - Events API
      summary: Download a specific event for a xs2a transaction object
      security:
        - basicAuth: []
      parameters:
        - in: path
          name: event-id
          description: ID of the event to be retrieved.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Request successfully processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventObject'
        '401':
          description: Authentication failed API key missing or not valid
        '403':
          description: Forbidden Access blocked
        '404':
          description: >-
            Product not enabled or Not found The requested object does not exist
            on the server
        '422':
          description: Validation failed Something is wrong with the user input
        '500':
          description: An internal server problem occurred
components:
  schemas:
    refundsPayout:
      type: object
      properties:
        transaction:
          type: string
          example: 10003-xp-911h-mv99
          description: >-
            Internal XS2A transaction id. This id will be the same for the whole transaction.
        amount_issued:
          type: number
          format: float
          example: 10.02
          description: Sum payout or refund issued.
        type:
          type: string
          enum: ["refund", "payout"]
          example: payout
          description: The type is payout or refund.
        testmode:
          type: string
          example: '1'
          description: "'1', if this bank is a testbank"
        created_at:
          type: string
          example: "2020-01-01 10:00:00"
    painFileXml:
      type: string
      description: >-
        ```html
          <?xml version="1.0" encoding="UTF-8"?>
          <Document
            xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd">
            <CstmrCdtTrfInitn>
              <GrpHdr>
                <MsgId>XFECURW7-payment-6077f1b9390f3</MsgId>
                <CreDtTm>2021-04-15T09:56:41Z</CreDtTm>
                <NbOfTxs>1</NbOfTxs>
                <CtrlSum>10.00</CtrlSum>
                <InitgPty>
                  <Nm>Rollin Klocko</Nm>
                </InitgPty>
              </GrpHdr>
              <PmtInf>
                <PmtInfId>PmtInfId-6077f1b939ed1</PmtInfId>
                <PmtMtd>TRF</PmtMtd>
                <BtchBookg>true</BtchBookg>
                <NbOfTxs>1</NbOfTxs>
                <CtrlSum>10.00</CtrlSum>
                <PmtTpInf>
                  <SvcLvl>
                    <Cd>SEPA</Cd>
                  </SvcLvl>
                </PmtTpInf>
                <ReqdExctnDt>2021-04-15</ReqdExctnDt>
                <Dbtr>
                  <Nm>Rollin Klocko</Nm>
                </Dbtr>
                <DbtrAcct>
                  <Id>
                    <IBAN>DE83801896687814439938</IBAN>
                  </Id>
                  <Ccy>EUR</Ccy>
                </DbtrAcct>
                <DbtrAgt>
                  <FinInstnId>
                    <BIC>XFECURW7</BIC>
                  </FinInstnId>
                </DbtrAgt>
                <ChrgBr>SLEV</ChrgBr>
                <CdtTrfTxInf>
                  <PmtId>
                    <EndToEndId></EndToEndId>
                  </PmtId>
                  <Amt>
                    <InstdAmt Ccy="EUR">10.00</InstdAmt>
                  </Amt>
                  <CdtrAgt>
                    <FinInstnId>
                      <BIC>AVAHUZKZSND</BIC>
                    </FinInstnId>
                  </CdtrAgt>
                  <Cdtr>
                    <Nm>Evangeline Hamill</Nm>
                  </Cdtr>
                  <CdtrAcct>
                    <Id>
                      <IBAN>DE98615332112027258920</IBAN>
                    </Id>
                  </CdtrAcct>
                  <RmtInf>
                    <Ustrd>Purpose</Ustrd>
                  </RmtInf>
                </CdtTrfTxInf>
              </PmtInf>
            </CstmrCdtTrfInitn>
          </Document>
          ```
    authenticationError:
      properties:
        code:
          type: integer
          example: 401
          description: status code to indicate whether the request was successful
        message:
          type: string
          example: Invalid credentials.
          description: Descriptive message for the status code
    RefundPayout:
      type: object
      required:
        - pain_type
        - transactions
      properties:
        pain_type:
          type: string
          enum: ["pain.001.001.03"]
          example: pain.001.001.03
          description: The format of pain file.
        batch_booking:
          type: boolean
          example: false
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/refund_payout_transactions'
    RefundPayoutMulti:
      type: object
      required:
        - pain_type
        - transactions
        - transaction_per_file
      properties:
        pain_type:
          type: string
          enum: [ "pain.001.001.03" ]
          example: pain.001.001.03
          description: The format of pain file.
        batch_booking:
          type: boolean
          example: false
        transaction_per_file:
          type: integer
          example: 250
          description: >-
            The minimum value is 100 and the maximum value is 1000.
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/refund_payout_transactions'
    refund_payout_transactions:
      type: object
      required:
        - transaction
        - amount
        - type
      properties:
        transaction:
          type: string
          example: 10003-xp-911h-mv99
          description: >-
            Internal XS2A transaction id. This id will be the same for the whole transaction.
        amount:
          type: number
          format: float
          example: 10.02
          description: The amount of a given payout or refund.
        type:
          type: string
          enum: ["refund", "payout"]
          example: payout
          description: The type is payout or refund.
    RefundPayoutResponse:
      type: object
      required:
        - message_id
      properties:
        message_id:
          type: string
          example: XFECURW7-payment-6075917565324
          description: The message id to get the pain file.
    RefundPayoutMultiResponse:
      type: object
      required:
        - message_ids
      properties:
        message_ids:
          type: array
          items:
            type: string
            example: XFECURW7-payment-6075917565324
            description: The message id to get the pain file.
    RefundPayoutErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 422
          description: status code to indicate whether the request was successful
        message:
          type: string
          example: Validation failed
          description: Descriptive message for the status code
        errors:
          type: object
          properties:
            transactions.3.amount:
              type: array
              items:
                type: string
                example: The transactions.3.amount field is required.
            transactions.0.type:
              type: array
              items:
                type: string
                example: The selected value of transactions.0.type field is invalid..
          description: Contains the validation errors (only set in case there are any)
    RefundPayoutList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/RefundPayoutObject'
    RefundPayoutMultiList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/RefundPayoutMultiObject'
    RefundPayoutObject:
      type: object
      properties:
        message_id:
          type: string
          example: INGDDEFFXXX-payment-60704d0872596
          description: >-
            The message id to get the pain file.
        created_at:
          type: string
          example: "2020-01-01 10:00:00"
    RefundPayoutMultiObject:
      type: object
      properties:
        transaction:
          type: array
          items:
            type: string
          example: 10001-xp-5r2s-b77n
          description: >-
            The transaction id of the payment.
        amount:
          type: number
          format: float
          example: 0.01
        type:
          type: string
          enum: ["refund", "payout"]
          example: refund
          description: The type is payout or refund.
    language:
      type: string
      enum: ["de", "en"]
      example: de
      description: The initial language.
    product:
      type: string
      enum: ["xs2a_verify", "xs2a_risk", "xs2a_pay", "xs2a_api"]
      example: xs2a_risk
      description: The name of the xs2a product.
    currency_id:
      type: string
      enum: ["EUR", "CHF"]
      example: EUR
      description: The id of the currency to be used.
    sync_mode:
      type: string
      enum: ["full", "shared", "none"]
      example: full
      description: The mode how the bank connection is synced.
    country_id:
      type: string
      enum: ["DE", "AT", "CH"]
      example: DE
      description: The 2-letter country code
    ExpectedHolderObject:
      type: object
      properties:
        firstname:
          type: string
          example: Hartmuth
          description: The first name
        name:
          type: string
          example: Mustermann
          description: The last name
    RiskCalculationsResponse:
      type: object
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/calculations_tags'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/calculations_categories'
        functions:
          type: array
          items:
            $ref: '#/components/schemas/calculations_functions'
          example: [
            'sum',
            'count',
            'median',
            'average',
            'last',
            'min',
            'max',
            'min_date',
            'max_date',
            'clean_sum',
            'exists',
            'sums_of_every_month',
            'counts_of_every_month',
            'median_of_all_month_sums',
            'average_of_all_month_sums',
            'min_of_all_month_sums',
            'max_of_all_month_sums',
            'distinct_counter_holders'
          ]
        name:
          type: string
          example: "Example name"
          description: "A name for this calculation."
        days:
          type: integer
          example: 180
          description: "Days"
        from:
          type: string
          example: ""
          description: "Starting date"
        to:
          type: string
          example: ""
          description: "Ending date"
        full_months:
          type: string
          example: ""
          description: "Full months"
        results:
          type: object
          example:
            count: 3
          description: "Results of each function."
    RiskCalculations:
      type: object
      properties:
        tags:
          type: array
          items:
            $ref: '#/components/schemas/calculations_tags'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/calculations_categories'
        functions:
          type: array
          items:
            $ref: '#/components/schemas/calculations_functions'
          example: [
            'sum',
            'count',
            'median',
            'average',
            'last',
            'min',
            'max',
            'min_date',
            'max_date',
            'clean_sum',
            'exists',
            'sums_of_every_month',
            'counts_of_every_month',
            'median_of_all_month_sums',
            'average_of_all_month_sums',
            'min_of_all_month_sums',
            'max_of_all_month_sums',
            'distinct_counter_holders'
          ]
        name:
          type: string
          example: "Example name"
          description: "A name for this calculation"
        days:
          type: integer
          example: 180
          description: "Days"
        from:
          type: string
          example: ""
          description: "Starting date"
        to:
          type: string
          example: ""
          description: "Ending date"
        full_months:
          type: string
          example: ""
          description: "Full months"
        children_categories:
          type: boolean
          example: false
          description: "Children categories"
        match_tags_with_categories:
          type: boolean
          example: false
          description: "Match tags with categories"
        include_current_month:
          type: boolean
          example: false
          description: "If you are using full_month date range, you can also include the current ongoing month, by enabling the parameter. This has no affect on date ranges from, to & days."
    calculations_tags:
      type: string
      example:  'transfer'
      description: 'tags which are given'
    calculations_categories:
      type: string
      example:  'K.1.1'
      description: >-
        The ID of the category found for this turnover.
            
            
        The structure of this `category_id` string is hierarchical, meaning, 
        the more numbers there are, the more detailed the category is. For example, while `K.1` means "expenses for wholesale and retail trade", some 
        turnovers might be categorized more detailed as `K.1.1` ("expenses in retail stores"), or even as `K.1.1.1`
        ("groceries full-range trader"). You can find the complete list of categories [here](https://manage.xs2a.com/documentation/categories).


        **NOTE**: As new categories are introduced and the categorization itself is improved constantly, it is possible that 
        the same turnover can be categorized with a different (more detailed) `category_id` at a future point in time. You should develop your application in such a way, 
        that, for example, if your logic relies on something happening when a `category_id` is `K.1.1`, but you get `K.1.2` for which no logic is in place (because it might be 
        a new `category_id` or the turnover is now categorized more detailed), **you should always fall back to the next higher level category**, in this case `K.1`. This way, your logic can 
        still handle the turnover based on a more general category, while not throwing an error.
    calculations_functions:
      type: string
      example:  'sum'
      enum: [
        'sum',
        'count',
        'median',
        'average',
        'last',
        'min',
        'max',
        'min_date',
        'max_date',
        'clean_sum',
        'exists',
        'sums_of_every_month',
        'counts_of_every_month',
        'median_of_all_month_sums',
        'average_of_all_month_sums',
        'min_of_all_month_sums',
        'max_of_all_month_sums',
        'distinct_counter_holders'
        ]
      description: 'functions like sum, count, last ...'
    Versioning:
      type: object
      properties:
        version:
          type: string
          example: '2015-11-13'
          description: Date of the version
    BankObject:
      type: object
      properties:
        bank_code:
          type: string
          example: '88888888'
          description: bank code of the bank
        bic:
          type: string
          example: 'TESTDE88XXX'
          description: BIC of the bank
        name:
          type: string
          example: 'Testbank'
          description: Name of the bank
        short_name:
          type: string
          example: 'Testbank'
          description: Abbreviated bank name
        zipcode:
          type: string
          example: '12345'
          description: National ZIP code of the bank
        city:
          type: string
          example: 'Teststadt'
          description: City
        country_id:
          $ref: '#/components/schemas/country_id'
        testmode:
          type: string
          example: '1'
          description: "'1', if this bank is a testbank"
        xs2a_products:
          type: array
          items:
            $ref: '#/components/schemas/product'
          description: array of xs2a products supported
        xs2a_supported:
          type: boolean
          example: true
          description: true, if this bank is supported by XS2A
    BankObjectList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankObject'
    WizardSessionResponse:
      type: object
      properties:
        wizard_session_key:
          type: string
          example: m5A65Cy2lwI1rOXxuvwU4MM47b4tDaV0ME9By6It
          description: >-
            Using the wizard_session_key you can now initialize our Wizard which
            is running on your website
        transaction:
          type: string
          example: 10001-xv-LEz8-oct7
          description: >-
            We suggest that you store the internally used XS2A transaction id
            transaction with your transaction data, because if you later have
            questions about a transaction, we need this number to be able to
            quickly assist you.
    DeletedObject:
      type: object
      properties:
        code:
          type: integer
          example: 410
          description: Response code
        message:
          type: string
          example: Deleted intentionally
          description: >-
            This message is displayed if the requested resource existed earlier, but was intentionally deleted
    BuriedSessionObject:
      type: object
      properties:
        code:
          type: integer
          example: 410
          description: Response code
        message:
          type: string
          example: Gone
          description: >-
            The requested session was buried and is not accessible anymore.
    RiskObject:
      type: object
      properties:
        id:
          type: string
          example: xr_hd84kg9zns53lvh1
          description: Transaction id
        transaction:
          type: string
          example: 10001-xr-abcd-abcd
          description: >-
            Internal XS2A transaction id. This id will be the same for the whole
            transaction
        account_holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: Account holder name
        iban:
          type: string
          example: DE62888888880012345678
          description: IBAN
        bic:
          type: string
          example: TESTDE88XXX
          description: BIC
        bank_name:
          type: string
          example: Testbank
          description: Bank name
        country_id:
          $ref: '#/components/schemas/country_id'
        testmode:
          type: string
          example: '1'
          description: Indicates whether or not it is a test transaction
        created_at:
          type: string
          example: '2015-05-05 11:47:45'
          description: Date of creation
        metadata:
          $ref: '#/components/schemas/metadata'
        merchant_id:
          type: string
          example: ''
          description: Data will be returned unchanged
        object:
          type: string
          example: xs2a_risk
          description: 'Object type, in this case a xs2a_risk'
        xs2a_account_snapshot:
          $ref: '#/components/schemas/xs2a_account_snapshot_response'
        xs2a_age_verification_check:
          $ref: '#/components/schemas/xs2a_age_verification_check_response'
        xs2a_balance_check:
          $ref: '#/components/schemas/xs2a_balance_check_response'
        xs2a_balance_overview:
          $ref: '#/components/schemas/xs2a_balance_overview_response'
        xs2a_cashflow_overview:
          $ref: '#/components/schemas/xs2a_cashflow_overview_response'
        xs2a_chargeback_check:
          $ref: '#/components/schemas/xs2a_chargeback_check_response'
        xs2a_children_check:
          $ref: '#/components/schemas/xs2a_children_check_response'
        xs2a_risk_insurance_contract_check:
          $ref: '#/components/schemas/xs2a_risk_insurance_contract_check_response'
        xs2a_profit_loss_check:
          $ref: '#/components/schemas/xs2a_profit_loss_check_response'
        xs2a_income_check:
          $ref: '#/components/schemas/xs2a_income_check_response'
        xs2a_account_linked_offers_check:
          $ref: '#/components/schemas/xs2a_account_linked_offers_check_response'
        xs2a_credit_check:
          $ref: '#/components/schemas/xs2a_credit_check_response'
        xs2a_direct_debit_check:
          $ref: '#/components/schemas/xs2a_direct_debit_check_response'
        xs2a_fact_sheet_lists:
          $ref: '#/components/schemas/xs2a_fact_sheet_lists_response'
        xs2a_name_check:
          $ref: '#/components/schemas/xs2a_name_check_response'
        xs2a_overdraft_limit_check:
          $ref: '#/components/schemas/xs2a_overdraft_limit_check_response'
        xs2a_seizure_check:
          $ref: '#/components/schemas/xs2a_seizure_check_response'
        xs2a_standing_orders_check:
          $ref: '#/components/schemas/xs2a_standing_orders_check_response'
        xs2a_all_accounts_check:
          $ref: '#/components/schemas/xs2a_all_accounts_check_response'
        xs2a_account_status_check:
          $ref: '#/components/schemas/xs2a_account_status_check_response'
        xs2a_holder_identification_check:
          $ref: '#/components/schemas/xs2a_holder_identification_check_response'
        xs2a_risk_calculations_check:
          $ref: '#/components/schemas/xs2a_risk_calculations_check_response'
        xs2a_account_characteristics_check:
          $ref: '#/components/schemas/xs2a_account_characteristics_check_response'
        xs2a_collection_check:
          $ref: '#/components/schemas/xs2a_collection_check_response'
    RiskObjectWithLists:
      type: object
      properties:
        id:
          type: string
          example: xr_hd84kg9zns53lvh1
          description: Transaction id
        transaction:
          type: string
          example: 10001-xr-abcd-abcd
          description: >-
            Internal XS2A transaction id. This id will be the same for the whole
            transaction
        account_holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: Account holder name
        iban:
          type: string
          example: DE62888888880012345678
          description: IBAN
        bic:
          type: string
          example: TESTDE88XXX
          description: BIC
        bank_name:
          type: string
          example: Testbank
          description: Bank name
        country_id:
          $ref: '#/components/schemas/country_id'
        testmode:
          type: string
          example: '1'
          description: Indicates whether or not it is a test transaction
        created_at:
          type: string
          example: '2015-05-05 11:47:45'
          description: Date of creation
        metadata:
          $ref: '#/components/schemas/metadata'
        merchant_id:
          type: string
          example: ''
          description: Data will be returned unchanged
        object:
          type: string
          example: xs2a_risk
          description: 'Object type, in this case a xs2a_risk'
        xs2a_fact_sheet_lists:
          $ref: '#/components/schemas/xs2a_fact_sheet_lists_response_jsonlists'
    xs2a.risk.upload.json:
      type: array
      items:
        $ref: '#/components/schemas/xs2a.risk.upload.json.wrapper'
    xs2a.risk.upload.json.wrapper:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/xs2a.risk.upload.json.account'
        balance:
          $ref: '#/components/schemas/xs2a.risk.upload.json.balance'
        turnovers:
          type: array
          items:
            $ref: '#/components/schemas/xs2a.risk.upload.json.turnovers.turnover'
    xs2a.risk.upload.json.account:
      type: object
      required:
        - holder
        - description
        - iban
        - country_id
      properties:
        holder:
          type: string
        description:
          type: string
        iban:
          type: string
        bic:
          type: string
        bank_name:
          type: string
        country_id:
          $ref: '#/components/schemas/country_id'
        joint_account:
          type: boolean
    xs2a.risk.upload.json.balance:
      type: object
      required:
        - balance
        - limit
        - available
        - currency
      properties:
        balance:
          type: number
          format: float
          nullable: true
        limit:
          type: number
          format: float
        available:
          type: number
          format: float
        currency:
          $ref: '#/components/schemas/currency_id'
    xs2a.risk.upload.json.turnovers.turnover:
      type: object
      required:
        - booking_date
        - amount
        - currency
        - purpose
        - counter_iban
        - counter_bic
        - counter_holder
      properties:
        booking_date:
          type: string
        amount:
          type: number
          format: float
        currency_id:
          $ref: '#/components/schemas/currency_id'
        purpose:
          type: array
          items:
            type: string
        counter_iban:
          type: string
        counter_bic:
          type: string
        counter_holder:
          type: string
    xs2a.risk.upload.json.404:
      type: object
      properties:
        code:
          type: integer
          example: 404
        message:
          type: string
          example: Invalid WizardSession
    xs2a.risk.upload.json.422:
      type: object
      properties:
        code:
          type: integer
          example: 422
        message:
          type: string
          example: Validation error
    xs2a.risk.upload.json.500:
      type: object
      properties:
        code:
          type: integer
          example: 500
        message:
          type: string
          example: An internal server problem occurred
    xs2a.risk.upload.json.success:
      type: object
      properties:
        id:
          type: string
          example: xr_dfdsfdf34dsgds09g
        transaction:
          type: string
          example: 10001-xr-Hdfh-EWfdas
        account_holder:
          type: string
          example: Tink Germany
        iban:
          type: string
          example: DE8888888888888
        bic:
          type: string
          example: GIXXXXXGI
        bank_name:
          type: string
          example: Bankname
        country_id:
          $ref: '#/components/schemas/country_id'
        testmode:
          type: integer
          example: 1
        created_at:
          type: string
          example: "2020-01-01 10:00:00"
        metadata:
          $ref: '#/components/schemas/metadata'
        merchant_id:
          type: string
          example: MerchantID
        object:
          type: string
          example: xs2a_risk
    RisksTransactionList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/RiskObject'
    AccountSnapshotJSON2:
      type: array
      description: This response describes the JSON2 response of this endpoint
      items:
        $ref: '#/components/schemas/AccountStatement'
    AccountSnapshotJSON2TurnoverBookingText:
      type: array
      description: This response describes the JSON2 response of this endpoint
      items:
        $ref: '#/components/schemas/AccountStatementBookingText'
    AccountStatement:
      type: object
      properties:
        account:
          type: object
          properties:
            holder:
              type: string
              example: "MUSTERMANN, HARTMUT"
              description: Name of the account holder
            description:
              type: string
              example: Girokonto
              description: Name of the account
            iban:
              type: string
              example: "DE62888888880012345678"
              description: IBAN of the account
            bic:
              type: string
              example: "TESTDE88XXX"
              description: BIC of the account
            country_id:
              $ref: '#/components/schemas/country_id'
            joint_account:
              type: boolean
              example: false
              description: Indicates whether this is a joint account
        balance:
          type: object
          properties:
            available:
              type: number
              format: float
              nullable: true
              example: 3123.55
              description: >-
                The available amount. This can be null, if the available amount is
                not known.
            limit:
              type: number
              format: float
              nullable: true
              example: 1000.50
              description: >-
                The limit of the account. This can be null, if the limit is not
                known.
            balance:
              type: number
              format: float
              example: 2123.23
              description: The current account balance.
            currency:
              $ref: '#/components/schemas/currency_id'
            date:
              type: string
              example: '2017-12-06T00:00:00Z'
              description: The date the balance was seen on.
        turnovers:
          type: object
          description: array of turnovers
          properties:
            turnovers:
              type: array
              items:
                $ref: '#/components/schemas/Turnover'
            date:
              type: string
              example: '2018-07-09'
              description: Date of the account snapshot
            days:
              type: integer
              example: 10
              description: Indicates how many days the account snapshot includes
            filters:
              type: array
              description: Array of filters applied
              items:
                type: string
                example: "rent"
    AccountStatementBookingText:
      type: object
      properties:
        account:
          type: object
          properties:
            holder:
              type: string
              example: "MUSTERMANN, HARTMUT"
              description: Name of the account holder
            description:
              type: string
              example: Girokonto
              description: Name of the account
            iban:
              type: string
              example: "DE62888888880012345678"
              description: IBAN of the account
            bic:
              type: string
              example: "TESTDE88XXX"
              description: BIC of the account
            country_id:
              $ref: '#/components/schemas/country_id'
            joint_account:
              type: boolean
              example: false
              description: Indicates whether this is a joint account
        balance:
          type: object
          properties:
            available:
              type: number
              format: float
              nullable: true
              example: 3123.55
              description: >-
                The available amount. This can be null, if the available amount is
                not known.
            limit:
              type: number
              format: float
              nullable: true
              example: 1000.50
              description: >-
                The limit of the account. This can be null, if the limit is not
                known.
            balance:
              type: number
              format: float
              example: 2123.23
              description: The current account balance.
            currency:
              $ref: '#/components/schemas/currency_id'
            date:
              type: string
              example: '2017-12-06T00:00:00Z'
              description: The date the balance was seen on.
        turnovers:
          type: object
          description: array of turnovers
          properties:
            turnovers:
              type: array
              items:
                $ref: '#/components/schemas/TurnoverBookingText'
            date:
              type: string
              example: '2018-07-09'
              description: Date of the account snapshot
            days:
              type: integer
              example: 10
              description: Indicates how many days the account snapshot includes
            filters:
              type: array
              description: Array of filters applied
              items:
                type: string
                example: "rent"
    PayObject:
      type: object
      properties:
        id:
          type: string
          example: xp_fSdkfjS2R2S5x1pu
          description: Transaction id
        transaction:
          type: string
          example: 10001-xp-abcd-abcd
          description: >-
            Internal XS2A transaction id. This id will be the same for the whole
            transaction
        sender_holder:
          type: string
          example: Holder Customer
          description: Account holder of the sender account
        sender_iban:
          type: string
          example: DE62888888880012345678
          description: IBAN of the sender account
        sender_bic:
          type: string
          example: TESTDE88XXX
          description: BIC of the sender account
        sender_bank_name:
          type: string
          example: Testbank
          description: Name of the sender bank
        sender_country_id:
          $ref: '#/components/schemas/country_id'
        recipient_holder:
          type: string
          example: Holder
          description: Account holder of the recipient account
        recipient_iban:
          type: string
          example: DE62888888880012345678
          description: IBAN of the recipient account
        recipient_bic:
          type: string
          example: TESTDE88XXX
          description: BIC of the recipient account
        recipient_bank_name:
          type: string
          example: Testbank
          description: Name of the recipient bank
        recipient_country_id:
          $ref: '#/components/schemas/country_id'
        purpose:
          type: string
          example: Purpose
          description: Purpose of transfer
        amount:
          type: number
          format: float
          example: 10.99
          description: Amount to transfer
        currency_id:
          $ref: '#/components/schemas/currency_id'
        testmode:
          type: string
          example: '1'
          description: Indicates whether or not it is a test transaction
        payment_status:
          type: string
          enum: ['NONE', 'RECEIVED', 'LOSS']
          example: RECEIVED
          description: >-
            Payment status of the transaction.
            By default, this will be `NONE` and will not automatically be set to anything else, unless you
            are using the account reconciliation feature,
            or you are changing it yourself (either via the dashboard or the API).
            The status `NONE` means that the payment was initiated but not found on the recipient account (default value).
            The status `RECEIVED` means that the payment was found on the recipient account, which is determined either by the mentioned reconciliation feature 
            or manually by you. `LOSS` means, that the payment has not been found on the recipient account after >= 5 days.
            Maintaining clean and accurate tracking of `payment_status` helps you with fraud prevention. It allows you to specify rules in our fraud prevention tool (e.g. how many pending
            transactions (status `NONE`) you allow from a certain bank account.)
        metadata:
          $ref: '#/components/schemas/metadata'
        merchant_id:
          type: string
          example: ''
          description: Data will be returned unchanged
        object:
          type: string
          example: ''
          description: 'Object type, in this case a xs2a_payment'
    PayTransactionList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/PayObject'
    BankUserList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        next_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/api/users?page=2'
          description: 'URI to next page.'
        prev_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/api/users?page=1'
          description: 'URI to previous page.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankUser'
    BankUser:
      type: object
      properties:
        id:
          type: string
          example: bus_NIB48H6IiB57ySH1
          description: Bank user ID
        name:
          type: string
          example: Max Mustermann
          description: Name of the user
        email:
          type: string
          format: email
          example: user@example.com
          description: E-Mail of the test user
        testmode:
          type: boolean
          example: true
          description: True, if this user has been created with a testing API key, false otherwise.
        created_at:
          type: string
          example: '2017-12-14 16:52:44'
          description: Date of creation
        object:
          type: string
          example: bank_user
          description: The value bank_user
    AccessTokenList:
      type: object
      properties:
        total:
          type: integer
          example: 1
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 1
          description: 'Last page, usually the total of available pages.'
        next_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/api/users/{user-id}/accesstokens?page=2'
          description: 'URI to next page.'
        prev_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/api/users/{user-id}/accesstokens?page=1'
          description: 'URI to previous page.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 1
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/AccessToken'
    AccessToken:
      properties:
        id:
          type: string
          example: uat_MEYAT0R7Gm2vkZtU
          description: access Token ID
        token:
          type: string
          example: 4K9JaNOhnCknZJyAXHKkrS6g0Ik7V0CX
          description: The Access Token
        valid_until:
          type: string
          example: '2018-03-22 12:14:58'
          description: >-
            The date-time this token expires. Note that the access token is
            valid for one hour. After one hour you have to refresh the token, to
            be valid another hour.
        created_at:
          type: string
          example: '2018-03-16 11:14:58'
          description: Date of creation
        object:
          type: string
          example: bank_user_access_token
          description: The value bank_user_access_token
    BankConnectionList:
      type: object
      properties:
        total:
          type: integer
          example: 1
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 1
          description: 'Last page, usually the total of available pages.'
        next_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/connections?page=2'
          description: 'URI to next page.'
        prev_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/connections?page=1'
          description: 'URI to previous page.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 1
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankConnection'
    BankConnection:
      properties:
        id:
          type: string
          example: bcn_BnB6mQLsHKZacYvC
          description: Bank Connection ID
        transaction:
          type: string
          example: 10001-bcs-jLnP-HYGI
          description: Internally used XS2A transaction id.
        bic:
          type: string
          example: TESTDE88XXX
          description: BIC of the bank of the bank connection
        bank_name:
          type: string
          example: Testbank
          description: The name of the bank of the bank connection
        country_id:
          $ref: '#/components/schemas/country_id'
        sync_mode:
          $ref: '#/components/schemas/sync_mode'
        sync_active:
          type: boolean
          example: true
          description: Indicates whether the sync is active
        sync_message:
          type: string
          example: ''
          description: '???'
        sync_fail_counter:
          type: integer
          example: 0
          description: A counter of failed syncs for this connection
        last_synced:
          type: string
          example: '2017-12-06 13:07:25'
          description: The date when the connection was last synced
        consent_valid_until:
          type: string
          example: '2020-12-06'
          description: 'The consent is valid until the given date (Format: YYYY-MM-DD).'
        testmode:
          type: boolean
          example: true
          description: Indicates whether this bank connection is in test mode
        created_at:
          type: string
          example: '2018-03-16 11:14:58'
          description: Date of creation
        object:
          type: string
          example: bank_connection
          description: The value bank_connection
    BankAccountsList:
      type: object
      properties:
        total:
          type: integer
          example: 1
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 1
          description: 'Last page, usually the total of available pages.'
        next_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/accounts?page=2'
          description: 'URI to next page.'
        prev_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/accounts?page=1'
          description: 'URI to previous page.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 1
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/BankAccount'
    BankAccount:
      properties:
        id:
          type: string
          example: bac_c8KYwjexO2iO5AE9
          description: Bank Account ID
        bank_connection_id:
          type: string
          example: bcn_xxxxxxxxxxxxxxxx
          description: Id of the originating BankConnection.
        holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: Name of the account holder as reported by the bank
        iban:
          type: string
          example: DE62888888880012345678
          description: IBAN of the bank account
        description:
          type: string
          example: Girokonto
          description: Description of the bank account
        bic:
          type: string
          example: TESTDE88XXX
          description: BIC of the bank account
        account_number:
          type: string
          example: '1234567890'
          description: 'Number of the account'
        bank_code:
          type: string
          example: '88888888'
          description: 'bank code of the bank'
        bank_name:
          type: string
          example: 'Testbank'
          description: 'name of the bank'
        country_id:
          $ref: '#/components/schemas/country_id'
        type:
          type: string
          enum: ['giro', 'creditcard', 'savings', 'loan', 'securities', 'wallet', 'other']
          example: giro
          description: The type of the bank of the bank connection
        joint_account:
          type: boolean
          example: false
          description: Indicates whether this account has more than one owner.
        transaction_possible:
          type: string
          example: "1"
          description: Indicates whether this account places payments ("1" for true, "0" for false).
        created_at:
          type: string
          example: '2018-03-16 11:14:58'
          description: Date of creation
        object:
          type: string
          example: bank_account
          description: The value bank_account
    BankAccountBalance:
      properties:
        id:
          type: string
          example: bac_c8KYwjexO2iO5AE9
          description: Bank Account ID
        available:
          type: number
          format: float
          nullable: true
          example: 3123.99
          description: >-
            The available amount. This can be null, if the available amount is
            not known.
        limit:
          type: number
          format: float
          nullable: true
          example: 1000.99
          description: >-
            The limit of the account. This can be null, if the limit is not
            known.
        balance:
          type: number
          format: float
          nullable: true
          example: 2123.99
          description: The current account balance.
        currency_id:
          $ref: '#/components/schemas/currency_id'
        date:
          type: string
          example: '2017-12-06T00:00:00Z'
          description: The date the balance was seen on.
        created_at:
          type: string
          example: '2018-03-16 11:14:58'
          description: Date of creation
        object:
          type: string
          example: bank_account
          description: The value bank_account
    BankAccountTurnovers:
      properties:
        id:
          type: string
          example: bac_c8KYwjexO2iO5AE9
          description: Bank Account ID
        turnovers:
          type: array
          items:
            $ref: '#/components/schemas/Turnover'
          description: The list of turnovers.
        days:
          type: integer
          example: 59
          description: The number of days requested
        date:
          type: string
          example: '2017-12-06T00:00:00Z'
          description: The date the turnovers were seen on.
        created_at:
          type: string
          example: '2018-03-16 11:14:58'
          description: Date of creation of the turnovers object.
        object:
          type: string
          example: bank_account_turnovers
          description: The value bank_account_turnovers
    Turnover:
      properties:
        booking_date:
          type: string
          example: '2017-10-08T00:00:00Z'
          description: The booking date.
        amount:
          type: number
          format: float
          example: -962
          description: The turnover amount. Negative for expenditures.
        currency_id:
          $ref: '#/components/schemas/currency_id'
        purpose:
          type: array
          items:
            type: string
            example: SEPA-DAUERAUFTRAG EMPFAENGER HAUSVERWALTUNG
          description: >-
            A string array of purpose lines. The contents vary from bank to
            bank.
        counter_iban:
          type: string
          example: DE18701693100100029394
          description: The counter IBAN of the booking. This is not always present.
        counter_bic:
          type: string
          example: GENODEF1ALX
          description: The counter BIC of the booking. This is not always present.
        counter_holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: The counter holder of the booking. This is not always present.
        prebooked:
          type: boolean
          example: false
          description: 'True, if the turnover has not been booked yet'
        canceled:
          type: boolean
          example: true
          description: 'True, if the turnover has been canceled.'
        tags:
          type: array
          items:
            type: string
            example: expenditure
          description: >-
            An array of strings of tags for this turnover. Find all possible
            tags here: https://manage.xs2a.com/documentation/tags
        category_id:
          type: string
          example: 'K.1.2'
          description: >-
            The ID of the category found for this turnover.
            
            
            The structure of this `category_id` string is hierarchical, meaning, 
            the more numbers there are, the more detailed the category is. For example, while `K.1` means "expenses for wholesale and retail trade", some 
            turnovers might be categorized more detailed as `K.1.1` ("expenses in retail stores"), or even as `K.1.1.1`
            ("groceries full-range trader"). You can find the complete list of categories [here](https://manage.xs2a.com/documentation/categories).


            **NOTE**: As new categories are introduced and the categorization itself is improved constantly, it is possible that 
            the same turnover can be categorized with a different (more detailed) `category_id` at a future point in time. You should develop your application in such a way, 
            that, for example, if your logic relies on something happening when a `category_id` is `K.1.1`, but you get `K.1.2` for which no logic is in place (because it might be 
            a new `category_id` or the turnover is now categorized more detailed), **you should always fall back to the next higher level category**, in this case `K.1`. This way, your logic can 
            still handle the turnover based on a more general category, while not throwing an error.
        creditor_id:
          type: string
          example: 'LU96ZZZ0000000000000000058'
          description: 'The ID of the creditor.'
        new:
          type: boolean
          example: true
          description: 'True, if this turnover is new since the last sync.'
        transaction_id:
          type: string
          example: '8943aefb-ec2b-46fa-8a38-dc264af13eb3'
          description: 'The transaction-ID for the turnovers.'
        booking_text:
          type: string
          example: 'LASTSCHRIFT'
          description: 'The turnover booking text.'
        purpose_code:
          type: string
          example: 'SALA'
          description: 'A turnover SEPA purpose code.'
        reason_code:
          type: string
          example: 'RUECKLASTSCHRIFT Rueckgabe mangels Deckung'
          description: 'A turnover SEPA reason code, which provides an explanation for the non-execution of the account-holding bank.'
        mandate_id:
          type: string
          example: 'MRN1234567890'
          description: 'A turnover mandate id.'
        endToEnd_id:
          type: string
          example: 'LO-123-1234567890'
          description: 'A turnover endToEnd id.'
        bank_transaction_code:
          type: string
          example: 'PMNT'
          description: 'A turnover bank transaction code in ISO 20022 format.'
        swift_transaction_code:
          type: string
          example: 'NTRF+153+00931'
          description: 'A turnover SWIFT transaction code in MT940 format.'
    TurnoverBookingText:
      properties:
        booking_date:
          type: string
          example: '2017-10-08T00:00:00Z'
          description: The booking date.
        amount:
          type: number
          format: float
          example: -962
          description: The turnover amount. Negative for expenditures.
        currency:
          $ref: '#/components/schemas/currency_id'
        purpose:
          type: array
          items:
            type: string
            example: SEPA-DAUERAUFTRAG EMPFAENGER HAUSVERWALTUNG
          description: >-
            A string array of purpose lines. The contents vary from bank to
            bank.
        booking_text:
          type: string
          example: LASTSCHRIFT
          description: The booking text of the purpose. This is not always present.
        counter_iban:
          type: string
          example: DE18701693100100029394
          description: The counter IBAN of the booking. This is not always present.
        counter_bic:
          type: string
          example: GENODEF1ALX
          description: The counter BIC of the booking. This is not always present.
        counter_holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: The counter holder of the booking. This is not always present.
        prebooked:
          type: boolean
          example: false
          description: 'True, if the turnover has not been booked yet'
        canceled:
          type: boolean
          example: true
          description: 'True, if the turnover has been canceled.'
        tags:
          type: array
          items:
            type: string
            example: expenditure
          description: >-
            An array of strings of tags for this turnover. Find all possible
            tags here: https://manage.xs2a.com/documentation/tags
        category_id:
          type: string
          example: 'K.1.2'
          description: >-
            The ID of the category found for this turnover.
            
            
            The structure of this `category_id` string is hierarchical, meaning, 
            the more numbers there are, the more detailed the category is. For example, while `K.1` means "expenses for wholesale and retail trade", some 
            turnovers might be categorized more detailed as `K.1.1` ("expenses in retail stores"), or even as `K.1.1.1`
            ("groceries full-range trader"). You can find the complete list of categories [here](https://manage.xs2a.com/documentation/categories).
            
            
            **NOTE**: As new categories are introduced and the categorization itself is improved constantly, it is possible that 
            the same turnover can be categorized with a different (more detailed) `category_id` at a future point in time. You should develop your application in such a way, 
            that, for example, if your logic relies on something happening when a `category_id` is `K.1.1`, but you get `K.1.2` for which no logic is in place (because it might be 
            a new `category_id` or the turnover is now categorized more detailed), **you should always fall back to the next higher level category**, in this case `K.1`. This way, your logic can 
            still handle the turnover based on a more general category, while not throwing an error.
        creditor_id:
          type: string
          example: 'LU96ZZZ0000000000000000058'
          description: 'The ID of the creditor.'
        new:
          type: boolean
          example: true
          description: 'True, if this turnover is new since the last sync.'
    EventObject:
      type: object
      properties:
        id:
          type: string
          example: ev_fhDFdPRtECqwOlys
          description: Transaction id
        transaction:
          type: string
          example: xv_eR08AnBz7CeBKnzp
          description: >-
            The transaction ID this object belongs to. May be null for some
            events.
        type:
          $ref: '#/components/schemas/EventType'
        data:
          type: object
          additionalProperties: true
          oneOf:
            - $ref: '#/components/schemas/RiskObject'
            - $ref: '#/components/schemas/PayObject'
            - $ref: '#/components/schemas/BankConnection'
          description: >-
            The object, that this event relates to. This is usually a
            transaction object.
        testmode:
          type: string
          example: '1'
          description: Indicates whether or not this event belongs to a test transaction
        message:
          type: string
          example: Transaction xv_eR08AnBz7CeBKnzp created.
          description: A human readable message that describes this event.
        created_at:
          type: string
          example: ''
          description: The date the event was fired.
        object:
          type: string
          example: xs2a_event
          description: xs2a_event for event objects.
    EventType:
      type: string
      enum: ['bank_accounts.new_turnovers','bank_accounts.sync_finished','bank_connection.sync_expires','transaction.updated','transaction.created','transaction.deleted','bank_accounts.new_bank_account','bank_accounts.sync_failed','bank_connection.disabled','test.webhook']
      description: The type of the event
    EventsList:
      type: object
      properties:
        total:
          type: integer
          example: 26
          description: Total number of results.
        per_page:
          type: integer
          example: 15
          description: Number of objects per page
        current_page:
          type: integer
          example: 1
          description: Current page.
        last_page:
          type: integer
          example: 15
          description: 'Last page, usually the total of available pages.'
        next_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/risks/{transaction-id}/events?page=2'
          description: 'URI to next page.'
        prev_page_url:
          type: string
          nullable: true
          example: 'https://api.xs2a.com/v1/risks/{transaction-id}/events?page=1'
          description: 'URI to previous page.'
        from:
          type: integer
          example: 1
          description: Showing results from index element.
        to:
          type: integer
          example: 15
          description: Showing results to index element.
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventObject'
    xs2a.risk:
      type: object
      properties:
        bank_code:
          type: integer
          example: 88888888
          description: >-
            bank code of the customers bank, requires also parameter country_id.
            If supplied the step/page for entering a bank code will be skipped.
        country_id:
          $ref: '#/components/schemas/country_id'
        account_number:
          type: string
          example: 123123
          description: >-
            The (national) account number of the customer. Is the account number
            valid, an IBAN will be calculated using the bank code and the
            account number. Afterwards the procedure is equal to the following
            description for iban (see below). If you include this field, you
            must also include the parameter bank_code.
        iban:
          type: string
          example: DE62888888880012345678
          description: >-
            IBAN of the customer. If it is a valid IBAN, the IBAN will be pinned
            for the current session. The customer will not be able to choose a
            different account, even if there are more accounts available to
            chose from. If the given IBAN is not in the customer list of
            accounts, the transaction will be aborted. In the case of an invalid
            IBAN XS2A will return a validation error with HTTP status code 422.
        bic:
          type: string
          example: TESTDE88XXX
          description: >-
            BIC of the customer. If the given BIC is valid, the step/page for
            entering a bank code will be skipped.
        check_amount:
          type: number
          format: float
          example: 100.45
          description: The account balance amount to be checked against.
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
        metadata:
          $ref: '#/components/schemas/metadata'
        merchant_id:
          type: string
          example: ''
          description: 'The internal ID of your merchant, if any.'
        fints_product_id:
          type: string
          example: ''
          description: 'The fints product ID can be enclosed in the initial request. If you have an eIDAS certificate, then you have to send it with every request.'
        easy_onboarding:
          $ref: '#/components/schemas/easy_onboarding'
        language:
          $ref: '#/components/schemas/language'
#New entries of risk check should be sorted by alphabet.
        xs2a_account_characteristics_check:
          $ref: '#/components/schemas/xs2a_account_characteristics_check'
        xs2a_account_linked_offers_check:
          $ref: '#/components/schemas/xs2a_account_linked_offers_check'
        xs2a_account_snapshot:
          $ref: '#/components/schemas/xs2a_account_snapshot'
        xs2a_account_status_check:
          $ref: '#/components/schemas/xs2a_account_status_check'
        xs2a_age_verification_check:
          $ref: '#/components/schemas/xs2a_age_verification_check'
        xs2a_all_accounts_check:
          $ref: '#/components/schemas/xs2a_all_accounts_check'
        xs2a_balance_check:
          $ref: '#/components/schemas/xs2a_balance_check'
        xs2a_balance_overview:
          $ref: '#/components/schemas/xs2a_balance_overview'
        xs2a_cashflow_overview:
          $ref: '#/components/schemas/xs2a_cashflow_overview'
        xs2a_chargeback_check:
          $ref: '#/components/schemas/xs2a_chargeback_check'
        xs2a_children_check:
          $ref: '#/components/schemas/xs2a_children_check'
        xs2a_collection_check:
          $ref: '#/components/schemas/xs2a_collection_check'
        xs2a_credit_check:
          $ref: '#/components/schemas/xs2a_credit_check'
        xs2a_direct_debit_check:
          $ref: '#/components/schemas/xs2a_direct_debit_check'
        xs2a_fact_sheet_lists:
          $ref: '#/components/schemas/xs2a_fact_sheet_lists'
        xs2a_holder_identification_check:
          $ref: '#/components/schemas/xs2a_holder_identification_check'
        xs2a_income_check:
          $ref: '#/components/schemas/xs2a_income_check'
        xs2a_insurance_contract_check:
          $ref: '#/components/schemas/xs2a_insurance_contract_check'
        xs2a_name_check:
          $ref: '#/components/schemas/xs2a_name_check'
        xs2a_overdraft_limit_check:
          $ref: '#/components/schemas/xs2a_overdraft_limit_check'
        xs2a_profit_loss_check:
          $ref: '#/components/schemas/xs2a_profit_loss_check'
        xs2a_risk_calculations_check:
          $ref: '#/components/schemas/xs2a_risk_calculations_check'
        xs2a_seizure_check:
          $ref: '#/components/schemas/xs2a_seizure_check'
        xs2a_standing_orders_check:
          $ref: '#/components/schemas/xs2a_standing_orders_check'
    xs2a.api.users:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: Max Mustermann
          description: The name of the user.
        email:
          type: string
          format: email
          example: user@example.com
          description: The email of the user.
    xs2a.api.users.accesstokens:
      type: object
      properties:
        valid_until:
          type: string
          example: '2018-03-22 12:14:58'
          description: 'The accesstoken is valid until the given date (Format: YYYY-MM-DD hh:mm:ss).'
    xs2a.api.connections:
      type: object
      properties:
        sync_mode:
          $ref: '#/components/schemas/sync_mode'
        bic:
          type: string
          example: TESTDE88XXX
          description: 'The BIC of the bank, if known already.'
        country_id:
          $ref: '#/components/schemas/country_id'
        days:
          type: integer
          example: 60
          description: 'Number of days for collecting turnovers from bank account'
        limit_days:
          type: integer
          example: 60
          description: 'Number of days to limit the resulting account. After every sync the account will be limited to that amount of days.'
        account_selection:
          type: string
          enum:
            - all
            - multi
            - single
          description: 'Mode of account selection. If "all" is given, all available accounts from this bankconnection will be used. If "single"/"multi" is given, the customer can pick single/multiple accounts from this connection which will be used.'
          default: all
        language:
          type: string
          enum:
            - de
            - en
          default: en
          description: Desired language in which the customer interface will be rendered with.
        fints_product_id:
          type: string
          example: ''
          description: 'The fints product ID can be enclosed in the initial request. If you have an eIDAS certificate, then you have to send it with every request.'
    xs2a.api.connections.sync:
      type: object
      properties:
        credentials:
          type: string
          description: '**Only required** if the sync mode is *shared*: Your part of the shared credentials.'
        force:
          type: boolean
          example: true
          description: >-
            If an error occurred during syncing, you may force a retry. If the
            sync_fail_counter goes up to 3 no more syncs are allowed.
    WizardAPIRequest:
      type: object
      description: >-
        Key is a required parameter here in every request. Next to action, you can send
        any key-value pairs corresponding to the form responses you get.
      required:
        - key
      additionalProperties:
        type: string
        description: >-
          The request object can contain any key-value pair corresponding to the form elements of the previously 
          received response, where the key is the name of a form element, and the value is whatever you collect on your frontend.
          For example, if the previous response you received contained a form element with `"type": "text"` 
          and `"name": "password"`, then you should send `"password": "VALUE"`, where `"VALUE"` is collected by your frontend.
      properties:
        key:
          type: string
          example: ws_xxxxxxxxxxxxxxxx
          description: The wizard session key.
        action:
          type: string
          enum: ['switch-login-tabs', 'back', 'poll', 'change-language', 'abort', 'complete-bankcodes']
          example: back
          description: >-
            Valid values are: back (go back one step), switch-login-tabs (switch
            to another transport), poll (status polling), change-language
            (change the language) and abort (abort the transaction).
    xs2a_account_snapshot:
      type: object
      properties:
        days:
          type: integer
          example: 365
          description: 'Range in days which should be used (min value: 10, max value: 365)'
        from:
          type: string
          example: YYYY-MM-DD
          description: A date in the format yyyy-mm-dd
        to:
          type: string
          example: YYYY-MM-DD
          description: A date in the format yyyy-mm-dd
        filters:
          $ref: '#/components/schemas/filters'
        all_accounts:
          type: boolean
          example: true
          description: 'True, if you want to receive all accounts including their turnovers'
        all_tags:
          type: boolean
          example: true
          description: 'True, if you want full categorization of the turnovers'
    xs2a.pay:
      type: object
      required:
        - amount
        - currency_id
        - purpose
        - recipient_holder
        - recipient_iban
      properties:
        amount:
          type: number
          format: float
          example: 1.5
          description: >-
            The amount to be transferred, either in EUR or CHF (depending on `currency_id`).
            This is a float, meaning for i.e. 1,50 Euro, you would send `1.5`, and for 15 Euro, you would send `15.0`.
        currency_id:
          $ref: '#/components/schemas/currency_id'
        purpose:
          type: string
          minLength: 5
          maxLength: 140
          example: Purpose
          description: >-
            We suggest to keep the purpose as short as possible (between 5 and 140 characters) and to place
            critical information at the beginning of the purpose. The reason for
            this suggestion is that we might have to limit the length of your
            given purpose. A SEPA purpose can be up to 140 characters. However
            some banks only offer a reference field which is limited to 35
            characters. If your purpose is longer than bank supported purpose
            field, we will shorten it to the maximum length supported by that
            bank. Not all characters are supported for the purpose field. Sender
            banks impose different rules for the purpose field, therefore we
            suggest to limit the character set to a-z, A-Z, 0-9. If you use
            other characters please be advised that we might have to remove or
            replace characters considered invalid by the sender bank. We usually
            will replace the invalid characters with a whitespace or normalize
            the characters.
        recipient_holder:
          type: string
          example: Holder
          description: >-
            Sender banks impose different rules for the recipient_holder field,
            we suggest to limit the character set to a-z, A-Z, 0-9. If you use
            other characters please be advised that we might have to remove or
            replace characters considered invalid by the sender bank. We usually
            will replace the invalid characters with a whitespace or normalize
            the characters.
        recipient_iban:
          type: string
          example: DE04888888880087654321
          description: IBAN of the recipient account
        metadata:
          $ref: '#/components/schemas/metadata'
        language:
          $ref: '#/components/schemas/language'
        merchant_id:
          type: string
          example: ''
          description: >-
            The internal ID of your merchant, if any. You may fill this field
            with the internal ID your merchant, if you are a PSP.
        fints_product_id:
          type: string
          example: ''
          description: >-
            The fints product ID can be enclosed in the initial request. If you have an eIDAS certificate, then you have to send it with every request.
        with_intermission:
          type: boolean
          example: true
          description: >-
            If you send true for this flag, the session will be sent into a waiting ('intermission') state after the account step, during which you
            do any asynchronous operations (i.e. [retrieve account snapshot](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1accountSnapshot/get)), and then decide to either [veto](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1veto/post) or [resume](#tag/Sessions-API/paths/~1sessions~1{transaction-id}~1resume/post) the session.
        easy_onboarding:
          $ref: '#/components/schemas/easy_onboarding'
        sender_holder:
          type: string
          example: ''
          description: >-
            Name of the sender account holder. If this is set, the account
            holder will be pinned and validated for the current session. The
            customer will not be able to choose an account with a different name
            than provided. The name will be compared with our XS2A.name_check
            module. A match is not only string equals. To a certain point
            changes in the name will be tolerated. (i.e. a prepending academic
            title will not break the match). If you have first name and surname separately,
            you have to pass them with delimiter `|||`. This will improve the name
            comparison with account holder.
            example: `Max|||Mustermann`
        sender_iban:
          type: string
          example: ''
          description: >-
            IBAN of the sender account. If it is a valid IBAN, the IBAN will be
            pinned for the current session. The customer will not be able to
            choose a different account, even if there are more accounts
            available to chose from. If the given IBAN is not in the customer
            list of accounts, the transaction will be aborted. In the case of an
            invalid IBAN XS2A will return a validation error with HTTP status
            code 422.
        sender_bic:
          type: string
          example: ''
          description: >-
            BIC of the sender account. If the given BIC is valid, the step/page
            for entering a bank code will be skipped.
        sender_country_id:
          $ref: '#/components/schemas/country_id'
        sender_bank_code:
          type: string
          example: ''
          description: >-
            National bank code of the sender account.
        recipient_bic:
          type: string
          example: TESTDE88XXX
          description: BIC of the recipient account
        recipient_street:
          type: string
          example: ''
          description: Street of the recipient account. **Required if `sender_country_id` is `CH`**
        recipient_zip:
          type: string
          example: ''
          description: Zip-code of the recipient account. **Required if `sender_country_id` is `CH`**
        recipient_city:
          type: string
          example: ''
          description: City of the recipient account. **Required if `sender_country_id` is `CH`**
        recipient_country_id:
          $ref: '#/components/schemas/country_id'
    xs2a_account_snapshot_response:
      type: object
      properties:
        object:
          type: string
          example: xs2a_account_snapshot
          description: Object type, in this case a xs2a_account_snapshot
        days:
          type: integer
          example: 45
          description: Range in days that were used
        from:
          type: string
          example: "0000-12-27"
          description: The start date in the format yyyy-mm-dd
        to:
          type: string
          example: "0000-12-30"
          description: The end date in the format yyyy-mm-dd
        filters:
          type: array
          items:
            type: string
            example: rent, income
          description: Filter account statements
        all_tags:
          type: string
          example: '1'
          description: 1, if the turnovers were fully categorized, 0 otherwise
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_age_verification_check_response:
      type: object
      properties:
        confirmed:
          type: boolean
          example: true
          description: Verify legal age of account holder
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
        object:
          type: string
          example: xs2a_age_verification_check
          description: Object type, in this case a xs2a_age_verification_check
    xs2a_balance_check_response:
      type: object
      properties:
        object:
          type: string
          example: xs2a_balance_check
          description: Object type, in this case a xs2a_balance_check
        check_amount:
          type: integer
          example: 100
          description: Account balance amount to be checked against
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
        check_passed:
          type: string
          example: "1"
          description: 'Indicates whether or not the check was successful ("1" for true, "0" for false)'
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_balance_overview_response:
      type: object
      properties:
        object:
          type: string
          example: xs2a_balance_overview
          description: Object type, in this case a xs2a_balance_overview
        balance:
          type: number
          format: float
          nullable: true
          example: 135.99
          description: Current balance
        available:
          type: number
          format: float
          example: 1135.99
          nullable: true
          description: Current available
        limit:
          type: number
          format: float
          example: 1000.99
          nullable: true
          description: Current limit (overdraft)
        currency_id:
          $ref: '#/components/schemas/currency_id'
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_cashflow_overview_response:
      type: object
      properties:
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
        object:
          type: string
          example:  xs2a_cashflow_overview
          description: Object type, in this case a  xs2a_cashflow_overview
        cashflow:
          type: array
          items:
            $ref: '#/components/schemas/xs2a_cashflow_object'
    xs2a_cashflow_object:
      type: object
      properties:
        month:
          type: integer
          example: 0
          description: Relative month, e.g. current is 0, previous month is -1 and so on
        incoming:
          type: number
          format: float
          example: 543.25
          description: Amount of this month incoming transactions
        outgoing:
          type: number
          format: float
          example: 234.21
          description: Amount of this month outgoing transactions
        minimum_balance:
          type: number
          format: float
          example: 135.52
          description: The minimum (lowest) balance of the account in that month
        incoming_transactions:
          type: integer
          example: 0
          description: A count of this month incoming transactions
        outgoing_transactions:
          type: integer
          example: 0
          description: A count of this month outgoing transactions
        currency_id:
          $ref: '#/components/schemas/currency_id'
    xs2a_chargeback_check_response:
      type: object
      properties:
        chargebacks_count:
          type: integer
          example: 2
          description: Total count of detected chargeback transactions
        chargebacks_coverage:
          type: integer
          example: 1
          description: Count of chargebacks which was triggered due insufficient funds
        chargebacks_revoked:
          type: integer
          example: 1
          description: Count of chargebacks which was triggered manually
        chargebacks_sum_amount:
          type: number
          format: float
          example: 43.20
          description: Sum over the amount of all chargebacks
        currency_id:
          $ref: '#/components/schemas/currency_id'
        object:
          type: string
          example:  xs2a_chargeback_check
          description: Object type, in this case a  xs2a_chargeback_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_children_check_response:
      type: object
      properties:
        children_at_account_holder:
          type: integer
          example: 0
          description: Calculated count of children
    xs2a_risk_insurance_contract_check_response:
      type: object
      properties:
        result:
          type: object
          properties:
            category_id:
              type: string
              example: "K.8.1.1.2"
            counter_iban:
              type: string
              example: ""
            counter_holder:
              type: string
              example: "Max Mustermann"
            insurance_policy_number:
              type: array
              items:
                type: string
              example: [ "111111-V" ]
            count:
              type: integer
              example: 1
            periodicity:
              type: string
              example: ""
            last_amount:
              type: integer
              format: float
              example: -30.36
            average_amount:
              type: integer
              format: float
              example: -30.36
            total_amount:
              type: integer
              format: float
              example: -30.36
            meta_data:
              type: array
              items:
                type: string
              example: [ ]
    xs2a_profit_loss_check_response:
      type: object
      properties:
        result:
          type: object
          properties:
            tax_ids:
              type: array
              items:
                type: string
              example: ['123/456/7890']
            profit_loss:
              type: object
              properties:
                period_start:
                  type: string
                  example: '2019-02-01'
                period_end:
                  type: string
                  example: '2019-04-30'
                period_days:
                  type: integer
                  example: 90
                turnover_income:
                  type: number
                  format: float
                  example: 2452.23
                cash_deposit:
                  type: number
                  format: float
                  example: 123.55
                other_income:
                  type: number
                  format: float
                  example: 2456.23
                rent_expense:
                  type: number
                  format: float
                  example: 256.56
                supplies_expense:
                  type: number
                  format: float
                  example: 4535.82
                personnel_expense:
                  type: number
                  format: float
                  example: 45345.12
                tax_expense:
                  type: number
                  format: float
                  example: 43534.63
                other_expense:
                  type: number
                  format: float
                  example: 34234.25
                cashflow:
                  type: number
                  format: float
                  example: 3434324234.52
                cashflow_revenue_ratio:
                  type: number
                  format: float
                  example: 0.12
    xs2a_income_check_response:
      type: object
      properties:
        data:
          type: object
          properties:
            full_months_count:
              type: integer
              example: 2
            category_short_name:
              type: object
              properties:
                monthly_sums:
                  $ref: '#/components/schemas/monthlySums'
                months_sums_median:
                  type: number
                  format: float
                  example: 234.25
                months_sums_minimum:
                  type: number
                  format: float
                  example: 123.62
                min_date:
                  type: string
                  example: '2019-02-01'
                max_date:
                  type: string
                  example: '2019-05-01'
                current_payment:
                  type: boolean
                  example: true
                forecast:
                  type: number
                  format: float
                  example: 786.25
                forecast_month_count:
                  type: integer
                  example: 3
                current_employers:
                  type: integer
                  example: 3
                employer:
                  $ref: '#/components/schemas/employer'
        created_at:
          type: string
          example: '2030-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_account_linked_offers_check_response:
      type: object
      properties:
        links:
          type: array
          items:
            type: object
            properties:
              link:
                type: string
                example: 'https://xs2a.com/ad/adl_Erab3azqBjyTtm5d/alo_BAuSoMgqt0vgGuuS'
              description:
                type: string
                example: 'FinTecSystem GmbH'
              image:
                type: string
                example: 'base64'
    xs2a_credit_check_response:
      type: object
      properties:
        checks:
          type: array
          items:
            type: string
            example: income, credit
          description: Indicates which checks were performed
        check_days:
          type: integer
          example: 30
          description: Range in days that were used to calculated and gather the desired information
        results:
          type: object
          description: The keys are the names of the requested checks.
          properties:
            income:
              $ref: '#/components/schemas/checksResult'
            rent:
              $ref: '#/components/schemas/checksResult'
        object:
          type: string
          example:  xs2a_credit_check
          description: Object type, in this case a  xs2a_credit_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_direct_debit_check_response:
      type: object
      properties:
        check_amount:
          type: number
          format: float
          example: 123.99
          description: Account balance amount to be checked against
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
        start_date:
          type: string
          example: '2014-03-23'
          description: >-
            An optional field. The date format is "YYYY-mm-dd".
            If a start_date is given, the field "end_date" has to be set as well.
            The start date can be no earlier than the day after the transaction. 
            In case the start date is invalid or not set, the earliest bank work 
            day will be used.
        end_date:
          type: string
          example: '2014-03-31'
          description: >-
            An optional field. The date format is "YYYY-mm-dd". The end date has to be
            at lest 3 days after the start date and can be a maximum of 30 days into the 
            future. If there is no end date given, the maximum of 30 days will be used.
        recommendation:
          type: string
          enum: ['DATE', 'ANY', 'REJECT']
          example: DATE
          description: >-
            This field represents the response from our system. The values will either be ANY, 
            DATE or REJECT. If ANY is returned, it should be save to execute the direct debit at 
            any time. If DATE is returned, we suggest a date for executing the direct debit 
            in the field recommendation_date. In case of a REJECT it is not recommended to 
            execute a direct debit, because the amount is likely not be covered. For a REJECT 
            the returned recommendation_date will always be "0000-00-00".
        recommendation_date:
          type: string
          example: '2014-03-25'
          description: >-
            If the recommendation is DATE, this will be the recommended time to execute 
            a direct debit. In some cases, this date might be out of the start-/end-date 
            range supplied (reasons might be holidays etc.). In case of REJECT this field 
            will always be set as "0000-00-00".
        object:
          type: string
          example:  xs2a_direct_debit_check
          description: Object type, in this case a  xs2a_direct_debit_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_name_check_response:
      type: object
      properties:
        name:
          type: string
          description: the last name that was used for the check
        firstname:
          type: string
          description: the first name that was used for the check
        match:
          type: string
          example: "0"
          description: '"1" if a match, "0" if not'
        similarity:
          type: integer
          example: 50
          description: The similarity of the provided and actual name
        created_at:
          type: string
          example: "2021-08-11 13:10:36"
        object:
          type: string
          example:  xs2a_name_check
          description: Type of this object, in this case xs2a_name_check
    xs2a_fact_sheet_lists_response:
      type: object
      description: >-
        This module allows you to create a lists of filtered transaction data from the reference account.
        The request can be filtered using the appropriate filters based on a set number of days,
        categories and/or tags, min. and/or max. amount. As a result, several key characteristics
        are given per list: transaction total, available days, number of contra accounts,
        number of transactions. In addition, extensive lists of filtered turnovers,
        purposes and contra account holders can be downloaded using a specific endpoint.
      properties:
        fields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: "test"
              tags:
                type: array
                items:
                  type: string
                example: ["expenditure", "banking-fees"]
              categories:
                type: array
                items:
                  type: string
                example: ["K.8.2.1"]
              min_amount:
                type: number
                example: -20
              max_amount:
                type: number
                example: -2
        days:
          type: integer
          example: 180
        result:
          type: array
          items:
            properties:
              fields:
                type: object
                properties:
                  name:
                    type: string
                    example: "test"
                  categories:
                    type: array
                    items:
                      type: string
                    example: ["K.8.2.1"]
                  tags:
                    type: array
                    items:
                      type: string
                    example: ["expenditure", "banking-fees"]
                  min_amount:
                    type: number
                    example: -20
                  max_amount:
                    type: number
                    example: -2
              turnovers_count:
                type: integer
                example: 57
              sum_amounts:
                type: number
                format: float
                example: -481.81
              timespan:
                type: integer
                example: 1
              distinct_counter_holders:
                type: integer
                example: 14
              turnovers:
                type: integer
                example: 57
        created_at:
          type: string
          example: '2020-02-13 14:21:25'
          description: 'Creation date of the object'
        object:
          type: string
          example: "xs2a_fact_sheet_lists"
    xs2a_fact_sheet_lists_response_jsonlists:
      type: object
      description: >-
        This module allows you to create a lists of filtered transaction data from the reference account.
        The request can be filtered using the appropriate filters based on a set number of days,
        categories and/or tags, min. and/or max. amount. As a result, several key characteristics
        are given per list: transaction total, available days, number of contra accounts,
        number of transactions. In addition, extensive lists of filtered turnovers,
        purposes and contra account holders can be downloaded using a specific endpoint. With /jsonlists
        its possible so see all turnovers with all distinct counter holders.
      properties:
        fields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: "test"
              tags:
                type: array
                items:
                  type: string
                example: ["expenditure", "banking-fees"]
              categories:
                type: array
                items:
                  type: string
                example: ["K.8.2.1"]
              min_amount:
                type: number
                example: -20
              max_amount:
                type: number
                example: -2
        days:
          type: integer
          example: 180
        result:
          type: array
          items:
            properties:
              fields:
                type: object
                properties:
                  name:
                    type: string
                    example: "test"
                  categories:
                    type: array
                    items:
                      type: string
                    example: ["K.8.2.1"]
                  tags:
                    type: array
                    items:
                      type: string
                    example: ["expenditure", "banking-fees"]
                  min_amount:
                    type: number
                    example: -20
                  max_amount:
                    type: number
                    example: -2
              turnovers_count:
                type: integer
                example: 57
              sum_amounts:
                type: number
                format: float
                example: -481.81
              timespan:
                type: integer
                example: 1
              distinct_counter_holders:
                type: array
                items:
                  type: string
                example: ['Max Mustermann', 'Maxxi Musterfrau', 'Another Holder']
              turnovers:
                type: array
                items:
                  $ref: '#/components/schemas/TurnoverBookingText'
        created_at:
          type: string
          example: '2023-03-13 13:33:33'
          description: 'Creation date of the object'
        object:
          type: string
          example: "xs2a_fact_sheet_lists"
    xs2a_overdraft_limit_check_response:
      type: object
      properties:
        booking_days:
          type: integer
          example: 23
          description: Count of booking days in the date range found
        overdraft_limit_days:
          type: integer
          example: 23
          description: Count of days the account used the overdraft limit
        maximum_overdraft_used:
          type: number
          format: float
          example: -3760.13
          description: Maximum amount the overdraft was used in that date range
        average_overdraft_used:
          type: number
          format: float
          example: -2032.85
          description: Average amount the overdraft was used in that date range
        median_overdraft_used:
          type: number
          format: float
          example: -1466.21
          description: Median amount the overdraft was used in that date range
        currency_id:
          $ref: '#/components/schemas/currency_id'
        object:
          type: string
          example:  xs2a_overdraft_limit_check
          description: Object type, in this case a  xs2a_overdraft_limit_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_seizure_check_response:
      type: object
      properties:
        is_seizure:
          type: integer
          example: 0
          description: 1 if the customers account is a seizure account, 0 if otherwise
        days:
          type: integer
          example: 90
          description: The limit of turnover days for this check
        object:
          type: string
          example:  xs2a_seizure_check
          description: Object type, in this case a  xs2a_seizure_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_standing_orders_check_response:
      type: object
      properties:
        standing_orders:
          type: array
          items:
            type: object
            properties:
              sender_account:
                $ref: '#/components/schemas/bank_account_object'
              recipient_account:
                $ref: '#/components/schemas/bank_account_object'
              amount:
                type: number
                format: float
                example: 500
                description: Amount to transfer
              currency:
                $ref: '#/components/schemas/currency_id'
              purpose:
                type: string
                example: Purpose
                description: Purpose of the transfer
              frequency:
                type: string
                enum: ['d', 'w', 'm', 'y']
                example: m
                description: Frequency of standing order, d = daily, w = weekly, m = monthly, y = yearly
              frequency_interval:
                type: integer
                example: 1
                description: >-
                  Frequency interval, in case of frequency daily or weekly 
                  the range is 1-7 (1 = Monday, 7 = Sunday). In case of monthly 
                  or yearly it is 1-31. 0 in case for a non standardized format.
              day:
                type: integer
                example: 31
                description: Day of the execution, 1-31. 31 is used in case of execute on the last day of the month.
              start_execution:
                type: string
                example: '2014-11-05'
                description: Date of the first or next execution of the standing order, format YYYY-mm-dd.
              end_execution:
                type: string
                nullable: true
                example: null
                description: Date of the last execution of the standing order, format YYYY-mm-dd.
        object:
          type: string
          example:  xs2a_standing_orders
          description: Object type, in this case a  xs2a_standing_orders
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    xs2a_all_accounts_check_response:
      type: object
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/bank_account_object'
        object:
          type: string
          example:  xs2a_all_accounts_check
          description: Object type, in this case a  xs2a_all_accounts_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    bank_account_object:
      type: object
      properties:
        holder:
          type: string
          example: Account Holder
          description: name of the account holder
        description:
          type: string
          example: Account description
        iban:
          type: string
          example: DE04888888880087654321
        bic:
          type: string
          example: TESTDE88XXX
        country_id:
          $ref: '#/components/schemas/country_id'
    xs2a_account_status_check_response:
      type: object
      properties:
        account_details:
          type: array
          items:
            $ref: '#/components/schemas/user_accounts_object'
        other_accounts:
          type: array
          items:
            $ref: '#/components/schemas/other_accounts_object'
        credit_cards:
          type: array
          items:
            $ref: '#/components/schemas/credit_cards_object'
        days:
          type: integer
          example:  365
          description: 'The limit of turnover days for this check'
        all_accounts:
          type: string
          example:  "1"
          description: 'Shows the chosen option, with all accounts (1) or not (0)'
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
        object:
          type: string
          example:  'xs2a_account_status_check'
          description: 'Object type, in this case a xs2a_account_status_check'
    xs2a_holder_identification_check_response:
      type: object
      properties:
        expect_holders:
          type: array
          items:
            type: string
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/account_holders_object'
        object:
          type: string
          example:  xs2a_holder_identification_check
          description: Object type, in this case a  xs2a_holder_identification_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    user_accounts_object:
      type: object
      properties:
        identifier:
          type: string
          example: 'Account Identifier'
          description: 'Can be IBAN or other Identifier of the account'
        holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: Holder name
        description:
          type: string
          example: 'Girokonto'
        iban:
          type: string
          example: DE62888888880012345678
          description: IBAN
        bic:
          type: string
          example: "TESTDE88XXX"
          description: BIC
        account_number:
          type: string
          example: "12345678"
          description: Account number
        bank_code:
          type: string
          example: "88888888"
          description: Bank code
        bank_name:
          type: string
          example: "Testbank"
          description: Bank name
        country_id:
          $ref: '#/components/schemas/country_id'
        joint_account:
          type: string
          example: "0"
          description: Joint Account
        transaction_possible:
          type: boolean
          example: "2"
        account_type:
          type: string
          example: "giro"
          description: Account type
        balance:
          type: number
          format: float
          nullable: true
          example: 2123.25
          description: Balance
        available:
          type: number
          format: float
          nullable: true
          example: 3123.25
          description: Available
        limit:
          type: number
          format: float
          nullable: true
          example: 1000.56
          description: Limit
        currency_id:
          $ref: '#/components/schemas/currency_id'
        turnover_days:
          type: integer
          example: 90
          description: Turnover days
        turnover_available_days:
          type: integer
          example: 89
          description: Turnover available days
        turnover_count:
          type: integer
          example: 137
          description: Turnover count
        average_account_usage:
          type: string
          example: "1.50"
          description: Average account usage
        overdraft_days:
          type: integer
          example: 0
          description: Overdraft days
        overdraft_limit_days:
          type: integer
          example: 0
          description: Overdraft limit days
        completeness:
          type: object
          properties:
            counter_holder:
              type: string
              example: '0.86'
            counter_iban:
              type: string
              example: '0.01'
            purpose:
              type: string
              example: '1.00'
        account_data_available:
          type: string
          example: "1"
    account_holders_object:
      type: object
      properties:
        type:
          type: string
          example: 'giro'
          description: 'Giro'
        holder:
          type: string
          example: 'MUSTERMANN, HARTMUT'
          description: 'holder'
        iban:
          type: string
          example: 'DE62888888880012345678'
        matches:
          type: array
          items:
            $ref: '#/components/schemas/matches_object'
    other_accounts_object:
      type: object
      properties:
        holder:
          type: string
          example: 'Account Holder'
          description: 'name of the account holder'
        iban:
          type: string
          example: 'DE04888888880087654321'
        bic:
          type: string
          example: 'TESTDE88XXX'
        country_id:
          $ref: '#/components/schemas/country_id'
        bank_name:
          type: string
          example: 'Testbank'
          description: 'name of the bank'
        type:
          type: string
          example: 'giro'
    credit_cards_object:
      type: object
      properties:
        holder:
          type: string
          example: 'Account Holder'
          description: 'name of the account holder'
        iban:
          type: string
          example: '2135*******45643'
          description: 'credit card number, shaded'
        bic:
          type: string
          example: 'CREDIT88XXX'
        country_id:
          type: string
          example: 'DE'
        bank_name:
          type: string
          example: 'Testbank'
          description: 'name of the bank'
        description:
          type: string
          example: 'VISA'
          description: 'type of the credit card'
    matches_object:
      type: object
      properties:
        expected_holder:
          type: string
          example: 'Expected Holder'
          description: 'name of the expected holder'
        match:
          type: string
          enum: ['NONE', 'PERSON', 'LAST_NAME', 'COMPANY']
          example: 'PERSON'
    xs2a_risk_calculations_check_response:
      type: object
      properties:
        calculations:
          type: array
          items:
            $ref: '#/components/schemas/RiskCalculationsResponse'
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
        object:
          type: string
          example:  xs2a_risk_calculations_check
          description: Object type, in this case a  xs2a_risk_calculations_check
    xs2a_collection_check_response:
      type: object
      properties:
        result:
          type: object
          properties:
            instant_payment:
              type: boolean
              example: true
            monthly_installment:
              type: array
              items:
                properties:
                  value:
                    type: number
                    example: 20.00
                  currency_id:
                    type: string
                    example: 'EUR'
                  day_of_month:
                    type: integer
                    example: 1
            suspension:
              type: boolean
              example: false
            cash_flow_per_month:
              type: array
              items:
                properties:
                  value:
                    type: number
                    example: 222.00
                  currency_id:
                    type: string
                    example: 'EUR'
                  periods:
                    type: integer
                    example: 1
            motor_vehicle:
              type: boolean
              example: true
            real_estate:
              type: boolean
              example: false
            seizure:
              type: boolean
              example: false
            usable_account:
              type: boolean
              example: true
            debt_collection:
              type: array
              items:
                properties:
                  sum:
                    type: number
                    example: 289.02
                  payments:
                    type: integer
                    example: 1
                  currency_id:
                    type: string
                    example: 'EUR'
                  average_per_month:
                    type: number
                    example: 230.56
    xs2a_account_characteristics_check_response:
      type: object
      properties:
        chargebacks:
            $ref: '#/components/schemas/chargebacks_object'
        encashment:
            $ref: '#/components/schemas/encashment_object'
        account_profile:
            $ref: '#/components/schemas/account_profile_object'
        loans:
            $ref: '#/components/schemas/loans_object'
        flags:
            $ref: '#/components/schemas/flags_object'
        object:
          type: string
          example:  xs2a_account_characteristics_check
          description: Object type, in this case a  xs2a_account_characteristics_check
        created_at:
          type: string
          example: '2014-03-23 15:55:54'
          description: 'Creation date of the object'
    chargebacks_object:
      type: object
      properties:
        chargebacks_coverage_count:
          type: integer
          example: 33
          description: 'Total number of chargebacks for lack of cover on all authorized accounts.'
        chargebacks_coverage_amount:
          type: number
          format: float
          example: 400.01
          description: 'Total amount of money, the return debit due to lack of coverage on all authorized accounts.'
        chargebacks_revoke_count:
          type: integer
          example: 2
          description: 'Total number of chargebacks initiated by the Account Holder on all authorized accounts.'
        chargebacks_revoke_amount:
          type: number
          format: float
          example: 20.00
          description: >-
                  Grand total of the chargebacks initiated by the Account Holder
                  on all authorized accounts.
    encashment_object:
      type: object
      properties:
        collection_count:
          type: integer
          example: 12
          description: 'Number of all bookings to debt collection agencies / departments / lawyers.'
        collection_amount:
          type: number
          format: float
          example: 2000
          description: 'Total of all bookings to debt collection agencies / departments.'
        collection_office_count:
          type: integer
          example: 2
          description: 'Number of different counterholders'
    account_profile_object:
      type: object
      properties:
        cash_withdrawals:
          type: integer
          example: 12
          description: 'Number of cash withdrawals'
        cash_deposits:
          type: integer
          example: 2
          description: 'Number of cash deposits'
        payment_gez:
          type: string
          example: '0'
          description: ''
        payment_schufa:
          type: string
          example: '0'
          description: ''
        payment_donation:
          type: string
          example: '1'
          description: ''
        payment_party:
          type: string
          example: '1'
          description: ''
        payment_club:
          type: string
          example: '0'
          description: ''
    loans_object:
      type: object
      properties:
        loans_count:
          type: integer
          example: 11
          description: 'Number of different recognized loan agreements.'
        loans_amount:
          type: number
          format: float
          example: 3333.33
          description: 'Sum of monthly loan commitments, i. Sum of all rates of current loan commitments.'
        subprime_lender_count:
          type: integer
          example: 3
          description: 'The number of different subprime lenders is counted in this feature.'
    flags_object:
      type: object
      additionalProperties:
        type: string
      example:
        gambling: "1"
        creditcard: "1"
    xs2a_age_verification_check:
      type: object
      example: { }
      description: >-
        The XS2A.age_verification_check verifies the legal age of the account holder.
    xs2a_balance_check:
      type: object
      properties:
        check_amount:
          type: integer
          example: 100
          description: Account balance amount to be checked against
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
    xs2a_balance_overview:
      type: object
      example: {}
      description: >-
        XS2A.balance_overview returns the current running total of the chosen
        account. An XS2A.balance_overview has no additional parameters. Just
        append an empty object to the XS2A.risk object to indicate you would
        like this check to be performed.
    xs2a_cashflow_overview:
      type: object
      example: {}
      description: >-
        XS2A.cashflow_overview provides an cashflow overview for the requested
        risk date range. An XS2A.cashflow_overview has no additional parameters.
        Just append an empty object to the XS2A.risk object to indicate you
        would like this check to be performed.
    xs2a_chargeback_check:
      type: object
      example: {}
      description: >-
        XS2A.chargeback_check returns the number of detected chargeback
        transactions for the account. An XS2A.chargeback_check has no additional
        parameters. Just append an empty object to the XS2A.risk object to
        indicate you would like this check to be performed.
    xs2a_children_check:
      type: object
      example: {}
      description: >-
        The XS2A.children_check gathers payments from governmental facilities,
        which indicate how many children the account has. This risk-check has no
        configuration.
    xs2a_insurance_contract_check:
      type: object
      properties:
        days:
          type: integer
          example: 365
          description: 'Range in days which should be used (min value: 90, max value: 365)'
      description: >-
        The XS2A.insurance_contract_check provides an overview of the users existing insurance contracts and provides 
        important informations (e.g. insurance policy number) about the users insurance situation.
    xs2a_profit_loss_check:
      type: object
      example: {}
      description: >-
        The P&L check (profit and loss check) provides a simplified P&L statement for B2B
        customers as well as an overview of other relevant operational KPIs. These can be,
        for example, other relevant income, expenses and cash flows from the account.
        In addition, the tax number is also shown (initially, only in Germany).
    xs2a_income_check:
      type: object
      properties:
        limit_turnover_days:
          type: integer
          example: 365
          description: >-
            Needed limit of the fetched turnovers to create it.
            Default days required 90. Valid Range: 90 / 180 / 365
      description: >-
        The Income Check provides an overview of the account holder's various types of income.
        Each type of income is listed separately and the corresponding key figures are calculated
        so that the customer can only take into account the types of income that are relevant for him/her.
    xs2a_account_linked_offers_check:
      type: object
      example: {}
      description: >-
        The Account Linked Offers Check validates with the consent of the user, based on an account
        view, whether third party offers might be of interest to the user and hands over an
        advertising link for one-time use to a Tink Germany business partner.
    xs2a_credit_check:
      type: object
      properties:
        checks:
          $ref: '#/components/schemas/checks'
      description: >-
        The XS2A.credit_check gathers various information about a customer.
        The check was designed for example to be used in a loan application
        process without the need to resort to some other medium.
    xs2a_direct_debit_check:
      type: object
      properties:
        check_amount:
          type: integer
          example: 100
          description: Account balance amount to be checked against
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
        start_date:
          type: string
          example: '2014-03-23'
          description: Date format is "YYYY-mm-dd". An optional field. If a start_date is given, the field "end_date" has to be set as well. The start date can be no earlier than the day after the transaction. In case the start date is invalid or not set, the earliest bank work day will be used.
        end_date:
          type: string
          example: '2014-03-31'
          description: Date format is "YYYY-mm-dd". An optional field. The end date has to be at lest 3 days after the start date and can be a maximum of 30 days into the future. If there is no end date given, the maximum of 30 days will be used.
    xs2a_fact_sheet_lists:
      type: object
      properties:
        limit_turnover_days:
          type: integer
          example: 365
          description: >-
            If needed limit the fetched turnovers to create a fact_sheet_lists.
            Default 365. Valid Range: 10 - 365
        fields:
          type: array
          items:
            type: object
            properties:
              tags:
                type: array
                items:
                  type: string
                example: ["expenditure", "banking-fees"]
              categories:
                type: array
                items:
                  type: string
                example: ["K.8.2.1"]
              name:
                type: string
                example: "test"
              min_amount:
                type: number
                example: -20
              max_amount:
                type: number
                example: -2
    xs2a_name_check:
      type: object
      required:
        - name
        - firstname
      properties:
        name:
          type: string
          example: Mustermann
          description: Name to compare against. Usually the surname.
        firstname:
          type: string
          example: Hartmut
          description: Firstname to compare against.
    xs2a_overdraft_limit_check:
      type: object
      example: {}
      description: >-
        XS2A.overdraft_limit_check returns the number of booking days of the
        given risk range. The number of days the account used the overdraft
        limit, the maximum amount of overdraft used, the average and the median
        used overdraft. An XS2A.overdraft_limit_check has no additional
        parameters. Just append an empty object to the XS2A.risk object to
        indicate you would like this check to be performed.
    xs2a_seizure_check:
      type: object
      properties:
        days:
          type: integer
          example: 90
          description: 'The limit of turnover days for this check'
      description: XS2a.seizure_check allows you to check for a seizire account.
    xs2a_standing_orders_check:
      type: object
      example: {}
      description: >-
        XS2A.standing_orders_check allows you to retrieve all standing orders
        from an account. An XS2A.standing_orders_check has no additional
        parameters. Simply append an empty object to the XS2A.risk object to
        indicate you would like this check to be performed.
    xs2a_all_accounts_check:
      type: object
      example: {}
      description: >-
        XS2A.standing_orders_check allows you to retrieve all standing orders
        from an account. An XS2A.standing_orders_check has no additional
        parameters. Simply append an empty object to the XS2A.risk object to
        indicate you would like this check to be performed.
    xs2a_account_status_check:
      type: object
      properties:
        limit_turnover_days:
          type: integer
          example: 365
          description: >-
            If needed limit the fetched turnovers to create it.
            Default 365. Valid Range: 10 - 365
        all_accounts:
          type: boolean
          example: true
          description: 'True, if you want to receive all accounts including their turnovers'
      description: >-
        With XS2A.xs2a_account_status_check a list of accounts within the bank connection can be requested.
        Basically you have to decide if the account status data for the reference account or all accounts
        within the bank account should be collected. In addition the request can be filtered over a period
        in days. As result you get data about account or accountholder identification, current account balance,
        turnovers and the quality of the turnovers.
    xs2a_holder_identification_check:
      type: object
      required:
        - expect_holders
      properties:
        expect_holders:
          type: array
          description: Array of objects containing firstnames and lastnames.
          items:
            $ref: '#/components/schemas/ExpectedHolderObject'
      description: >-
        XS2A.holder_identification_check. Using this module a list of names can
        be checked against the name of the accountholder of all accounts in the
        bank connection. For the request only the first name and last name must
        be transferred. As result you get the information if there is a match per
        account and given name and lastname.
    xs2a_risk_calculations_check:
      type: object
      required:
        - calculations
      properties:
        calculations:
          type: array
          description: Array of objects containing many manditory fields.
          items:
            $ref: '#/components/schemas/RiskCalculations'
      description: >-
        XS2A.risk_calculations_check allows you many things
    xs2a_account_characteristics_check:
      type: object
      example: {}
      description: >-
        XS2A.account_characteristics_check allows you to retrieve many possible information
        about the account, like chargebacks, encashment, loans and other. Simply
        append an empty object to the XS2A.risk object to indicate you would like
        this check to be performed.
    xs2a_collection_check:
      type: object
      properties:
        check_amount:
          type: integer
          example: 100
          description: Account balance amount to be checked against
        check_currency_id:
          $ref: '#/components/schemas/currency_id'
      description: >-
        XS2A.collection_check is used to check whether the current open amount is available on the account and 
        payment should be initiated. If this is not the case, then an individual installment payment is calculated 
        and proposed. This information is supported by further relevant indicators.
    wizard_session_object:
      type: object
      properties:
        id:
          type: string
          example: ws_xxxxxxxxxxxxxxxx
          description: Internal identifier.
        transaction:
          type: string
          example: 00000-xx-xxxx-xxxx
          description: Public transaction identifier.
        wizard_session_key:
          type: string
          description: Key to start the wizard
        product:
          $ref: '#/components/schemas/product'
        parameters:
          type: object
          example: {}
          description: An array which contains the current wizard configuration.
        last_error:
          type: string
          enum: ['accounts_failed','age_verification_not_confirmed','authorized_person','balance_failed','bank_code_unknown','client_aborted','client_not_started','consent_invalid','country_id_invalid','forced_transport_disabled','init_failed','login_blacklisted','login_failed','login_next_failed','max_login_tries','max_tan_tries','no_compatible_accounts','no_transports_found','pinned_holder_not_found','pinned_iban_not_found','pp_not_checked','session_expired','security_setting_rejection','standing_orders_failed','tech_error','testmode_error','token_mismatch','transaction_failed','turnovers_failed','tx_rx_iban_equal','validation_failed','wrong_tan']
          description: >-
            The last occurred error. This is overwritten, if another error
            occurs. You can find detailed explanations of the errors [here](https://guide.xs2a.com/xs2a/integration-cs/additional-guides/errorcodes).
        testmode:
          type: boolean
          example: true
          description: true if this session runs in testmode. false otherwise.
        finished:
          type: boolean
          example: true
          description: >-
            true if this session was finished successfully. false if not or
            still running.
        current_step:
          type: string
          enum: ['WizardLoginStep','WizardLoginNextStep','WizardAccountsStep','WizardDataStep','WizardTanStep','WizardScaStep','WizardIrpaStep','WizardAutoSubmitStep','WizardFinishStep','WizardStartStep','WizardShowcaseStep','WizardPreAccountsStep','WizardPreDataStep','WizardPreLoginStep','WizardOauthRedirect','WizardOauthRedirectNok','RiskUpload']
          description: The current wizard step of this session.
        created_at:
          type: string
          example: '2021-09-23 10:40:10'
          description: Date of creation (YYYY-MM-DD HH:MM:SS)
        object:
          type: string
          example: wizard_session
          description: String with content 'wizard_session'
    WizardResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
          description: The http status code
        message:
          type: string
          example: ok
          description: The error message
        error:
          type: array
          items:
            type: string
            example: []
          description: >-
            Will be set if an error occurs during the processing of the current
            step (e.g. the session has expired). If the recoverable flag equals
            false a new session has to be started.
        polling:
          $ref: '#/components/schemas/Polling'
        form:
          $ref: '#/components/schemas/FormObject'
    WizardFinalResponse:
      type: object
      properties:
        code:
          type: integer
          example: 200
          description: The http status code
        error:
          type: array
          items:
            type: string
            example: []
          description: >-
            Will be set if an error occurs during the processing of the current
            step (e.g. the session has expired). If the recoverable flag equals
            false a new session has to be started.
        form:
          properties:
            elements:
              type: array
              items:
                type: string
            name:
              type: string
              example: finish
            parameters:
              type: array
              items:
                type: string
        message:
          type: string
          example: ok
          description: The error message
        polling:
          type: object
          example: {}
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          example: 422
          description: status code to indicate whether the request was successful
        message:
          type: string
          example: Validation failed
          description: Descriptive message for the status code
        error:
          type: object
          properties:
            key:
              type: array
              items:
                type: string
                example: The key field is required.
            action:
              type: array
              items:
                type: string
                example: The selected value of action field is invalid.
          description: Contains the validation errors (only set in case there are any)
    FormObject:
      type: object
      description: Contains the form objects
      properties:
        name:
          type: string
          example: bank
          description: The name of the current form
        elements:
          type: array
          description: Contains the elements of the form. Can contain any of 'Form.Element'
          items:
            anyOf:
              - $ref: '#/components/schemas/Form.Captcha'
              - $ref: '#/components/schemas/Form.Checkbox'
              - $ref: '#/components/schemas/Form.Flicker'
              - $ref: '#/components/schemas/Form.HelpText'
              - $ref: '#/components/schemas/Form.Image'
              - $ref: '#/components/schemas/Form.Multi'
              - $ref: '#/components/schemas/Form.MultiElements'
              - $ref: '#/components/schemas/Form.Password'
              - $ref: '#/components/schemas/Form.Radio'
              - $ref: '#/components/schemas/Form.Select'
              - $ref: '#/components/schemas/Form.Tabs'
              - $ref: '#/components/schemas/Form.Text'
    Form.Captcha:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: captcha)'
        name:
          type: string
          description: The name of the form element
        data:
          type: string
          description: The base64 encoded image
        value:
          type: string
          description: The set value of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.Checkbox:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: checkbox)'
        name:
          type: string
          description: The name of the form element
        checked:
          type: boolean
          description: Indicates whether the checkbox is checked
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.Flicker:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: flicker)'
        name:
          type: string
          description: The name of the form element
        value:
          type: string
          description: The set value of the form element
        code:
          type: array
          items:
            type: array
            items:
              type: string
          description: >-
            The actual flicker image as an array representation (0 = black bar,
            1 = white bar)
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.HelpText:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: help_text)'
        title:
          type: string
          description: The title of the form element
        text:
          type: string
          description: The text of the form element
    Form.Image:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: image)'
        data:
          type: string
          description: The base64 encoded image
        label:
          type: string
          description: The label of the form element
    Form.Multi:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: image)'
        name:
          type: string
          description: The name of the form element
        selected:
          type: string
          description: Name of the selected element (value of one of the nested elements)
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Form.MultiElements'
          description: Array containing the nested elements
    Form.MultiElements:
      type: object
      properties:
        label:
          type: string
          description: The label of the element
        value:
          type: string
          description: The value of the form element
        elements:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/Form.Captcha'
              - $ref: '#/components/schemas/Form.Checkbox'
              - $ref: '#/components/schemas/Form.Flicker'
              - $ref: '#/components/schemas/Form.HelpText'
              - $ref: '#/components/schemas/Form.Image'
              - $ref: '#/components/schemas/Form.Password'
              - $ref: '#/components/schemas/Form.Radio'
              - $ref: '#/components/schemas/Form.Select'
              - $ref: '#/components/schemas/Form.Tabs'
              - $ref: '#/components/schemas/Form.Text'
          description: Array containing the nested elements
    Form.Password:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: password)'
        name:
          type: string
          description: The name of the form element
        value:
          type: string
          description: The set value of the form element
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.RadioOption:
      type: object
      properties:
        label:
          type: string
          description: The label of the radio option
        disabled:
          type: boolean
          description: Whether this option is disabled
    Form.Radio:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: radio)'
        name:
          type: string
          description: The name of the form element
        checked:
          type: string
          description: Index of the checked element
        options:
          type: array
          items:
            $ref: '#/components/schemas/Form.RadioOption'
          description: An array of possible options
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.Select:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: select)'
        name:
          type: string
          description: The name of the form element
        selected:
          type: string
          description: The key of the selected option from the options object. Empty string of none is selected.
        options:
          type: object
          items:
            type: string
          description: Key-value object with the options. The value is the label of the option.
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    Form.Tabs:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: tabs)'
        name:
          type: string
          description: The name of the form element
        tabs:
          type: array
          items:
            type: string
          description: An array of possible transports
        label:
          type: string
          description: The label of the form element
        selected:
          type: string
          description: The selected transport
    Form.Text:
      type: object
      properties:
        type:
          type: string
          description: 'The type of the form element (here: text)'
        name:
          type: string
          description: The name of the form element
        value:
          type: string
          description: The set value of the form element
        label:
          type: string
          description: The label of the form element
        validation:
          type: string
          description: 'List of validation rules, concatenated with a pipe character'
        invalid:
          type: boolean
          description: Indicates whether the validation of the element failed
        failed_validation_rules:
          type: string
          description: >-
            A list of failed validation rules (concatenated with a pipe
            character)
        validation_error:
          type: string
          description: The validation error (human readable)
    WhitelistObject:
      type: object
      properties:
        id:
          type: string
          example: wl_c3nL2MafX8WdfiIM
          description: Whitelist item id
        hash:
          type: string
          example: a2a333bfded0795029850706e715341041460cf9
          description: Hashed representation of iban
    Whitelist.add:
      type: object
      required:
      - iban
      properties:
        iban:
          type: string
          example: FR1420041010050500013M02606
          description: A valid IBAN to whitelist.
    BlacklistObject:
      type: object
      properties:
        id:
          type: string
          example: bl_c3nL2MafX8WdfiIM
          description: Blacklist item id
        type:
          type: string
          example: iban
          description: 'Type of the entry, e.g. iban'
        data:
          type: string
          example: FR1420041010050500013M02606
          description: IBAN
    Blacklist.add:
      type: object
      required:
        - data
      properties:
        data:
          type: string
          example: FR1420041010050500013M02606
          description: A valid IBAN to blacklist.
    Polling:
      type: object
      description: >
        The polling attribute indicates whether the transaction status needs to be polled. This is usually the case when
        your customer has to approve a payment via the banks mobile app.


        If polling is an empty object no action is required. If interval is set you need to POST a request every interval
        milliseconds to the wizard API endpoint providing the wizard session key as well as the parameter action=poll until you receive the finish response.
      properties:
        interval:
          type: integer
          description: The inverval in milliseconds
          example: 1000
    filters:
      type: array
      items:
        type: string
        example:
          - income
          - rent
          - living-cost
          - credit
          - expenditure
          - revenue
          - salary
        description: >-
          Filters which can be applied to the turnover selection.
          For more filters visit https://manage.xs2a.com/integration/test,
          select "XS2A.risk" from the product dropdown and click the checkbox
          at "XS2A.account_snapshot". You will be presented with a full list of filters.
    checks:
      type: array
      items:
        type: string
        example: income
        description: >-
          Array of strings of check names. 
          For more checks visit the test call page and select "XS2A.risk" from
          the product dropdown and click the checkbox at
          "XS2A.account_snapshot". You will be presented with a full list of
          filters.
    checksResult:
      type: object
      properties:
        amount:
          type: number
          format: float
          example: 3124.29
        currency:
          $ref: '#/components/schemas/currency_id'
    monthlySums:
      type: object
      additionalProperties:
        type: number
        format: float
      example:
        2020-09: 3124.29
    productType:
      type: object
      properties:
        key:
          type: string
          example: 'DE-CDS'
        designation:
          type: string
          example: 'aktiv'
    companyIdentification:
      type: object
      properties:
        identificationnumber:
          type: string
          example: '444455654323232'
    probabilityOfDefault:
      type: object
      properties:
        duetosolvencyindex:
          type: string
          example: '0.23'
        companiesaverage:
          type: string
          example: '1.44'
        date:
          type: string
          example: '2018-03-30'
        assignments:
          type: object
          properties:
            assignment:
              type: array
              items:
                type: object
                properties:
                  solvencyindex:
                    type: number
                    format: float
                    example: 23
                  probabilityofdefault:
                    type: string
                    example: '1.00'
        explanation:
          type: object
          properties:
            paragraph:
              type: array
              items:
                type: string
                example: 'Der BonitÃ¤tsindex und die mit ihm korrespondierende PD (Probability of Default) geben die EinschÃ¤tzung der Wahrscheinlichkeit an.'
    status:
      type: object
      properties:
        key:
          type: string
          example: 'WRF-CDS'
        designation:
          type: string
          example: 'aktiv'
    country:
      type: object
      properties:
        key:
          type: string
          example: 'DE'
        designation:
          type: string
          example: 'Deutschland'
    phone:
      type: object
      properties:
        countrycode:
          type: string
          example: '+49'
        diallingcode:
          type: string
          example: '176'
        phonenumber:
          type: string
          example: '80542787'
    fax:
      type: object
      properties:
        countrycode:
          type: string
          example: '+49'
        diallingcode:
          type: string
          example: '2345'
        phonenumber:
          type: string
          example: '12344487'
        extensionno:
          type: string
          example: '99'
    employer:
      type: object
      properties:
        name:
          type: string
          example: Tink Germany GmbH
        months_with_salaries_count:
          type: integer
          example: 3
        booking_date_first_salary:
          type: string
          example: '2020-07-23'
        booking_date_last_salary:
          type: string
          example: '2020-09-18'
        months_sums_median:
          type: number
          format: float
          example: 255
        months_sums_minimum:
          type: number
          format: float
          example: 189
        public_employer:
          type: boolean
          example: No
        current_employer:
          type: boolean
          example: Yes
    metadata:
      type: object
      nullable: true
      additionalProperties: true
      example:
        key1: value1
      description: >-
        An array of data which will be passed back to your application. With
        this field you can for example pass information about your customer ids,
        order ids and the like back to your application. Please beware of some
        restrictions for the metadata field: maximum of 3 values, maximum of a
        key length of 20 characters, maximum length of values is 128 characters.
        For privacy protection reason it is not allowed to use this field for
        transferring personal data (e.g. names or addresses).
    easy_onboarding:
      type: object
      properties:
        success_link:
          type: string
          example: 'https://www.xs2a.com/success'
        abort_link:
          type: string
          example: 'https://www.xs2a.com/abort'
      description: >-
        An array of a success/abort_link to overwrite the statically stored values in the easyOboarding.
  requestBodies:
    RefundPayout:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RefundPayout'
    RefundPayoutMulti:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RefundPayoutMulti'
    xs2a.risk:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.risk'
      description: >-
        XS2A.risk allows you to collect and validate a bank connection. Additionally
        a range of predefined checks can be applied using the retrieved account
        information. For more information about the predefined checks see XS2A.risk.
      required: true
    xs2a.risk.upload.json:
      description: Upload an account-snapshot to finalize your transaction.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.risk.upload.json'
    xs2a.account_snapshot:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a_account_snapshot'
      description: >-
        A XS2A.account_snapshot is more an additional option than a whole check.
        A XS2A.account_snapshot offers direct access to the raw account data.
        The account data reflects the information at the time of the
        transaction.
      required: true
    xs2a.pay:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.pay'
      description: >-
        XS2A.pay offers a payment solution. The customer uses his online banking
        credentials. Optional security checks will be executed to counter fraud
        and other suspicious activity. After that the transfer of a fixed amount
        and purpose will be sent to a predefined recipient account. The customer
        authorizes the transaction with a TAN after which the bank is executing
        the transfer. In case sender country is Switzerland (CH) the fields
        `recipient_street`, `recipient_zip`, `recipient_city` and `recipient_country_id`
        are required.
      required: true
    xs2a.api.users:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.api.users'
      required: true
    xs2a.api.users.accesstokens:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.api.users.accesstokens'
      description: Renew accesstoken
      required: true
    xs2a.api.connections:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.api.connections'
      description: Creating a bank connection.
      required: true
    xs2a.api.connections.sync:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/xs2a.api.connections.sync'
    wizard.api:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WizardAPIRequest'
      description: Navigate through the wizard by using the wizard API instead of xs2a.js
      required: true
    Blacklist.add:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Blacklist.add'
      description: Creating a bank connection.
      required: true
    Whitelist.add:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Whitelist.add'
      description: Creating a Whitelist entry.
      required: true
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
