Many SePay CLI commands need a bank account xid (<bank-account-xid>), such as webhook create --bank-account, va issue and sandbox simulate. Get it with sepay bank-account list (short form sepay ba ls), then view or relabel an account on both sandbox and production.
| Command | Use | Environment |
|---|---|---|
bank-account list | List accounts, get the xid | Both |
bank-account get | View one account | Both |
bank-account update | Change the display label | Both |
bank-account create | Create a test account | Sandbox |
bank-account delete | Delete a test account | Sandbox |
On production, real bank accounts are linked and unlinked in my.sepay.vn, see Add a bank account (Vietnamese).
bank-account list
Lists your company's bank accounts. The ID column is the xid other commands take:
$ sepay bank-account listenv: sandboxID BANK ACCOUNT HOLDER LABEL CONNECTION ACCUMULATED ACTIVE832529c1-xxxx-xxxx-xxxx-fa163e2f7c98 ACB 0000000001 NGUYEN VAN A Cua hang Quan 1 api 0 yesd6719d04-xxxx-xxxx-xxxx-a6006ab65aca ACB 0000000002 NGUYEN VAN A Cua hang Quan 3 api 0 yespage 1/1 · 2 of 2| Flag | Type | Description |
|---|---|---|
--search | string | Search by holder name, label or account number |
--bank | string | Filter by bank, for example ACB |
--active | string | 1 for enabled accounts only, 0 for disabled ones |
--page, --per-page | int | Pagination; up to 100 rows per page |
The CONNECTION column says whether the account connects to SePay over api, sms, both (api+sms), or - when it isn't connected.
Filters by accumulated balance and last transaction date, and the sort options, are in the Command list.
bank-account get
Shows one account by xid. Leave the xid out and the CLI lets you pick from a list:
$ sepay bank-account get 832529c1-xxxx-xxxx-xxxx-fa163e2f7c98env: sandboxFIELD VALUEID 832529c1-xxxx-xxxx-xxxx-fa163e2f7c98Bank ACB (Ngân hàng TMCP Á Châu)Account 0000000001Holder NGUYEN VAN ALabel Cua hang Quan 1Type individualConnection apiNotifies account number and virtual accountsAccumulated 0Last transaction -Active yesCreated 2026-10-17 15:00:19bank-account update
Changes an account's display label, so accounts at the same bank are easy to tell apart in list:
$ sepay bank-account update 832529c1-xxxx-xxxx-xxxx-fa163e2f7c98 --label "Cua hang Quan 1"env: sandboxUpdated bank account 832529c1-xxxx-xxxx-xxxx-fa163e2f7c98.The label (--label, required) is the only thing it changes. On production it needs the bank-account:write scope, prints ! live: update bank account targets PRODUCTION and asks for confirmation. A script you write yourself needs <bank-account-xid>, --env production and --yes together (confirmation rule).
bank-account create
Creates a sandbox bank account in addition to the one from sandbox init. SePay issues the account number, so there is no flag to choose one:
$ sepay bank-account create --bank ACB --account-type individual --label "Cua hang Quan 3"env: sandboxCreated bank account d6719d04-xxxx-xxxx-xxxx-a6006ab65aca.FIELD VALUEID d6719d04-xxxx-xxxx-xxxx-a6006ab65acaBank ACB (Ngân hàng TMCP Á Châu)Account 0000000002Holder NGUYEN VAN ALabel Cua hang Quan 3Type individualConnection apiNotifies account number and virtual accountsAccumulated 0Last transaction -Active yesCreated 2026-11-04 10:20:41First VA: SPVA00001First VA is the first VA number SePay issued for the account; there's no such line when the bank issues no VA. Notifies says whether the account reports transactions to its account number, to its VAs, or both. It's the choice you get when you create a webhook:
Notifies value | When it shows |
|---|---|
virtual accounts only | The bank reports only transactions to VAs, never to the account number. Seen on API-connected accounts at some banks, for example MSB, KienLongBank, OCB, Vietcombank, and BIDV accounts that aren't enterprise accounts. An account with an SMS connection is never in this case |
account number and virtual accounts | The bank issues official VAs for this account type, or the account is connected over SMS. A webhook gets transactions to both the account number and its VAs |
account number, and any virtual account it has | Every other account. A webhook gets transactions to the account number, and to its VAs if it has any |
With --json, the matching fields are connection_type (api, sms, api+sms, or null when not connected), official_va_supported and va_only.
| Flag | Type | Required | Description |
|---|---|---|---|
--bank | string | Yes | Bank code, for example ACB |
--account-type | string | Yes | individual | business_household | enterprise |
--connection | string | No | api | sms. Defaults to api; sms only on plans that still include SMS |
--holder-name | string | No | Account holder name; generated if omitted |
--label | string | No | Display label |
bank-account delete
Deletes a sandbox bank account:
$ sepay bank-account delete d6719d04-xxxx-xxxx-xxxx-a6006ab65aca --yesenv: sandboxDeleted bank account d6719d04-xxxx-xxxx-xxxx-a6006ab65aca.The command always asks for confirmation; in a script it needs --yes. A deleted account can't be restored, and neither can its VAs and transactions. To clear all of your company's sandbox data, use sandbox reset.
Error messages
| Message | Cause | Fix |
|---|---|---|
a bank account xid is required | Run in a script without an xid | Pass the xid from bank-account list |
--label is required | update without --label | Add --label "<label>" |
requires confirmation; pass --yes | The command needs confirmation on sandbox and there is no terminal to ask | Check the xid, then add --yes |
... ask the user to run this command in their own terminal | update on production doesn't meet the confirmation rule | Run the command yourself in a terminal and answer y |
bank-account create is sandbox-only; drop --env production | create (or delete, named in the message) run with --env production | Drop --env production; real accounts are linked in my.sepay.vn |
! the account was created but its first VA was not | The account exists but SePay couldn't issue its first VA | Issue one with sepay va issue --bank-account <bank-account-xid> before simulating va_credit |