From 3b80efee1407fe8b53543d7ffd942bc15dc48452 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 6 Jun 2022 19:46:11 +0200 Subject: -document new 409 case --- core/api-merchant.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/api-merchant.rst') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index d8611c2f..cadc1aa6 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -245,18 +245,22 @@ Making the payment The merchant backend could not find the order or the instance and thus cannot process the payment. :http:statuscode:`406 Not acceptable`: The payment is insufficient (sum is below the required total amount). + TODO: Should probably change to a different status code in the future as 406 is technically wrong. :http:statuscode:`408 Request timeout`: The backend took too long to process the request. Likely the merchant's connection to the exchange timed out. Try again. :http:statuscode:`409 Conflict`: - The exchange rejected the payment because a coin was already spent. - The response will include the ``coin_pub`` for which the payment failed, + The exchange rejected the payment because a coin was already spent, or + the merchant rejected the payment because the order was already fully paid + (and then return signatures with refunds). If a coin was already spent, + the response will include the ``coin_pub`` for which the payment failed, in addition to the response from the exchange to the ``/deposit`` request. :http:statuscode:`410 Gone`: The offer has expired and is no longer available. :http:statuscode:`412 Precondition failed`: The given exchange is not acceptable for this merchant, as it is not in the list of accepted exchanges and not audited by an approved auditor. + TODO: Status code may be changed to 409 in the future as 412 is technically wrong. :http:statuscode:`502 Bad gateway`: The merchant's interaction with the exchange failed in some way. The client might want to try again later. -- cgit v1.2.3