diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-12-26 23:27:28 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-01-27 10:42:50 +0100 |
commit | 3ee973fe5892dba1384dc4ca97e46148e479febd (patch) | |
tree | 4158d8d40c3adaaa6363d6402a81bae8b7883ad4 /docs/integration-bank.rst | |
parent | 4feb2deebe4118468ef75ac0c7ccf52000e660fe (diff) | |
download | docs-3ee973fe5892dba1384dc4ca97e46148e479febd.tar.gz docs-3ee973fe5892dba1384dc4ca97e46148e479febd.tar.bz2 docs-3ee973fe5892dba1384dc4ca97e46148e479febd.zip |
Moving payment protocol on 'docs'
Diffstat (limited to 'docs/integration-bank.rst')
-rw-r--r-- | docs/integration-bank.rst | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/docs/integration-bank.rst b/docs/integration-bank.rst new file mode 100644 index 00000000..1dc2ec8d --- /dev/null +++ b/docs/integration-bank.rst @@ -0,0 +1,81 @@ +============================== +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`. This operation +will require the user to specify the exchange where he wants to create the reserve +and the resolution of a CAPTCHA, before any action will be taken. + +As a result of the reserve creation request, the following steps will happen in sequence: + 1. The user chooses the desired amount from the bank's form + 2. Upon confirmation, the wallet fetches the desired amount from the user-filled form and + prompts the user for the *exchange base URL*. Then ask the user to confirm creating the + reserve. + 3. The wallet will create a key pair for the reserve. + 4. The wallet will request the CAPTCHA page to the bank. In that request's parameters it + communicates the desired amount, the reserve's public key and the exchange base URL to the + bank + 5. Upon successful resolution of the CAPTCHA by the user, the bank initiates the reserve + creation according to the gotten parameters. Together with `200 OK` status code sent back + to the wallet, it gets also a `ReserveCreated`_ object. + +Note that the reserve creation can be done by a SEPA wire transfer or some other means, +depending on the user's bank and chosen exchange. + +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 `CreateReserveDetail`_: + + +.. _CreateReserveDetail: +.. code-block:: tsref + + interface CreateReserveDetail { + + // JSON 'amount' object. The amount the caller wants to transfer + // to the recipient's count + amount: Amount; + + // CAPTCHA's page URL which needs the following parameters + // query parameters: + // amount_value + // amount_fraction + // amount_currency + // reserve_pub + // exchange + // wire_details (URL encoding of /wire output from the exchange) + callback_url: string; + + // list of wire transfer types supported by the bank + // e.g. "SEPA", "TEST" + wt_types: Array<string> + } + +.. _ReserveCreated: +.. code-block:: tsref + + interface ReserveCreated { + + // A URL informing the user about the succesfull outcome + // of his operation + redirect_url: string; + + } |