diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-01-25 14:38:19 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2016-01-25 14:38:19 +0100 |
commit | 9f761f4cf77dea1c39bb06736a50a11c88a10807 (patch) | |
tree | 25475677704e60704f62ad98b6495a988e5e4a4c /api-bank.rst | |
parent | 9f8c3618d1d5b2bc6e10569b92c8b326cda8859f (diff) | |
download | docs-9f761f4cf77dea1c39bb06736a50a11c88a10807.tar.gz docs-9f761f4cf77dea1c39bb06736a50a11c88a10807.tar.bz2 docs-9f761f4cf77dea1c39bb06736a50a11c88a10807.zip |
adding bank API to TOC
Diffstat (limited to 'api-bank.rst')
-rw-r--r-- | api-bank.rst | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/api-bank.rst b/api-bank.rst new file mode 100644 index 00000000..bed1ec32 --- /dev/null +++ b/api-bank.rst @@ -0,0 +1,48 @@ +========= +Banks API +========= + +The following APIs are served from banks, in order to allow mints to +deposit funds to money recipients. A typical scenario for calling this +APIs is after a merchant has deposited coins to the mint, and the mint +needs to give real money to the merchant. + +-------- +Test API +-------- + +This API is useful for testing purposes, as no real money will be +involved. + +.. _bank-deposit: +.. http:post:: /admin/add/incoming + +**Request:** The body of this request must have the format of a `BankDepositRequest`_. + +**Response:** + +:status 200: The request has been correctly handled, so the funds have been transferred to the merchant's account +**Details:** + + .. _BankDepositRequest: + .. code-block:: tsref + + interface BankDepositRequest { + + // JSON 'amount' object. The amount the caller wants to transfer + // to the recipient's count + f: Amount; + + // The transaction id (meant as in 'Taler transaction id') according + // to which the caller is now giving money to the recipient. That way, + // the recipient can link inwards money to commercial activity. + tid: number; + + // The recipient's account identificator. For this testing purpose, the + // account format will just be the normal IBAN format having the token "TEST" + // in place of the country code. For instance, if "SA03 8000 0000 6080 1016 7519" + // were a valid Saudi Arabian IBAN, then "TEST03 8000 0000 6080 1016 7519" would + // be a correct test account number as well. + account: string; + + } |