Contents

prepareBankIntegratedWithdrawal#

Prepare a bank-integrated withdrawal operation.

Wallet-core resolves the taler://withdraw URI against the bank’s bank integration API, obtains the status of the withdrawal operation and creates a withdrawal transaction in a dialog state. If the bank suggests an exchange that is not known to the wallet yet, it is ephemerally added to the wallet’s known exchanges.

After the user has reviewed the operation’s details (and selected an amount and an exchange, where the bank allows choosing them), the client confirms the withdrawal with confirmWithdrawal.

Request:

The request must be a PrepareBankIntegratedWithdrawalRequest object.

Response:

On success, the result is a PrepareBankIntegratedWithdrawalResponse object.

Side effects:

Queries the bank’s bank integration API over the network and creates the withdrawal transaction in the wallet database. May also fetch and ephemerally add the exchange suggested by the bank.

Expected errors:

The caller can handle the following errors inline: WALLET_TALER_URI_MALFORMED.

Details:

The operation is idempotent with respect to the URI: calling it again with the same talerWithdrawUri returns the existing withdrawal transaction instead of creating a new one. If the bank reports the withdrawal operation as already selected, confirmed or aborted and the wallet has no transaction for it, the request fails with WALLET_WITHDRAWAL_OPERATION_ABORTED_BY_BANK.

interface PrepareBankIntegratedWithdrawalRequest {
  talerWithdrawUri: string;

  progressToken?: string;
}
interface PrepareBankIntegratedWithdrawalResponse {
  // Transaction ID of the withdrawal transaction (newly created or
  // already existing for the same URI).
  transactionId: TransactionIdStr;

  // Details of the bank-side withdrawal operation.
  info: WithdrawUriInfoResponse;
}