From 75af774c016b02cda6fc2bbe32dde6a4ba74d944 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 2 Oct 2020 19:34:00 +0200 Subject: spec update to address #6616 --- core/api-merchant.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index b993c63e..999c4f99 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -1234,7 +1234,7 @@ Payment processing .. http:get:: /private/orders/$ORDER_ID Merchant checks the payment status of an order. If the order exists but is not payed - yet, the response provides a redirect URL. When the user goes to this URL, + and not claimed yet, the response provides a redirect URL. When the user goes to this URL, they will be prompted for payment. Differs from the ``/public/`` API both in terms of what information is returned and in that the wallet must provide the contract hash to authenticate, while for this API we assume that the @@ -1257,12 +1257,12 @@ Payment processing .. ts:def:: MerchantOrderStatusResponse - type MerchantOrderStatusResponse = CheckPaymentPaidResponse | CheckPaymentUnpaidResponse + type MerchantOrderStatusResponse = CheckPaymentPaidResponse | CheckPaymentClaimedResponse | CheckPaymentUnpaidResponse .. ts:def:: CheckPaymentPaidResponse interface CheckPaymentPaidResponse { - // did the customer pay for this contract + // the customer paid for this contract order_status: "paid"; // Was the payment refunded (even partially) @@ -1292,7 +1292,7 @@ Payment processing // Contract terms contract_terms: ContractTerms; - // Ihe wire transfer status from the exchange for this order if available, otherwise empty array + // The wire transfer status from the exchange for this order if available, otherwise empty array wire_details: TransactionWireTransfer[]; // Reports about trouble obtaining wire transfer details, empty array if no trouble were encountered. @@ -1307,9 +1307,21 @@ Payment processing order_status_url: string; } + .. ts:def:: CheckPaymentClaimedResponse + + interface CheckPaymentClaimedResponse { + // a wallet claimed the order, but did not yet pay for the contract + order_status: "claimed"; + + // Contract terms + contract_terms: ContractTerms; + + } + .. ts:def:: CheckPaymentUnpaidResponse interface CheckPaymentUnpaidResponse { + // the order was neither claimed nor paid order_status: "unpaid"; // URI that the wallet must process to complete the payment. -- cgit v1.2.3