taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-withdrawal-details-for-uri.rst (2653B)


      1 .. ts:op:: getWithdrawalDetailsForUri
      2   :deprecated:
      3 
      4   This operation is **deprecated**.  Use
      5   :ts:op:`prepareBankIntegratedWithdrawal` instead.
      6 
      7   Get details for withdrawing via a ``taler://withdraw`` URI, without
      8   creating a withdrawal transaction.
      9 
     10   **Request:**
     11 
     12   The request must be a `GetWithdrawalDetailsForUriRequest` object.
     13 
     14   **Response:**
     15 
     16   On success, the result is a `WithdrawUriInfoResponse` object (see
     17   :ts:op:`prepareBankIntegratedWithdrawal`).
     18 
     19   **Side effects:**
     20 
     21   Queries the bank's bank integration API over the network; the
     22   exchange suggested by the bank may be fetched and ephemerally added
     23   to the wallet's known exchanges.  No transaction is created.
     24 
     25   **Expected errors:**
     26 
     27   The caller can handle the following errors inline:
     28   ``WALLET_TALER_URI_MALFORMED``.
     29 
     30 .. ts:def:: WithdrawUriInfoResponse
     31 
     32   interface WithdrawUriInfoResponse {
     33     operationId: string;
     34     status: WithdrawalOperationStatusFlag;
     35 
     36     // URL for confirming the transfer at the bank.
     37     confirmTransferUrl?: string;
     38 
     39     currency: string;
     40 
     41     // Amount that will be withdrawn (raw amount, without fee
     42     // considerations).  Only given once the amount is fixed.
     43     amount: AmountString | undefined;
     44 
     45     // Set to true if the user is allowed to edit the amount.
     46     // Note that even with a non-editable amount, the amount might be
     47     // undefined at the beginning of the withdrawal process.
     48     editableAmount: boolean;
     49 
     50     // Maximum amount that the wallet can choose to withdraw.
     51     maxAmount: AmountString | undefined;
     52 
     53     wireFee: AmountString | undefined;
     54 
     55     // Exchange suggested by the bank, if any.
     56     defaultExchangeBaseUrl?: string;
     57 
     58     editableExchange: boolean;
     59 
     60     // Exchanges that can be used for the withdrawal, filtered to the
     61     // currency of the withdrawal operation.  If the exchange is not
     62     // editable, contains only the bank-suggested exchange.
     63     possibleExchanges: ExchangeListItem[];
     64   }
     65 
     66 .. ts:def:: WithdrawalOperationStatusFlag
     67 
     68   // Status of a bank-integrated withdrawal operation:
     69   // - "pending": pending parameter selection (exchange and reserve
     70   //   public key)
     71   // - "selected": parameters selected, pending confirmation
     72   // - "aborted": the operation has been aborted
     73   // - "confirmed": the transfer has been confirmed and registered by
     74   //   the bank
     75   type WithdrawalOperationStatusFlag =
     76     | "pending"
     77     | "selected"
     78     | "aborted"
     79     | "confirmed";
     80 
     81 .. ts:def:: GetWithdrawalDetailsForUriRequest
     82 
     83   interface GetWithdrawalDetailsForUriRequest {
     84     talerWithdrawUri: string;
     85 
     86     // Deprecated, not used.
     87     restrictAge?: number;
     88 
     89     progressToken?: string;
     90   }