Contents

POST /accounts#

Create a new bank account. Depending on the configuration, the account creation is self-serve, or only restricted to the administrators.

Request:

interface RegisterAccountRequest {
  // Username of the account
  // Must match [a-zA-Z0-9-._~]{1, 126}
  username: string;

  // Password of the account used for authentication
  password: string;

  // Legal name of the account owner
  name: string;

  // Make this account visible to anyone?
  // Defaults to false.
  is_public?: boolean;

  // Make this account a taler exchange account?
  // If true:
  // - incoming transactions to the account that do not
  //   have a valid reserve public key are automatically
  // - the account provides the taler-wire-gateway-api endpoints
  // Defaults to false.
  is_taler_exchange?: boolean;

  // Addresses where to send the TAN for protected operations.
  contact_data?: ChallengeContactData;

  // Payto URI of a fiat bank account.
  // Payments will be sent to this bank account
  // when the user wants to convert the regional currency
  // back to fiat currency outside bank.
  cashout_payto_uri?: string;

  // Simple payto URI of this bank account.
  // Used mostly for testing, this field is ignored if the bank payment
  // method is not IBAN.
  payto_uri?: string;

  // If present, set the max debit allowed for this user
  // Only admin can set this property.
  debit_threshold?: Amount;

  // If present, set the user conversion rate class
  // Only admin can set this property.
  // @since **v9**
  conversion_rate_class_id?: Integer;

  // @deprecated in **v10**
  // If present, enables 2FA and set the TAN channel used for challenges
  // Only admin can set this property, other user can reconfig their account
  // after creation.
  tan_channel?: TanChannel;

  // If present, enables 2FA and set the TAN channels used for challenges
  // Only admin can set this property, other user can reconfig their account
  // after creation.
  // @since **v10**
  tan_channels?: TanChannel[];

  // @deprecated in **v9**, use conversion_rate_class_id instead
  min_cashout?: Amount;
}
interface ChallengeContactData {
  // E-Mail address
  email?: EmailAddress;

  // Phone number.
  phone?: PhoneNumber;
}

Response:

200 OK:

Response is a RegisterAccountResponse.

400 Bad request:

Input data was invalid. For example, the client specified a invalid phone number or e-mail address.

401 Unauthorized:

Invalid or missing credentials.

403 Forbidden:

Missing rights.

409 Conflict:
  • TALER_EC_BANK_REGISTER_USERNAME_REUSE : username already used.

  • TALER_EC_BANK_REGISTER_PAYTO_URI_REUSE : payto URI already used.

  • TALER_EC_BANK_UNALLOWED_DEBIT : admin account does not have sufficient funds to grant bonus.

  • TALER_EC_BANK_RESERVED_USERNAME_CONFLICT : a reserved username was attempted, like admin or bank

  • TALER_EC_BANK_NON_ADMIN_PATCH_DEBT_LIMIT : a non-admin user has tried to create an account with a customer debt limit.

  • TALER_EC_BANK_NON_ADMIN_SET_CONVERSION_RATE_CLASS : a non-admin user has tried to create an account with a conversion rate class. Since v9

  • TALER_EC_BANK_NON_ADMIN_SET_TAN_CHANNEL : a non-admin user has tried to create an account with 2fa.

  • TALER_EC_BANK_TAN_CHANNEL_NOT_SUPPORTED: tan_channel or one of tan_channels is not supported, check bank config to find supported ones.

  • TALER_EC_BANK_MISSING_TAN_INFO: the user did not share any contact data where to send the TAN via tan_channel or one of tan_channels.

  • TALER_EC_BANK_PASSWORD_TOO_SHORT: password is shorter than 8 characters.

  • TALER_EC_BANK_PASSWORD_TOO_LONG: password is longer than 64 characters.

  • TALER_EC_BANK_CONVERSION_RATE_CLASS_UNKNOWN : no conversion rate class found for this id. Since v9

Details:

interface RegisterAccountResponse {
  // Full payto URI of this bank account.
  internal_payto_uri: string;
}