summaryrefslogtreecommitdiff
path: root/integration-bank.rst
blob: c90bf0428a7344382d591e2202ba65c54ea9fedb (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
==============================
Interaction with bank websites
==============================

This section describes how bank websites can interact with the
Taler wallet.

Currently the following functionality is supported:
 * Querying for the presence of a Taler wallet.
 * Receiving change notifications from the Taler wallet.
 * Creating a reserve.


For JavaScript code examples, see :ref:`communication`.

-------------------------
Reserve Creation Request
-------------------------

The bank website can request the creation of a :term:`reserve`.  Note that the
user will always be prompted by the wallet before a reserve is created in the
wallet.

As a result of the reserve creation request, the following steps will happen insequence:
 1. The wallet will prompt the user for the *mint base URL* and ask the user to
    confirm creating the reserve.
 2. The wallet will create a key pair for the reserve.
 3. The wallet will make a request to the bank, containing
    the reserve's public key and the mint base URL chosen by the user

The bank should then take steps that will establish the reserve at the
customer's requested mint.  This could, depending on the bank and mint, either
be a SEPA wire transfer or some other means.

In response to the reserve creation request, the Taler wallet MAY cause the
current document location to be changed, in order to navigate to a
wallet-internal confirmation page.

The bank requests reserve creation with the ``taler-create-reserve`` event.
The event data must be a JavaScript ``object`` with the following fields:

 * ``form_id``: The ``id`` of the ``form`` HTML element that contains data for the HTTP POST request
   that confirms reserve creation with the bank.
 * ``input_amount``: Amount of the reserve in the format ``N.C CUR``, where ``CUR`` is the
   currency code.
 * ``mint_rcv``: The ``id`` of the ``input`` HTML element in the reserve creation form
   that will contain mint base URL for the reserve
 * ``input_pub``: The ``id`` of the ``input`` HTML element in the reserve creation form
   that will contain the reserve's public key.

Note that the bank website MUST contain an HTML form with the data required for the request and
input fields for receiving data from the mint.