From 75c5d7e9fa43319ca8636aa03cacd88b01ed837b Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 7 Aug 2020 13:59:55 +0530 Subject: wallet api --- taler-wallet.rst | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/taler-wallet.rst b/taler-wallet.rst index ae0656dc..0b44b61d 100644 --- a/taler-wallet.rst +++ b/taler-wallet.rst @@ -733,6 +733,8 @@ Prepare Pay | PreparePayAlreadyConfirmedResponse | PreparePayInsufficientBalanceResponse; + .. ts:def:: PreparePayPaymentPossibleResponse + interface PreparePayPaymentPossibleResponse { status: "payment-possible"; @@ -749,15 +751,22 @@ Prepare Pay amountEffective: Amount; } + .. ts:def:: PreparePayInsufficientBalanceResponse + interface PreparePayInsufficientBalanceResponse { status: "insufficient-balance"; proposalId: string; + // Amount that the merchant is asking for. + amountRaw: Amount; + // Verbatim contract terms as generated by the merchant. contractTerms: ContractTerms; } + .. ts:def:: PreparePayAlreadyConfirmedResponse + interface PreparePayAlreadyConfirmedResponse { status: "already-confirmed"; @@ -766,6 +775,9 @@ Prepare Pay // Did the payment succeed? paid: boolean; + // Amount that the merchant is asking for. + amountRaw: Amount; + // Redirect URL for the fulfillment page, // only given if paid==true. nextUrl?: string; @@ -778,6 +790,7 @@ Confirm Payment :Name: ``"confirmPay"`` :Description: Confirm making a payment. + :Request: .. ts:def:: GetManualWithdrawalDetailsRequest @@ -785,14 +798,32 @@ Confirm Payment proposalId: string; } :Response: - .. ts:def:: ConfirmPayResult + .. ts:def:: ConfirmPayResultDone + + interface ConfirmPayResultDone { + type: "done"; - interface ConfirmPayResult { // Fulfillment URL augmented with order ID // or a special taler://fulfillment-success URL nextUrl: string; } + .. ts:def:: ConfirmPayResultPending + + // Payment was marked as confirmed, + // but the attempt(s) to pay were not successful yet. + interface ConfirmPayPending { + type: "pending"; + + lastError: TransactionError; + } + + .. ts:def:: ConfirmPayResult + + type ConfirmPayResult = + | ConfirmPayResultDone; + | ConfirmPayResultPending; + Global Errors ------------- -- cgit v1.2.3