Contents

POST /accounts/$USERNAME/transactions#

Create a new transaction where the bank account with the label USERNAME is debited.

Request:

interface CreateTransactionRequest {
  // Address in the payto format of the wire transfer receiver.
  // It needs at least the 'message' query string parameter.
  payto_uri: string;

  // Transaction amount (in the $currency:x.y format), optional.
  // However, when not given, its value must occupy the 'amount'
  // query string parameter of the 'payto' field.  In case it
  // is given in both places, the payto_uri's takes the precedence.
  amount: string;

  // Nonce to make the request idempotent.  Requests with the same
  // request_uid that differ in any of the other fields
  // are rejected.
  // @since **v4**, will become mandatory in the next version.
  request_uid?: ShortHashCode;
}

Response:

200 Ok:

The bank responds with an CreateTransactionResponse object.

202 Accepted:

2FA is required for this operation. This returns the ChallengeResponse response. @since v10

400 Bad Request:

The request was invalid or the payto://-URI used unacceptable features.

401 Unauthorized:

Invalid or missing credentials.

403 Forbidden:

Missing rights.

404 Not found:

The account pointed by $USERNAME was not found.

409 Conflict:
  • TALER_EC_BANK_SAME_ACCOUNT : creditor account is the same than USERNAME.

  • TALER_EC_BANK_UNKNOWN_CREDITOR : creditor account was not found.

  • TALER_EC_BANK_UNALLOWED_DEBIT : the account does not have sufficient funds or the amount is too low or too high.

  • TALER_EC_BANK_TRANSFER_REQUEST_UID_REUSED: an operation with the same request_uid but different details has been submitted before.

Details:

interface CreateTransactionResponse {
  // ID identifying the transaction being created
  row_id: Integer;
}