Account number generation

Mambu can generate IBANs or domestic account numbers for your Internal accounts so you don’t have to build and operate your own allocation logic (uniqueness, formatting, country rules, etc.).

When enabled, Mambu will generate account numbers based on a predefined configuration, initially performed by your Mambu account manager.

Account generation options

  • Account type: IBAN, domestic account number
  • Account country: For IBANs, which ISO 4217 country code applies
  • Account range: Number and type of allowed characters, including allowed sub-ranges (for instance (20,30)[0-9A-Z]{8})
  • Account prefix or suffix: potentially including bank or branch codes, or account types
  • Recycling: Whether to recycle existing disabled Internal accounts

Benefits

  • Faster onboarding: Mambu generates end-user account numbers for you
  • IBAN-ready: Mambu produces valid IBANs, already supporting multiple IBAN countries, and can extend support for any new country you may need
  • Domestic numbers: Mambu can generate domestic account numbers when configured
  • Ability to support sub account ranges: you can define an allowed range/pattern to only generates account numbers that fall within this usable subset
  • Fewer errors: uniqueness checks help prevent duplicates

How it works

When calling the POST /internal_accounts endpoint to create a new Internal account of type = own with generate_account_number = true:

  1. Mambu checks the account number generation settings
  2. If you did not provide an account_number
    • Mambu generates a unique value within the allowed range
  3. If you provided an account_number:
    • Mambu treats it as the customer-defined portion and may pad it (e.g., with leading zeros) to fit the configured length constraints
  4. Mambu ensures uniqueness and returns the created Internal account with the final generated account_number, and triggers the associated internal_account:created event