diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-16 16:15:29 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-16 16:15:29 +0200 |
commit | 3653625017b2ffd3f6903bdf914314e492142d1a (patch) | |
tree | 96d29fb89d383155818d43b74aef33475874b72d /core/api-merchant.rst | |
parent | e887347f3cb932d0b8e2852a78f6893dba39dcbd (diff) | |
download | docs-3653625017b2ffd3f6903bdf914314e492142d1a.tar.gz docs-3653625017b2ffd3f6903bdf914314e492142d1a.tar.bz2 docs-3653625017b2ffd3f6903bdf914314e492142d1a.zip |
use 202 if JSON was requested
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r-- | core/api-merchant.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index db1bf9cb..8849db2b 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 { |