taler-docs

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

post-withdrawal-operation-WITHDRAWAL_ID.rst (2946B)


      1 .. http:post:: /withdrawal-operation/$WITHDRAWAL_ID
      2 
      3   This endpoint is used by the GNU Taler wallet to supply additional
      4   details needed to complete a withdraw operation.
      5 
      6   **Request:**
      7 
      8   .. ts:def:: BankWithdrawalOperationPostRequest
      9 
     10     interface BankWithdrawalOperationPostRequest {
     11 
     12       // Reserve public key that should become the wire transfer
     13       // subject to fund the withdrawal.
     14       reserve_pub: EddsaPublicKey;
     15 
     16       // Full RFC 8905 (payto) address of the exchange account to be
     17       // credited for the withdrawal.
     18       selected_exchange: string;
     19 
     20       // Selected amount to be transferred. Optional if the
     21       // backend already knows the amount.
     22       // @since **v4**
     23       amount?: Amount;
     24     }
     25 
     26   **Response:**
     27 
     28   :http:statuscode:`200 OK`:
     29     The bank has accepted the withdrawal operation parameters chosen by the wallet.
     30     The response is a `BankWithdrawalOperationPostResponse`.
     31   :http:statuscode:`404 Not found`:
     32     The bank does not know about a withdrawal operation with the specified ``WITHDRAWAL_ID``.
     33   :http:statuscode:`409 Conflict`:
     34     * ``TALER_EC_BANK_UPDATE_ABORT_CONFLICT`` : the withdrawal has been aborted previously and can't be modified.
     35     * ``TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT``:
     36       The wallet selected a different exchange or reserve public key under the same withdrawal ID.
     37     * ``TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT``: the reserve public key is already used.
     38     * ``TALER_EC_BANK_UNKNOWN_ACCOUNT``: the selected exchange account was not found.
     39     * ``TALER_EC_BANK_ACCOUNT_IS_NOT_EXCHANGE``: the selected account is not an exchange.
     40     * ``TALER_EC_BANK_AMOUNT_DIFFERS`` : the specified amount will not work for this
     41       withdrawal (since **v4**).
     42     * ``TALER_EC_BANK_UNALLOWED_DEBIT`` : the account does not have sufficient funds or the amount is too low or too high (since **v4**).
     43 
     44   **Details:**
     45 
     46   .. ts:def:: BankWithdrawalOperationPostResponse
     47 
     48     interface BankWithdrawalOperationPostResponse {
     49       // Current status of the operation
     50       // pending: the operation is pending parameters selection (exchange and reserve public key)
     51       // selected: the operations has been selected and is pending confirmation
     52       // aborted: the operation has been aborted
     53       // confirmed: the transfer has been confirmed and registered by the bank
     54       status: "selected" | "aborted" | "confirmed";
     55 
     56       // URL that the user needs to navigate to in order to
     57       // complete some final confirmation (e.g. 2FA).
     58       //
     59       // Only applicable when ``status`` is ``selected`` or ``pending``.
     60       // It may contain withdrawal operation id
     61       confirm_transfer_url?: string;
     62 
     63       // @deprecated since **v1**, use ``status`` instead
     64       // The transfer has been confirmed and registered by the bank.
     65       // Does not guarantee that the funds have arrived at the exchange already.
     66       transfer_done: boolean;
     67     }