commit 7f215f08beecc8c95d19ad0730d1dde23f3c0d4e
parent 387601cf8cf9ea0cab6c36348a72150605cd4c4f
Author: Florian Dold <florian@dold.me>
Date: Fri, 25 Apr 2025 15:30:11 +0200
merchant: document error codes
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -292,6 +292,12 @@ Making the payment
This includes the case where the payment is insufficient (sum is below
the required total amount, for example because the wallet calculated the
fees wrong).
+
+ Applicable error codes:
+
+ * ``MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND``: Wallet tried
+ to pay with a non-existent denomination.
+
:http:statuscode:`402 Payment required`:
There used to be a sufficient payment, but due to refunds the amount effectively
paid is no longer sufficient. (If the amount is generally insufficient, we
@@ -311,6 +317,12 @@ Making the payment
(this includes re-using the same coin after a refund),
the response will include the ``exchange_url`` for which the payment failed,
in addition to the response from the exchange to the ``/batch-deposit`` request.
+
+ Applicable error codes:
+
+ * ``MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_FUNDS``: Exchange reported insufficient
+ funds for one of the coins.
+
:http:statuscode:`410 Gone`:
The offer has expired and is no longer available.
:http:statuscode:`412 Precondition failed`: