Bank accounts in SePay CLI

List bank accounts with SePay CLI to get the xid for webhooks, VAs and simulated transactions, relabel them, and create or delete sandbox test accounts.

||

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.

CommandUseEnvironment
bank-account listList accounts, get the xidBoth
bank-account getView one accountBoth
bank-account updateChange the display labelBoth
bank-account createCreate a test accountSandbox
bank-account deleteDelete a test accountSandbox

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
FlagTypeDescription
--searchstringSearch by holder name, label or account number
--bankstringFilter by bank, for example ACB
--activestring1 for enabled accounts only, 0 for disabled ones
--page, --per-pageintPagination; 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:19

bank-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: SPVA00001

First 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 valueWhen it shows
virtual accounts onlyThe 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 accountsThe 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 hasEvery 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.

FlagTypeRequiredDescription
--bankstringYesBank code, for example ACB
--account-typestringYesindividual | business_household | enterprise
--connectionstringNoapi | sms. Defaults to api; sms only on plans that still include SMS
--holder-namestringNoAccount holder name; generated if omitted
--labelstringNoDisplay 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.
Deleting an account also deletes its VAs and transactions

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

MessageCauseFix
a bank account xid is requiredRun in a script without an xidPass the xid from bank-account list
--label is requiredupdate without --labelAdd --label "<label>"
requires confirmation; pass --yesThe command needs confirmation on sandbox and there is no terminal to askCheck the xid, then add --yes
... ask the user to run this command in their own terminalupdate on production doesn't meet the confirmation ruleRun the command yourself in a terminal and answer y
bank-account create is sandbox-only; drop --env productioncreate (or delete, named in the message) run with --env productionDrop --env production; real accounts are linked in my.sepay.vn
! the account was created but its first VA was notThe account exists but SePay couldn't issue its first VAIssue one with sepay va issue --bank-account <bank-account-xid> before simulating va_credit