From 9f12faa11c8d356a90139c0ed7046223dd8cb6eb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 May 2020 12:43:05 +0200 Subject: address #5987-15826, subpoints #4/#5 --- core/api-merchant.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 3c3f670a..e20b5319 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -946,7 +946,12 @@ Receiving Payments **Request:** - The request must be an `abort request `. + The request must be an `abort request `. We force the wallet + to specify the affected coins as it may only request for a subset of the coins + (i.e. because the wallet knows that some were double-spent causing the failure). + Also we need to know the coins because there may be two wallets "competing" over + the same order and one wants to abort while the other still proceeds with the + payment. Here we need to again know which subset of the deposits to abort. **Response:** @@ -962,6 +967,9 @@ Receiving Payments :status 404 Not found: The merchant backend could not find the order or the instance and thus cannot process the abort request. + :status 410 Gone: + It is too late for aborting, the exchange may have already sent wired funds + to the merchant. :status 412 Precondition Failed: Aborting the payment is not allowed, as the original payment did succeed. :status 424 Failed Dependency: @@ -996,9 +1004,6 @@ Receiving Payments // The amount to be refunded (matches the original contribution) contribution: Amount; - // The refund fee the wallet expects to pay (based on the coin's denomination) - refund_fee: Amount; - // URL of the exchange this coin was withdrawn from. exchange_url: string; } @@ -1230,6 +1235,9 @@ Giving Refunds The refund amount has been increased, the backend responds with a `MerchantRefundResponse` :status 404 Not found: The order is unknown to the merchant + :status 410 Gone: + It is too late for aborting, the exchange may have already wired the funds + to the merchant. :status 409 Conflict: The refund amount exceeds the amount originally paid -- cgit v1.2.3