From d6df3784a31df42b5d2e77ef92259b62c7a6c47b Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Wed, 29 Apr 2020 09:45:15 -0300 Subject: slight tweaks to proposed transactions wallet API --- taler-wallet.rst | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'taler-wallet.rst') diff --git a/taler-wallet.rst b/taler-wallet.rst index 9ebc1f36..f9161211 100644 --- a/taler-wallet.rst +++ b/taler-wallet.rst @@ -121,6 +121,12 @@ Transactions are all operations or events that are affecting the balance. // true if the transaction is still pending, false otherwise pending: boolean; + + // Raw amount of the transaction (exclusive of fees or other extra costs) + amountRaw: Amount; + + // Amount added or removed from the wallet's balance (including all fees and other costs) + amountEffective: Amount; } .. ts:def:: TransactionType @@ -129,7 +135,8 @@ Transactions are all operations or events that are affecting the balance. TransactionWithdrawal | TransactionPayment | TransactionRefund | - TransactionTip + TransactionTip | + TransactionRefresh ) .. ts:def:: TransactionWithdrawal @@ -165,6 +172,13 @@ Transactions are all operations or events that are affecting the balance. // Additional information about the payment. info: TransactionInfo; + // true if the payment failed, false otherwise. + // Note that failed payments with zero effective amount will not be returned by the API. + failed: boolean; + + // Amount that must be paid for the contract + amountRaw: Amount; + // Amount that was paid, including deposit, wire and refresh fees. amountEffective: Amount; } @@ -178,9 +192,6 @@ Transactions are all operations or events that are affecting the balance. // More information about the merchant merchant: Merchant; - // Amount that must be paid for the contract - amount: Amount; - // Summary of the order, given by the merchant summary: string; @@ -199,6 +210,9 @@ Transactions are all operations or events that are affecting the balance. interface TransactionRefund extends Transaction { type: string = "refund", + // ID for the transaction that is refunded + refundedTransactionId: string; + // Additional information about the refunded payment info: TransactionInfo; @@ -236,6 +250,24 @@ Transactions are all operations or events that are affecting the balance. amountEffective: Amount; } + .. ts:def:: TransactionRefresh + + // A transaction shown for refreshes that are not associated to other transactions + // such as a refresh necessary before coin expiration. + // It should only be returned by the API if the effective amount is different from zero. + interface TransactionRefresh extends Transaction { + type: string = "refresh", + + // Exchange that the coins are refreshed with + exchangeBaseUrl: string; + + // Raw amount that is refreshed + amountRaw: Amount; + + // Amount that will be paid as fees for the refresh + amountEffective: Amount; + } + Refunds ------- -- cgit v1.2.3