Contents

confirmWithdrawal#

Confirm a withdrawal transaction.

Confirms a bank-integrated withdrawal that was previously prepared with prepareBankIntegratedWithdrawal, selecting the exchange to withdraw from and, where the withdrawal operation has an editable amount, the amount to withdraw. The exchange’s terms of service must have been accepted and any pending exchange key change must have been confirmed beforehand.

After the confirmation, the user authorizes the actual wire transfer to the exchange in their banking application.

Request:

The request must be a ConfirmWithdrawalRequest object.

Response:

On success, the result is an empty object.

Side effects:

Updates the withdrawal transaction in the wallet database and starts the background task that registers the reserve with the bank and withdraws the coins. May talk to the exchange, the bank integration API and the bank conversion service over the network; when an amount is given, denomination verification results are stored in the database. A sender bank account that is new to the wallet is added to its known bank accounts.

Expected errors:

The caller can handle the following errors inline: WALLET_KYC_LIMIT_EXCEEDED, WALLET_NO_SUITABLE_EXCHANGE, WALLET_EXCHANGE_TOS_NOT_ACCEPTED, WALLET_TRANSACTION_NOT_FOUND, GENERIC_CURRENCY_MISMATCH, WALLET_CORE_API_BAD_REQUEST, WALLET_EXCHANGE_KEYS_NOT_ACCEPTED.

Details:

The transactionId must refer to a withdrawal transaction that is still in the dialog state. Confirming is idempotent: once the withdrawal has been registered with the bank, repeating the confirmation succeeds without further effect.

The amount may only be omitted for withdrawals from a foreign account (a taler://withdraw URI with external-confirmation=1), where the bank fixes the amount when the transfer is confirmed.

interface ConfirmWithdrawalRequest {
  transactionId: string;
  exchangeBaseUrl: string;
  amount?: AmountString | undefined;
  forcedDenomSel?: ForcedDenomSel;
  restrictAge?: number;

  progressToken?: string;
}
interface ForcedDenomSel {
  denoms: {
    value: AmountString;
    count: number;
  }[];
}