aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util/src/wallet-types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r--packages/taler-util/src/wallet-types.ts47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 402a9ed95..d7685fa6e 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -2081,3 +2081,50 @@ export interface InitiatePeerPullPaymentResponse {
transactionId: string;
}
+
+
+/**
+ * Detailed reason for why the wallet's balance is insufficient.
+ */
+export interface PayMerchantInsufficientBalanceDetails {
+ /**
+ * Amount requested by the merchant.
+ */
+ amountRequested: AmountJson;
+
+ /**
+ * Balance of type "available" (see balance.ts for definition).
+ */
+ balanceAvailable: AmountJson;
+
+ /**
+ * Balance of type "material" (see balance.ts for definition).
+ */
+ balanceMaterial: AmountJson;
+
+ /**
+ * Balance of type "age-acceptable" (see balance.ts for definition).
+ */
+ balanceAgeAcceptable: AmountJson;
+
+ /**
+ * Balance of type "merchant-acceptable" (see balance.ts for definition).
+ */
+ balanceMechantAcceptable: AmountJson;
+
+ /**
+ * Balance of type "merchant-depositable" (see balance.ts for definition).
+ */
+ balanceMechantDepositable: AmountJson;
+
+ /**
+ * If the payment would succeed without fees
+ * (i.e. balanceMechantWireable >= amountRequested),
+ * this field contains an estimate of the amount that would additionally
+ * be required to cover the fees.
+ *
+ * It is not possible to give an exact value here, since it depends
+ * on the coin selection for the amount that would be additionally withdrawn.
+ */
+ feeGapEstimate: AmountJson;
+} \ No newline at end of file