Setting a wallet code: API only, not the UI
Last updated: June 29, 2026
You can set a custom wallet code through the API, but not from the UI. In the UI, the wallet code is auto-generated from the wallet name rather than being something you type. Setting a custom code is only available via the API.
How the code is assigned in each path
When you create a wallet in the UI, Lago derives the code from the name. For example, a wallet named "Usage Credits" gets the code usage_credits. When you create a wallet through the API, you can supply the code value yourself. This has been confirmed to work from the API.
What to do if you need a specific code
Create or manage the wallet through the API and pass the code you want. There are no current plans to add custom code entry to the UI, so the API is the supported path for this. If you only created the wallet in the UI to test, recreating it via the API is the way to control the code.
Note that a wallet code being settable does not by itself enforce uniqueness or block creating another wallet with the same code. If you are relying on the code to prevent duplicate wallets per customer, enforce that expectation in your own integration rather than assuming Lago rejects a duplicate code.
This article reflects guidance drawn from customer case resolutions. It is not officially supported documentation and may not apply to all situations.