From 258de337784e561526e7cb307591ad21e34a416c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 26 Jul 2020 13:23:27 +0200 Subject: use 402 (required for consistency with HTML API) --- core/api-merchant.rst | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'core') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 4b478b37..24936086 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -1370,22 +1370,17 @@ Payment processing **Response:** :status 200 OK: - The response is a `PublicPayStatusResponse`, with ``paid`` true. + The response is a `StatusPaidResponse`. + :status 402 PaymentRequired: + The response is a `StatusUnpaidResponse`. :status 403 Forbidden: The ``h_contract`` does not match the order. :status 404 Not found: The merchant backend is unaware of the order. - .. ts:def:: PublicPayStatusResponse - - type PublicPayStatusResponse = StatusPaid | StatusUnpaid - - .. ts:def:: StatusPaid + .. ts:def:: StatusPaidResponse interface StatusPaid { - // Has the payment for this order (ever) been completed? - order_status: "paid"; - // Was the payment refunded (even partially, via refund or abort)? refunded: boolean; @@ -1400,12 +1395,9 @@ Payment processing } - .. ts:def:: StatusUnpaid + .. ts:def:: StatusUnpaidResponse interface StatusUnpaid { - // Has the payment for this order (ever) been completed? - order_status: "unpaid"; - // URI that the wallet must process to complete the payment. taler_pay_uri: string; -- cgit v1.2.3