gnunet-svn
[Top][All Lists]
Advanced

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

[taler-docs] 01/02: use 202 if JSON was requested


From: gnunet
Subject: [taler-docs] 01/02: use 202 if JSON was requested
Date: Sun, 16 Aug 2020 16:15:38 +0200

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

grothoff pushed a commit to branch master
in repository docs.

commit 3653625017b2ffd3f6903bdf914314e492142d1a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Aug 16 16:15:29 2020 +0200

    use 202 if JSON was requested
---
 core/api-merchant.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/core/api-merchant.rst b/core/api-merchant.rst
index db1bf9c..8849db2 100644
--- a/core/api-merchant.rst
+++ b/core/api-merchant.rst
@@ -1389,6 +1389,12 @@ Payment processing
   ignored (treated as zero). If the backend installation does not include the
   required HTML templates, a 406 status code is returned.
 
+  In the case that the request was made with a claim token (even the wrong one)
+  and the order was claimed and paid, the server will redirect the client to
+  the fulfillment URL.  This redirection will happen with a 302 status code
+  if the "Accept" header specified "text/html", and with a 202 status code
+  otherwise.
+
   **Request:**
 
   :query h_contract=HASH: hash of the order's contract terms (this is used to 
authenticate the wallet/customer in case $ORDER_ID is guessable). Required once 
an order was claimed.
@@ -1405,6 +1411,10 @@ Payment processing
 
   :status 200 OK:
     The response is a `StatusPaidResponse`.
+  :status 202 Accepted:
+    The response is a `StatusGotoResponse`. Only returned if the content type 
requested was not HTML.
+  :status 302 Found:
+    The client should go to the indicated location. Only returned if the 
content type requested was HTML.
   :status 402 PaymentRequired:
     The response is a `StatusUnpaidResponse`.
   :status 403 Forbidden:
@@ -1436,6 +1446,15 @@ Payment processing
 
     }
 
+    .. ts:def:: StatusGotoResponse
+
+    interface StatusGotoResponse {
+      // The client should go to the fulfillment URL, it may be ready or
+      // might have some other interesting status.
+      fulfillment_url: string;
+
+    }
+
   .. ts:def:: StatusUnpaidResponse
 
     interface StatusUnpaidResponse {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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