Guide to XS2A
  • What is XS2A?
  • Customer Cockpit
    • Overview
      • Track your Business
      • Permissions and Roles
      • Generating API-Keys
      • Creating Webhooks
      • Contact our Support
      • Successful transactions
      • Last Errors
  • Integration
    • How to go live
      • Technical Onboarding
      • KYC (Know Your Customer)
      • Video Ident
    • Getting started
      • Product specific recommendations
      • Registering your account
      • Required steps to start
      • Use case integration
      • API documentation
      • Integration variants
      • Upload eIDAS certificates
      • Choose a Platform
    • 💡UX - Integration Guide
    • Integration Variants
      • Javascript-Widget
        • Webview App Integration
      • Mobile SDK (iOS & Android)
      • Wizard-API
      • EasyOnboarding
    • Integration by Use Case
      • PFM (Personal Finance Management)
      • P2P (Purchase-to-pay)
      • Loan Origination (B2C)
      • Loan Origination (B2B)
      • Insurance
      • PSP (Payment Service Provider)
      • Leasing
      • Age verification check
      • Source of Funds/Wealth
    • Products & Platforms
      • Payment Platform (XS2A.pay)
      • Analytics Platform (XS2A.risk)
      • Open Banking Platform (XS2A.api)
      • OnlineÜberweisen
    • Product Features
      • Testbank 2.0
      • Reconciliation
      • Payouts & Refunds
      • Simple Pay
      • Credit cards
    • Additional Guides
      • Errorcodes
      • Categorization
        • The Categorization Taxonomy
        • The Categorization Engine
        • Quality Assurance
      • B2C & B2B Rating Checks
        • B2B Rating
        • B2C Rating
      • Reports
      • PayPlus
      • Reconciliation
        • Automatic Recon OnlineÜberweisen
        • Manual Recon OnlineÜberweisen
        • Recon Payment Platform (XS2A.pay)
      • Webhooks
  • FAQ
    • XS2A
      • Merchant admin
    • OnlineÜberweisen
      • For merchants
Powered by GitBook
On this page
  • Important
  • Synchronization status
  • Basic integration
  • Authentication (Documentation)
  • Create a bank user (Documentation)
  • Create an access token for a bank user (Documentation)
  • Create a bank connection (Documentation)
  • Show the created session to the customer
  • Retrieve the list of bank accounts for a bank user (Documentation)
  • Retrieve the turnovers for a specific bank account (Documentation)
  • Retrieve the balance for a specific bank account (Documentation)

Was this helpful?

  1. Integration
  2. Products & Platforms

Open Banking Platform (XS2A.api)

PreviousAnalytics Platform (XS2A.risk)NextOnlineÜberweisen

Last updated 2 years ago

Was this helpful?

In cases where a regular update of the account information is required without the need to ask the user to log in again every time, this product provides access to account data of a bank account, with the aim of obtaining or retrieving an electronic account statement, in order to be able to use this data e.g. in a PFM tool. This enables the possibility to have several bank connections of the same authorized person to be combined under one Tink Germany user.

Within the scope of the synchronisation, repeated access to the bank data can be granted as long as valid consent for each bank connection was given by the user. With the introduction of the PSD2, the end customer must re-issue the Consent at least every 90 days by means of a bank login via Tink Germany.

Important

Synchronization status

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.

A bank connection with sync_mode set to full can also fall back to none in case of any failures. If this happens the bank connection needs to be synced manually, after this is successful the connection can switch to full again.

The connection will not be synced automatically, there are no credentials or tokens that we save to synchronize the bank connection again without user activity.

Every time sync is initiated via the API, the user has to provide his bank credentials.

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.

Basic integration

View the full technical documentation of this product .

Authentication ()

All authentication in our API is done via HTTP basic authentication.

POST /v1/api/users HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_API_KEY_GOES_HERE")
Cache-Control: no-cache
curl --user api:<my_api_key> https://api.xs2a.com/v1/payments

The first step is to create a bank user, this bank user will store all bank connections for a user.

PUT /v1/api/users HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_API_KEY_GOES_HERE")
Cache-Control: no-cache

{
  "name": "Max Mustermann",
  "email": "user@example.com"
}

As result, you will get information about the created bank user.

{
  "id": "bus_NIB48H6IiB57ySH1",
  "name": "Max Mustermann",
  "email": "user@example.com",
  "testmode": true,
  "created_at": "2017-12-14 16:52:44",
  "object": "bank_user"
}

We need to use the id value in the next request.

All communication to the API for a specific bank user needs to be done with the access token. The access token replaces the API key at the authentication.

PUT /v1/api/users/{user-id}/accesstokens HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_API_KEY_GOES_HERE")
Cache-Control: no-cache

{
  "valid_until": "2022-03-22 12:14:58"
}

The result will include additional information on the generated token and the token itself.

{
  "id": "uat_MEYAT0R7Gm2vkZtU",
  "token": "4K9JaNOhnCknZJyAXHKkrS6g0Ik7V0CX",
  "valid_until": "2018-03-22 12:14:58",
  "created_at": "2018-03-16 11:14:58",
  "object": "bank_user"
}

The token value is now used as the password for all following requests at the authentication.

To retrieve information about bank accounts we first need to create a bank connection to a bank. This bank connection will then work as a parent for all fetched bank accounts.

PUT /v1/api/users/{user-id}/accesstokens HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_ACCESS_TOKEN_GOES_HERE")
Cache-Control: no-cache

{
  "sync_mode": "full",
  "bic": "TESTDE88XXX",
  "country_id": "DE",
  "days": 60,
  "limit_days": 60,
  "account_selection": "all",
  "language": "de",
  "fints_product_id": ""
}

As result, you will get a wizard_session_key and a transaction value.

{
    "wizard_session_key": "m5A65Cy2lwI1rOXxuvwU4MM47b4tDaV0ME9By6It",
    "transaction": "10001-xv-LEz8-oct7"
}

You need to use these values in the next steps so you should store them in your system related to the user.

Show the created session to the customer

This step depends on the integration variant you want to use. In all variants, the wizard_session_key and the transaction value is used later.

A bank connection can contain multiple bank accounts. Each bank account is unique. Bank accounts will be created via the creation of a bank connection or during synchronization of a bank connection.

GET /v1/api/accounts HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_ACCESS_TOKEN_GOES_HERE")
Cache-Control: no-cache

The response will contain a paginated list of all bank accounts that belong to the bank user.

{
  "total": 1,
  "per_page": 15,
  "current_page": 1,
  "last_page": 1,
  "next_page_url": "https://api.xs2a.com/v1/accounts?page=2",
  "prev_page_url": "https://api.xs2a.com/v1/accounts?page=1",
  "from": 1,
  "to": 1,
  "data": [
    {
      "id": "bac_c8KYwjexO2iO5AE9",
      "bank_connection_id": "bcn_xxxxxxxxxxxxxxxx",
      "holder": "MUSTERMANN, HARTMUT",
      "iban": "DE62888888880012345678",
      "description": "Girokonto",
      "bic": "TESTDE88XXX",
      "account_number": "1234567890",
      "bank_code": "88888888",
      "bank_name": "Testbank",
      "country_id": "DE",
      "type": "Giro",
      "joint_account": false,
      "transaction_possible": true,
      "created_at": "2018-03-16 11:14:58",
      "object": "bank_account"
    }
  ]
}

Read the full technical documentation for more information about how to filter the turnovers.

GET /v1/api/accounts/{bank-account-id}/turnovers HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_ACCESS_TOKEN_GOES_HERE")
Cache-Control: no-cache

The response will contain all matching turnovers for the bank account.

{
  "id": "bac_c8KYwjexO2iO5AE9",
  "turnovers": [
    {
      "booking_date": "2017-10-08T00:00:00Z",
      "amount": -962,
      "currency_id": "EUR",
      "purpose": [
        "SEPA-DAUERAUFTRAG EMPFAENGER HAUSVERWALTUNG"
      ],
      "counter_iban": "DE18701693100100029394",
      "counter_bic": "GENODEF1ALX",
      "counter_holder": "MUSTERMANN, HARTMUT",
      "prebooked": false,
      "canceled": true,
      "tags": [
        "expenditure"
      ],
      "category_id": "K.1.2",
      "creditor_id": "LU96ZZZ0000000000000000058",
      "new": true
    }
  ],
  "days": 59,
  "date": "2017-12-06T00:00:00Z",
  "created_at": "2018-03-16 11:14:58",
  "object": "bank_account_turnovers"
}
GET /v1/api/accounts/{bank-account-id}/balance HTTP/1.1
Host: api.xs2a.com
Content-Type: application/json
Authorization: Basic base64("api:YOUR_ACCESS_TOKEN_GOES_HERE")
Cache-Control: no-cache

The response will contain the balance information for the bank account.

{
  "id": "bac_c8KYwjexO2iO5AE9",
  "available": 3123,
  "limit": 1000,
  "balance": 2123,
  "currency_id": "EUR",
  "date": "2017-12-06T00:00:00Z",
  "created_at": "2018-03-16 11:14:58",
  "object": "bank_account"
}

Create a bank user ()

Create an access token for a bank user ()

Create a bank connection ()

Retrieve the list of bank accounts for a bank user ()

Retrieve the turnovers for a specific bank account ()

Retrieve the balance for a specific bank account ()

here
Documentation
Documentation
Documentation
Documentation
Javascript-Widget
Wizard-API
EasyOnboarding
Documentation
Documentation
Documentation