gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-api] branch master updated: Drafting headless withdr


From: gnunet
Subject: [GNUnet-SVN] [taler-api] branch master updated: Drafting headless withdrawals API.
Date: Fri, 28 Jun 2019 15:11:27 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository api.

The following commit(s) were added to refs/heads/master by this push:
     new 8c0ae38  Drafting headless withdrawals API.
8c0ae38 is described below

commit 8c0ae3802525659729ad4f30f5f567cafa9a8121
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Jun 28 15:10:13 2019 +0200

    Drafting headless withdrawals API.
---
 api-bank.rst | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/api-bank.rst b/api-bank.rst
index 9256e3d..8c6211c 100644
--- a/api-bank.rst
+++ b/api-bank.rst
@@ -21,6 +21,83 @@
 Bank API
 =========
 
+This API provides programmatic user registration in the bank.
+
+.. _bank-register:
+.. http:post:: /user/register
+
+**Request** The body of this request must have the format of a 
`BankRegistrationRequest`_.
+
+**Response**
+
+:status 200 OK: The new user has been correctly registered.
+:status 409 Conflict: the username requested by the client is not available 
anymore
+:status 406 Not Acceptable: unacceptable characters were given as username / 
password.
+
+**Details**
+
+.. _BankRegistrationRequest:
+.. code-block:: tsref
+
+  interface BankRegistrationRequest {
+  
+    // Username to use for registration.
+    username: string;
+
+    // Password to associate with the username.
+    password: string;
+  }
+
+
+This API provides programmatic withdrawing of cash via Taler.
+
+.. _bank-register:
+.. http:post:: /taler/withdraw
+
+**Request** The body of this request must have the format of a 
`BankTalerWithdrawRequest`_.
+
+**Response**
+
+:status 200 OK: The withdrawal was correctly initiated, and a 
`BankTalerWithdrawResponse`_ object is returned.
+:status 406 Not Acceptable: the user does not have sufficient credit to 
fulfill their request.
+:status 404 Not Found: The (exchange's) bank account was not found.
+
+**Details**
+
+.. _BankTalerWithdrawRequest:
+.. code-block:: tsref
+
+  interface BankTalerWithdrawRequest {
+
+    // Authentication method used
+    auth: BankAuth;
+  
+    // How much money will be withdrawn
+    amount: Amount;
+
+    // Reserve public key.
+    reserve_pub: string;
+
+    // Exchange bank details specified in the 'payto'
+    // format.  NOTE: this field is optional, therefore
+    // the bank will initiate the withdrawal with the
+    // default exchange, if not given.
+    exchange_wire_details: string;
+  }
+
+.. _BankTalerWithdrawResponse:
+.. code-block:: tsref
+
+  interface BankTalerWithdrawResponse {
+
+    // Sender account details in 'payto' format.
+    sender_wire_details: string;
+
+    // Exchange base URL.  Optional: only returned
+    // if the user used the default exchange.
+    exchange_url: string;
+  }
+
 This API allows one user to send money to another user, within the same "test"
 bank.  The user calling it has to authenticate by including his credentials in 
the
 request.

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]