summaryrefslogtreecommitdiff
path: root/frags/ebics-setup.rst
blob: c6ff5143320961698a2eb33d51b72801a29c9c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

When you sign up for an EBICS-enabled bank account, the bank will provide you
with various credentials. Those must be provided in the
``/etc/libeufin/libeufin-nexus.conf`` configuration file together with the
name of the *fiat* currency.

The following snippet shows the mandatory configuration values:

.. _core-config:

.. code-block:: console

  [nexus-ebics]
  CURRENCY = CHF

  # Bank
  HOST_BASE_URL = http://bank.example.com/
  BANK_DIALECT = postfinance

  # EBICS IDs
  HOST_ID = mybank
  USER_ID = myuser
  PARTNER_ID = myorg

  # Key files
  BANK_PUBLIC_KEYS_FILE = ${LIBEUFIN_HOME}/bank-keys.json
  CLIENT_PRIVATE_KEYS_FILE = ${LIBEUFIN_HOME}/subscriber-keys.json

  # Account information
  IBAN = myiban
  BIC = mybic
  NAME = myname

.. note::
  Refer to the manpage ``libeufin-nexus.conf(5)``
  for the full array of configuration values.

Assuming that the configuration file exists at ``$config_file``, the following
command would start the EBICS setup process.  The files CLIENT_PRIVATE_KEYS_FILE
and BANK_PUBLIC_KEYS_FILE would be created at the CWD.  Adjust their path to your
setup ('$HOME' is currently not supported along paths).

.. code-block:: console

  libeufin-nexus ebics-setup -c $config_file

If the previous command succeeded, the subscriber keys reached the bank, but the setup
**should** fail with an ``EBICS_INVALID_USER_STATE`` error code.  That happens because
the client tries to download the bank keys *before* having confirmed the subscriber keys
via the traditional post service.

To that purpose, the previous run should have left a PDF document that the subscriber can
print, sign, and send to the bank to confirm their subscriber keys.  Look for the message
looking like ``PDF file with keys hex encoding created at: /tmp/libeufin-nexus-keys-$timestamp.pdf``.

Once the bank received and approved such printed document, run the same command again, in
order to download the bank keys and let the user accept them.

.. code-block:: console

  libeufin-nexus ebics-setup -c $config_file

The setup is considered finished once the user accepts the bank keys.