summaryrefslogtreecommitdiff
path: root/api-merchant.rst
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-09 21:59:38 +0200
committerChristian Grothoff <christian@grothoff.org>2016-06-09 21:59:38 +0200
commit8bff8ca74559e5f7887e8ec85b21ddc71ce4c695 (patch)
tree979d76b1be8be2a848b18d658b26ea0f57ff30dd /api-merchant.rst
parente5502bf9834b16b9d6cd00cbef69612b662bbdf2 (diff)
downloaddocs-8bff8ca74559e5f7887e8ec85b21ddc71ce4c695.tar.gz
docs-8bff8ca74559e5f7887e8ec85b21ddc71ce4c695.tar.bz2
docs-8bff8ca74559e5f7887e8ec85b21ddc71ce4c695.zip
document /track API of merchant
Diffstat (limited to 'api-merchant.rst')
-rw-r--r--api-merchant.rst58
1 files changed, 53 insertions, 5 deletions
diff --git a/api-merchant.rst b/api-merchant.rst
index ddfb29e4..e37074d1 100644
--- a/api-merchant.rst
+++ b/api-merchant.rst
@@ -23,7 +23,7 @@ Before reading the API reference documentation, it is suggested to read the :ref
The Frontent HTTP API
------------------------------
-.. http:get:: /taler/contract
+.. http:get:: contract_url
Triggers the contract generation. Note that the URL may differ between
merchants.
@@ -42,7 +42,7 @@ The Frontent HTTP API
.. _pay:
.. http:post:: pay_url
-
+
Send the deposit permission to the merchant. The client should POST a `deposit-permission`_
object. Note that ``pay_url`` is make known by the frontent to the wallet via the DOM event
@@ -60,7 +60,7 @@ The Frontent HTTP API
// a 53-bit number corresponding to the contract being agreed on
transaction_id: number;
-
+
// total amount being paid as per the contract (the sum of the amounts from the `coins` may be larger to cover deposit fees not covered by the merchant)
total_amount: Amount;
@@ -100,7 +100,7 @@ The Frontent HTTP API
// exchange's signature over this coin's public key
ub_sig: RsaSignature;
-
+
// the signature made by the coin's private key on a `struct TALER_DepositRequestPS`. See section `Signatures` on the exchange's API page.
coin_sig: EddsaSignature;
}
@@ -192,6 +192,55 @@ The following API are made available by the merchant's `backend` to the merchant
`backend` is unavailable, in which case the customer might appreciate some
reassurance that the merchant is working on getting his systems back online.
+
+
+.. http:get:: /track/transfer
+
+ Provides deposits associated with a given wire transfer.
+
+ **Request:**
+
+ :query wtid: raw wire transfer identifier identifying the wire transfer (a base32-encoded value)
+ :query exchange_uri: base URI of the exchange that made the wire transfer
+
+ **Response:**
+
+ :status 200 OK:
+ The wire transfer is known to the exchange, details about it follow in the body.
+ The body of the response is a `TrackTransferResponse`_. Note that
+ the similarity to the response given by the exchange for a /track/transfer
+ is completely intended.
+
+ :status 404 Not Found:
+ The wire transfer identifier is unknown to the exchange.
+
+.. http:get:: /track/transaction
+
+ Provide the wire transfer identifier associated with an (existing) deposit operation.
+
+ **Request:**
+
+ :query transaction_id: ID of the transaction we want to trace (an integer)
+
+ **Response:**
+
+ :status 200 OK:
+ The deposit has been executed by the exchange and we have a wire transfer identifier.
+ The response body is a `TrackTransactionResponse`_ object. Note that
+ the similarity to the response given by the exchange for a /track/transaction
+ is completely intended.
+
+ :status 202 Accepted:
+ The deposit request has been accepted for processing, but was not yet
+ executed. Hence the exchange does not yet have a wire transfer identifier.
+ The merchant should come back later and ask again.
+ The response body is a `TrackTransactionAcceptedResponse`_. Note that
+ the similarity to the response given by the exchange for a /track/transaction
+ is completely intended.
+
+ :status 404 Not Found: The transaction is unknown to the backend.
+
+
---------
Encodings
---------
@@ -416,4 +465,3 @@ should be set to ``TALER_SIGNATURE_MERCHANT_CONTRACT``.
*/
struct GNUNET_HashCode h_contract;
}
-