- POST /accounts/$USERNAME/cashouts#
Initiates a conversion to fiat currency. The fiat bank account to be credited is the one specified at registration time via the cashout_payto_uri parameter. The regional bank account is specified via
$USERNAME.Note
Consult the cashout rates call to learn about any applicable fee or exchange rate.
Request:
interface CashoutRequest { // Nonce to make the request idempotent. Requests with the same // request_uid that differ in any of the other fields // are rejected. request_uid: ShortHashCode; // Optional subject to associate to the // cashout operation. This data will appear // as the incoming wire transfer subject in // the user's fiat bank account. subject?: string; // That is the plain amount that the user specified // to cashout. Its $currency is the (regional) currency of the // bank instance. amount_debit: Amount; // That is the amount that will effectively be // transferred by the bank to the user's fiat bank // account. // It is expressed in the fiat currency and // is calculated after the cashout fee and the // exchange rate. See the /cashout-rate call. // The client needs to calculate this amount // correctly based on the amount_debit and the cashout rate, // otherwise the request will fail. amount_credit: Amount; }
Response:
- 200 OK:
The cashout request was correctly created. This returns the CashoutResponse response.
- 202 Accepted:
2FA is required for this operation. This returns the ChallengeResponse response. @since v10
- 401 Unauthorized:
Invalid or missing credentials.
- 403 Forbidden:
Missing rights.
- 404 Not found:
The account pointed by
$USERNAMEwas not found.- 409 Conflict:
TALER_EC_BANK_TRANSFER_REQUEST_UID_REUSED: an operation with the samerequest_uidbut different details has been submitted before.TALER_EC_BANK_BAD_CONVERSION: exchange rate was calculated incorrectly by the client.TALER_EC_BANK_BANK_CONVERSION_AMOUNT_TO_SMALL: the amount of the cashout is too small.TALER_EC_BANK_UNALLOWED_DEBIT: the account does not have sufficient funds or the amount is too low or too high.TALER_EC_BANK_CONFIRM_INCOMPLETE: the user did not share any cashout payto to uri where to wire funds.
- 501 Not Implemented:
TALER_EC_BANK_TAN_CHANNEL_NOT_SUPPORTED: the chosentan_channelor one oftan_channelsis not currently supported.This server does not support conversion, client should check config response.
Details:
interface CashoutResponse { // ID identifying the operation being created cashout_id: Integer; }