taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

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

use 202 if JSON was requested

Diffstat:
Mcore/api-merchant.rst | 19+++++++++++++++++++
1 file changed, 19 insertions(+), 0 deletions(-)

diff --git 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 {