SePay CLI command list

Look up every SePay CLI command with its own flags, the environments it runs in, the production scope it needs, and whether it asks for confirmation.

||

Look up the syntax and own flags of every SePay CLI command, the environments it runs in, and whether it asks for confirmation. Flags every command accepts, such as --env, --json and --yes, are in Global flags. On production, commands that read data need the read scope; commands that change data need the scope named in their entry.

Every command prints its full help with sepay <command> --help.

Sign-in and sessions

Guide with examples: Authentication.

auth login

Log in to SePay.

$ sepay auth login
SandboxProduction
FlagTypeDescription
--insecure-storageboolStore the token in a 0600 file instead of the OS keychain
--scopesstringCapabilities to request (comma-separated); default read,webhook:write,bank-account:write,paycode:write,pg:read,einvoice:read
--with-tokenboolRead an OAuth2 refresh token from stdin (no browser)

auth logout

Log out and forget stored credentials.

$ sepay auth logout
SandboxProduction
Asks to confirm in some invocations
FlagTypeDescription
--allboolLog out of every stored profile
--localboolRemove the stored credential without revoking it server-side

auth refresh

Renew the token and adjust its scopes.

$ sepay auth refresh
SandboxProduction
FlagTypeDescription
--remove-scopesstringScopes to drop (comma-separated)
--reset-scopesboolIgnore current scopes; use only --scopes
--scopesstringScopes to request; added to the current set unless --reset-scopes (comma-separated)

auth revoke

Revoke a token server-side.

$ sepay auth revoke [profile]
SandboxProduction
Asks to confirm in some invocationsCannot be undone
FlagTypeDescription
--allboolRevoke every session of the account
--tokenstringRevoke one session by id (see: sepay auth sessions)

auth sessions

List your OAuth sessions held server-side.

$ sepay auth sessions
SandboxProduction

auth status

View stored profiles and the active one.

$ sepay auth status
SandboxProduction
Aliases
stls
FlagTypeDescription
--activeboolShow only the active profile

auth switch

Switch the active profile.

$ sepay auth switch <profile>
SandboxProduction
Aliases
sw

auth token

Print the stored OAuth2 refresh token.

$ sepay auth token
SandboxProduction

login

Log in to SePay.

$ sepay login
SandboxProduction
FlagTypeDescription
--insecure-storageboolStore the token in a 0600 file instead of the OS keychain
--scopesstringCapabilities to request (comma-separated); default read,webhook:write,bank-account:write,paycode:write,pg:read,einvoice:read
--with-tokenboolRead an OAuth2 refresh token from stdin (no browser)

logout

Log out and forget stored credentials.

$ sepay logout
SandboxProduction
Asks to confirm in some invocations
FlagTypeDescription
--allboolLog out of every stored profile
--localboolRemove the stored credential without revoking it server-side

Configuration

Group alias: cfg. Guide with examples: Environments and configuration.

config get

Print one setting, or all set values.

$ sepay config get [key]
SandboxProduction
Aliases
listls

config set

Set a setting and persist it to config.yml.

$ sepay config set <key> <value>
SandboxProduction
Asks to confirm in some invocations

Webhooks

Group alias: wh. Guide with examples: Webhooks.

webhook create

Create a webhook.

$ sepay webhook create
SandboxProduction
Scope
webhook:write
Aliases
new
Production: you confirm it on your terminal
FlagTypeDescription
--auth-typestringAuth scheme: none|apikey|hmac|oauth2
--bank-accountstring[]Bank account xid, repeat for multi (required for --bank-mode single|multi)
--bank-configstring[]What an account notifies: xid=on|off:all|list|none, account number on/off and which VAs (repeatable)
--bank-modestringTargeting: single|multi|all (required on create when not prompting)
--content-typestringRequest content type: json|form|multipart
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--event-typestringWhich events: all|in|out; default all
--listen-onlyboolNo destination URL; watch events with "sepay webhook listen" (sandbox only)
--namestringWebhook name
--oauth2-client-idstringOAuth2 client id (auth-type oauth2)
--oauth2-client-secretstringOAuth2 client secret (auth-type oauth2), or - to read it from stdin
--oauth2-token-urlstringOAuth2 access-token URL (auth-type oauth2)
--only-vaboolOnly virtual-account transactions
--prefix-filterstring[]Only forward these pay code prefixes
--secretstringShared secret for apikey/hmac auth, or - to read it from stdin
--skip-if-no-codeboolSkip events without a pay code
--urlstringDestination URL (required unless --listen-only)
--va-xidstring[]Virtual account xid to target (repeatable)
--verify-paymentboolOnly forward verified payments

webhook delete

Delete a webhook.

$ sepay webhook delete <webhook-xid>
SandboxProduction
Scope
webhook:write
Aliases
rmdel
Always asks to confirmProduction: you confirm it on your terminalCannot be undone
FlagTypeDescription
--dry-runboolShow what would change without sending the write (the reads it makes still run)

webhook get

Show a webhook.

$ sepay webhook get <webhook-xid>
SandboxProduction

webhook list

List webhooks.

$ sepay webhook list
SandboxProduction
Aliases
ls
FlagTypeDescription
--activestringFilter by status: 0|1
--pageintPage number
--per-pageintRows per page (max 100)

webhook listen

Stream events to a local handler over SSE (sandbox only)

$ sepay webhook listen
SandboxProduction
Aliases
tail
FlagTypeDescription
--eventsstring[]Only forward these event types (comma-separated): payment_in, payment_out
--forwardstringLocal handler address, e.g. localhost:3000 (prompted when omitted)
--forward-credentialsboolReplay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default
--forward-retriesintRe-send a failed forward this many times on SePay's schedule (0 = never); default 7
--headersboolShow forwarded request headers
--printboolAlso print the full event payload
--reconnect-maxintCap the reconnect backoff attempts (0 = unlimited)
--skip-tls-verifyboolSkip TLS verification for a loopback https handler (credential headers are then withheld)
--webhookstringOnly forward deliveries of this webhook xid (see: sepay webhook list)

webhook logs

List webhook delivery logs.

$ sepay webhook logs [webhook-xid]
SandboxProduction
Aliases
log
FlagTypeDescription
--pageintPage number
--per-pageintRows per page (max 100)
--sincestringOnly logs from this point: a duration (24h) or a date/datetime
--statusstringFilter by delivery status: success|failed|listen|skipped
--transactionstringFilter by transaction id
--untilstringOnly logs up to this date/datetime (a date means its end)
--webhookstringFilter by webhook xid

webhook replay

Re-deliver a logged webhook event.

$ sepay webhook replay [transaction-id]
SandboxProduction
Scope
webhook:write
Always asks to confirmProduction: you confirm it on your terminal
FlagTypeDescription
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--forceboolReplay a delivery the handler already acknowledged
--transactionstringTransaction id of the delivery (same as the argument)
--webhookstringWebhook xid of the delivery

webhook test

Fire an event and assert your handler responds (sandbox only)

$ sepay webhook test
SandboxProduction
FlagTypeDescription
--amountint64Amount in VND (required)
--bank-accountstringSandbox bank account xid to fire under
--eventstringEvent type to fire: payment_in, payment_out, va_credit; default payment_in
--expect-statusintHTTP status to assert (0 = any 2xx)
--forwardstringLocal handler address, e.g. localhost:3000 (required)
--forward-credentialsboolReplay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default
--timeoutdurationHow long to wait for the handler; default 10s
--vastringVirtual account number (for va_credit)
--webhookstringJudge only this webhook's delivery (see: sepay webhook list)

webhook update

Update a webhook (only the flags you pass change)

$ sepay webhook update <webhook-xid>
SandboxProduction
Scope
webhook:write
Aliases
edit
Production: you confirm it on your terminal
FlagTypeDescription
--auth-typestringAuth scheme: none|apikey|hmac|oauth2
--bank-accountstring[]Bank account xid, repeat for multi (required for --bank-mode single|multi)
--bank-configstring[]What an account notifies: xid=on|off:all|list|none, account number on/off and which VAs (repeatable)
--bank-modestringTargeting: single|multi|all (required on create when not prompting)
--content-typestringRequest content type: json|form|multipart
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--event-typestringWhich events: all|in|out; default all
--listen-onlyboolNo destination URL; watch events with "sepay webhook listen" (sandbox only)
--namestringWebhook name
--oauth2-client-idstringOAuth2 client id (auth-type oauth2)
--oauth2-client-secretstringOAuth2 client secret (auth-type oauth2), or - to read it from stdin
--oauth2-token-urlstringOAuth2 access-token URL (auth-type oauth2)
--only-vaboolOnly virtual-account transactions
--prefix-filterstring[]Only forward these pay code prefixes
--secretstringShared secret for apikey/hmac auth, or - to read it from stdin
--skip-if-no-codeboolSkip events without a pay code
--urlstringDestination URL (required unless --listen-only)
--va-xidstring[]Virtual account xid to target (repeatable)
--verify-paymentboolOnly forward verified payments

Transactions

Group alias: tx, txn. Guide with examples: Transactions.

transaction get

Show a transaction.

$ sepay transaction get <transaction-xid>
SandboxProduction

transaction list

List transactions.

$ sepay transaction list
SandboxProduction
Aliases
ls
FlagTypeDescription
--amount-in-maxstringMaximum money-in amount
--amount-in-minstringMinimum money-in amount
--amount-in-sortstringSort by money-in: asc|desc
--amount-out-maxstringMaximum money-out amount
--amount-out-minstringMinimum money-out amount
--amount-out-sortstringSort by money-out: asc|desc
--bankstringFilter by bank (e.g. ACB, BIDV)
--bank-accountstringFilter by bank account xid
--fieldsstringComma-separated fields to return
--fromstringStart date, inclusive (YYYY-MM-DD)
--pageintPage number
--per-pageintRows per page (max 100)
--reference-numberstringFilter by reference number (exact)
--searchstringSearch reference number, content, or code
--since-idstringReturn transactions after this xid
--tostringEnd date, inclusive (YYYY-MM-DD)
--transaction-contentstringFilter by content
--transaction-date-sortstringSort by date: asc|desc
--transfer-typestringFilter by direction: in|out
--va-xidstringFilter by virtual account xid
--webhook-successstringFilter by webhook status: 0|1

Bank accounts

Group alias: ba. Guide with examples: Bank accounts.

bank-account create

Create a bank account (sandbox only)

$ sepay bank-account create
SandboxProduction
Aliases
new
FlagTypeDescription
--account-typestringindividual|business_household|enterprise (required)
--bankstringBank code, e.g. ACB (required)
--connectionstringsms|api; sms only on plans that include it; default api
--holder-namestringAccount holder name (auto-generated if empty)
--labelstringDisplay label

bank-account delete

Delete a bank account (sandbox only)

$ sepay bank-account delete <bank-account-xid>
SandboxProduction
Aliases
rmdel
Always asks to confirmCannot be undone

bank-account get

Show a bank account.

$ sepay bank-account get <bank-account-xid>
SandboxProduction

bank-account list

List bank accounts.

$ sepay bank-account list
SandboxProduction
Aliases
ls
FlagTypeDescription
--accumulated-maxstringMaximum accumulated balance
--accumulated-minstringMinimum accumulated balance
--accumulated-sortstringSort by balance: asc|desc
--activestringFilter by status: 0|1|true|false
--bankstringFilter by bank (e.g. ACB, BIDV)
--created-at-sortstringSort by created date: asc|desc
--last-transaction-fromstringLast transaction on or after this date (YYYY-MM-DD)
--last-transaction-sortstringSort by last transaction: asc|desc
--last-transaction-tostringLast transaction on or before this date (YYYY-MM-DD)
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch holder name, label, or account number

bank-account update

Update a bank account's label.

$ sepay bank-account update <bank-account-xid>
SandboxProduction
Scope
bank-account:write
Aliases
edit
Production: you confirm it on your terminal
FlagTypeDescription
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--labelstringDisplay label

Virtual accounts (VA)

Guide with examples: Payment codes.

va get

Show a virtual account.

$ sepay va get <va-xid>
SandboxProduction
FlagTypeDescription
--bank-accountstringBank account xid (VA is nested)

va issue

Issue a virtual account on a bank account (sandbox only)

$ sepay va issue
SandboxProduction
FlagTypeDescription
--bank-accountstringBank account xid to issue under (required)
--labelstringDisplay label
--terminal-namestringTerminal name (Vietcombank OneQR, auto-creates a terminal)
--tidstringTerminal id (Vietcombank OneQR)

va list

List virtual accounts under a bank account.

$ sepay va list
SandboxProduction
Aliases
ls
FlagTypeDescription
--activestringFilter by status: 0|1|true|false
--bank-accountstringBank account xid (VA is nested)
--created-at-sortstringSort by created date: asc|desc
--officialstringFilter by official VA: 0|1
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch VA number or label
--staticstringFilter by static VA: 0|1

va revoke

Revoke a virtual account (sandbox only)

$ sepay va revoke <va-xid|va-number>
SandboxProduction
Always asks to confirmCannot be undone
FlagTypeDescription
--bank-accountstringBank account xid (required; VA is nested)

Payment codes

Group alias: pc. Guide with examples: Payment codes.

paycode create

Add a pay code structure.

$ sepay paycode create [prefix]
SandboxProduction
Scope
paycode:write
Production: you confirm it on your terminal
FlagTypeDescription
--activeboolTurn the structure on (--active) or off (--active=false) (required)
--character-typestringNumberOnly|NumberAndLetter (required)
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--prefixstringPay code prefix (2-5 letters), same as the argument; use it when the prefix reads as switch syntax (on|off|yes|no|true|false)
--suffix-fromintShortest suffix length (1-30; equal to --suffix-to for a fixed length) (required)
--suffix-tointLongest suffix length (1-30, not below --suffix-from) (required)

paycode list

List pay code structures and whether detection is on.

$ sepay paycode list
SandboxProduction
Aliases
ls

paycode update

Update a pay code structure or toggle pay code detection.

$ sepay paycode update [prefix]
SandboxProduction
Scope
paycode:write
Aliases
edit
Production: you confirm it on your terminal
FlagTypeDescription
--activeboolTurn this structure on (--active) or off (--active=false); default true
--character-typestringNumberOnly|NumberAndLetter
--disableboolTurn pay code detection off
--dry-runboolShow what would change without sending the write (the reads it makes still run)
--enableboolTurn pay code detection on
--prefixstringPay code prefix (2-5 letters), same as the argument; use it when the prefix reads as switch syntax (on|off|yes|no|true|false)
--structurestringPrefix of the structure to edit (default: ask on a terminal, else the first active one)
--suffix-fromintShortest suffix length (1-30, unset keeps the stored bound; equal to --suffix-to for a fixed length)
--suffix-tointLongest suffix length (1-30, not below --suffix-from; unset keeps the stored bound)

Sandbox

Group alias: sbx. Guide with examples: Sandbox.

sandbox init

Provision a starter sandbox (account, VA, webhook, seed data)

$ sepay sandbox init
SandboxProduction
FlagTypeDescription
--bankstringBank code for the starter account (default ACB when the server offers it, else its first bank)
--seedintSeed this many sample transactions (max 100)
--with-vaboolAlso issue a virtual account
--with-webhookstringAlso create a webhook to this URL
--with-webhook-listenboolAlso create a webhook with no URL, for "sepay webhook listen"

sandbox reset

Clear this company's sandbox data (webhooks + bank accounts)

$ sepay sandbox reset
SandboxProduction
Always asks to confirmCannot be undone

sandbox seed

Add sample transactions to the sandbox.

$ sepay sandbox seed
SandboxProduction
FlagTypeDescription
--bank-accountstringBank account xid to seed under (required)
--countintHow many transactions to create, 1-100 (default 5)

sandbox simulate

Fire a canned sandbox transaction.

$ sepay sandbox simulate [event]
SandboxProduction
FlagTypeDescription
--amountint64Amount in VND (required)
--bank-accountstringBank account xid (required)
--codestringPay code (max 10 chars)
--eventstringEvent type (or pass as the positional arg): payment_in, payment_out, va_credit
--overridestring[]Override a payload field, key=val (repeatable; only 'content')
--vastringVirtual account number (required for va_credit)

Sandbox API Tokens

Group alias: ak. Guide with examples: API Token.

apikey create

Create an API key (sandbox only)

$ sepay apikey create
SandboxProduction
Aliases
new
FlagTypeDescription
--activeboolCreate the key enabled; default true
--namestringKey name (required)

apikey delete

Delete an API key (sandbox only)

$ sepay apikey delete <api-key-xid>
SandboxProduction
Aliases
rmdel
Always asks to confirmCannot be undone

apikey get

Show an API key (sandbox only)

$ sepay apikey get <api-key-xid>
SandboxProduction

apikey list

List API keys (sandbox only)

$ sepay apikey list
SandboxProduction
Aliases
ls

apikey update

Update an API key's name or status (sandbox only)

$ sepay apikey update <api-key-xid>
SandboxProduction
Aliases
edit
FlagTypeDescription
--activeboolEnable (--active) or disable (--active=false) the key; default true
--namestringNew key name

Payment Gateway

Guide with examples: Payment Gateway.

pg auth

Show or refresh the sandbox Payment Gateway credential.

$ sepay pg auth
SandboxProduction
FlagTypeDescription
--insecure-storageboolStore the credential in a 0600 file instead of the OS keychain
--refreshboolForce a fresh credential from the broker

pg checkout init

Start a checkout and return its payment page URL.

$ sepay pg checkout init
SandboxProduction
FlagTypeDescription
--amountstringOrder amount (required)
--cancel-urlstringRedirect URL on cancel
--currencystringCurrency; default VND
--customerstringCustomer id
--descriptionstringOrder description (required)
--error-urlstringRedirect URL on error
--invoicestringOrder code: letters, digits, - and _ (required for PURCHASE)
--no-openboolPrint the URL without opening a browser
--operationstringPURCHASE|VERIFY; default PURCHASE
--payment-methodstringBANK\_TRANSFER`|CARD|`NAPAS\_BANK\_TRANSFER (optional)
--success-urlstringRedirect URL on success

pg ipn get

Show where gateway IPN is delivered.

$ sepay pg ipn get
SandboxProduction
Aliases
show

pg ipn listen

Stream gateway IPN to a local handler over SSE.

$ sepay pg ipn listen
SandboxProduction
Aliases
tail
FlagTypeDescription
--eventsstring[]Only forward these event types (comma-separated): ORDER_PAID, TRANSACTION_VOID
--forwardstringLocal handler address, e.g. localhost:3000 (prompted when omitted)
--forward-credentialsboolReplay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default
--forward-retriesintRe-send a failed forward this many times on SePay's schedule (0 = never); default 7
--headersboolShow forwarded request headers
--orderstringOnly forward IPN for this pay code
--printboolAlso print the full event payload
--reconnect-maxintCap the reconnect backoff attempts (0 = unlimited)
--skip-tls-verifyboolSkip TLS verification for a loopback https handler (credential headers are then withheld)

pg ipn set

Set where gateway IPN is delivered.

$ sepay pg ipn set <url>
SandboxProduction
Always asks to confirm
FlagTypeDescription
--activeboolTurn delivery on (--active) or off (--active=false)
--auth-typestringAuth scheme: SECRET_KEY, or empty to turn auth off
--content-typestringRequest content type: application/json
--secretstringShared secret sent as X-Secret-Key, or - to read it from stdin (also turns auth on)

pg merchant get

Show merchant details.

$ sepay pg merchant get
SandboxProduction
Aliases
show

pg order cancel

Cancel an order (bank-transfer, not yet captured)

$ sepay pg order cancel <invoice-number>
SandboxProduction
Always asks to confirmCannot be undone

pg order get

Show an order and its transactions.

$ sepay pg order get <invoice-number>
SandboxProduction
Scope
pg:read

pg order list

List orders.

$ sepay pg order list
SandboxProduction
Scope
pg:read
Aliases
ls
FlagTypeDescription
--customerstringFilter by customer id
--fromstringFrom date (YYYY-MM-DD)
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch by pay code or order code
--statusstringFilter by order status, e.g. CAPTURED, CANCELLED, AUTHENTICATION_NOT_NEEDED (a wrong value lists the accepted set)
--tostringTo date (YYYY-MM-DD)

pg order void

Void a captured card transaction (before settlement)

$ sepay pg order void <invoice-number>
SandboxProduction
Always asks to confirmCannot be undone

Bank Hub

Group alias: bh. Guide with examples: Bank Hub.

bankhub auth

Show or refresh the sandbox Bank Hub credential.

$ sepay bankhub auth
SandboxProduction
FlagTypeDescription
--insecure-storageboolStore the credential in a 0600 file instead of the OS keychain
--refreshboolForce a fresh credential from the broker

bankhub bank-account get

Show a bank account and its virtual accounts.

$ sepay bankhub bank-account get <bank-account-xid>
SandboxProduction

bankhub bank-account list

List linked bank accounts.

$ sepay bankhub bank-account list
SandboxProduction
Aliases
ls
FlagTypeDescription
--bankstringFilter by Bank Hub bank id (a number, not a bank code)
--companystringFilter by company xid
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch bank accounts

bankhub company create

Create a company.

$ sepay bankhub company create
SandboxProduction
Aliases
new
FlagTypeDescription
--namestringCompany full name (required)
--statusstringInitial status: Pending|Active (default Pending)

bankhub company get

Show a company and its configuration.

$ sepay bankhub company get <company-xid>
SandboxProduction

bankhub company list

List companies.

$ sepay bankhub company list
SandboxProduction
Aliases
ls
FlagTypeDescription
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch companies
--statusstringFilter by status: Pending|Active|Suspended|Terminated|Cancelled|Fraud

bankhub company update

Update a company's name, status or pay code setting.

$ sepay bankhub company update <company-xid>
SandboxProduction
Aliases
edit
Always asks to confirm
FlagTypeDescription
--namestringNew full name
--payment-codestringPay code matching: on|off
--statusstringNew status: Pending|Active|Suspended|Terminated|Cancelled|Fraud
--transaction-amountstringMax transaction amount: a whole amount in VND, or Unlimited

bankhub ipn get

Show where Bank Hub IPN is delivered.

$ sepay bankhub ipn get
SandboxProduction
Aliases
show

bankhub ipn listen

Stream Bank Hub IPN to a local handler over SSE.

$ sepay bankhub ipn listen
SandboxProduction
Aliases
tail
FlagTypeDescription
--bank-accountstringOnly forward IPN for this bank account xid
--eventsstring[]Only forward these event types (comma-separated): transaction_credit, transaction_debit
--forwardstringLocal handler address, e.g. localhost:3000 (prompted when omitted)
--forward-credentialsboolReplay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default
--forward-retriesintRe-send a failed forward this many times on SePay's schedule (0 = never); default 7
--headersboolShow forwarded request headers
--printboolAlso print the full event payload
--reconnect-maxintCap the reconnect backoff attempts (0 = unlimited)
--skip-tls-verifyboolSkip TLS verification for a loopback https handler (credential headers are then withheld)

bankhub ipn set

Set where Bank Hub IPN is delivered.

$ sepay bankhub ipn set <url>
SandboxProduction
Always asks to confirm
FlagTypeDescription
--api-keystringShared key sent in the Authorization: Apikey header, or - to read it from stdin (empty turns auth off)

Create an account-linking token (returns a hosted-link URL)

$ sepay bankhub link-token create
SandboxProduction
Aliases
new
FlagTypeDescription
--bank-accountstringBank account xid (required for UNLINK_BANK_ACCOUNT)
--companystringCompany xid the token is for (required)
--languagestringHosted-flow language: vi|en (default vi)
--mobileboolMark the token as a mobile-app flow
--purposestringPurpose: LINK\_BANK\_ACCOUNT`|`UNLINK\_BANK\_ACCOUNT`|`CREATE\_VA`|`DELETE\_VA`|`INACTIVE\_VA`|`ACTIVE\_VA (required)
--redirect-uristringURL to return to after the hosted flow
--show-tokenboolPrint the token value (masked by default); the only value "link-token get" accepts

Show a link token by its token value.

$ sepay bankhub link-token get <link-token>
SandboxProduction

Revoke a link token by its xid.

$ sepay bankhub link-token revoke <link-token-xid>
SandboxProduction
Always asks to confirmCannot be undone

bankhub sandbox simulate-transaction

Simulate an inbound transaction on a bank account (sandbox)

$ sepay bankhub sandbox simulate-transaction
SandboxProduction
FlagTypeDescription
--amountint64Amount in VND, greater than 0 (required)
--bank-accountstringBank account xid to credit/debit (required)
--contentstringTransaction content (required)
--referencestringReference number (optional)
--typestringTransfer type: credit|debit; default credit

bankhub transaction get

Show a transaction.

$ sepay bankhub transaction get <transaction-id>
SandboxProduction

bankhub transaction list

List transactions.

$ sepay bankhub transaction list
SandboxProduction
Aliases
ls
FlagTypeDescription
--bank-accountstringFilter by bank account xid
--companystringFilter by company xid
--fromstringFrom transaction date (YYYY-MM-DD)
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch transactions
--tostringTo transaction date (YYYY-MM-DD)
--typestringFilter by transfer type: credit|debit

bankhub webhook list

Show the merchant webhook (one per merchant)

$ sepay bankhub webhook list
SandboxProduction
Aliases
lsgetshow

bankhub webhook set

Create or replace the merchant webhook.

$ sepay bankhub webhook set <url>
SandboxProduction
Always asks to confirmCannot be undone
FlagTypeDescription
--activeboolWhether the webhook is active; default true
--eventsstring[]Events to deliver: '*' or comma-separated event names; a new webhook without it receives none
--secretstringSigning secret key, or - to read it from stdin

E-invoices

Group alias: inv. Guide with examples: eInvoice.

einvoice account get

Show a provider account and its invoice templates.

$ sepay einvoice account get <account-id>
SandboxProduction

einvoice account list

List provider accounts.

$ sepay einvoice account list
SandboxProduction
Aliases
ls
FlagTypeDescription
--pageintPage number
--per-pageintRows per page (max 100)

einvoice auth

Show or refresh the sandbox E-Invoice credential.

$ sepay einvoice auth
SandboxProduction
FlagTypeDescription
--insecure-storageboolStore the credential in a 0600 file instead of the OS keychain
--refreshboolForce a fresh credential from the broker

einvoice invoice create

Submit an invoice (async); payload is @file, - for stdin, or inline JSON.

$ sepay einvoice invoice create <payload>
SandboxProduction
Aliases
new

einvoice invoice create-status

Poll a create submission to Success/Failed.

$ sepay einvoice invoice create-status <tracking-code>
SandboxProduction

einvoice invoice get

Show an invoice and its line items.

$ sepay einvoice invoice get <reference-code>
SandboxProduction
Scope
einvoice:read

einvoice invoice issue

Issue a drafted invoice (async); returns a tracking code.

$ sepay einvoice invoice issue <reference-code>
SandboxProduction
Always asks to confirmCannot be undone

einvoice invoice issue-status

Poll an issue submission to Success/Failed.

$ sepay einvoice invoice issue-status <tracking-code>
SandboxProduction

einvoice invoice list

List invoices.

$ sepay einvoice invoice list
SandboxProduction
Scope
einvoice:read
Aliases
ls
FlagTypeDescription
--fromstringInvoice date from (YYYY-MM-DD)
--pageintPage number
--per-pageintRows per page (max 100)
--searchstringSearch the series and number, reference code and buyer details
--sourcestringFilter by source: manual|api
--statusstringFilter by status: draft|issued|failed|cancelled
--tostringInvoice date to (YYYY-MM-DD)
--typestringFilter by invoice type: 1 Draft, 2 New invoice, 3 Cancelled, 4 Replacement, 5 Replaced, 6 Increase adjustment, 7 Decrease adjustment, 8 Information adjustment, 9 Increase/decrease adjustment, 10 Adjusted

einvoice quota

Show e-invoice usage and quota.

$ sepay einvoice quota
SandboxProduction

Call the API directly

Guide with examples: Call the API directly.

api

Make an authenticated request to any SePay API endpoint.

$ sepay api <path>
SandboxProduction
Asks to confirm in some invocationsProduction: you confirm it on your terminal
FlagTypeDescription
--dry-runboolPrint the request without sending it, a GET included
-f, --fieldstring[]Add a body field (key=value, repeatable)
-H, --headerstring[]Add a request header (repeatable)
--inputstringRead the request body from a file, or - for stdin
-X, --methodstringHTTP method; default GET

Other commands

completion

Generate a shell completion script.

$ sepay completion <bash|zsh|fish|powershell>
SandboxProduction

quota

Show your plan quota and usage.

$ sepay quota
SandboxProduction

On production the table has a transaction row (transactions in the plan cycle) and an einvoice row (e-invoices left). The einvoice row has only USED and REMAINING (unlimited when the plan sets no limit), because the system stores only the invoices left, with no total and no cycle. In -o json: quotas.einvoice is { "used": 12, "remaining": 88 } or { "used": 12, "unlimited": true }. It only reads, so it runs on production; it needs the read scope and a company Admin or SuperAdmin (otherwise exit code 8).

update

Update sepay to the latest release.

$ sepay update
SandboxProduction
Aliases
upgrade
FlagTypeDescription
--checkboolReport whether a newer release exists without installing it
--versionstringInstall this release instead of the latest, e.g. 0.2.0

version

Print version and build info.

$ sepay version
SandboxProduction

help

Help about any command or topic.

$ sepay help [command | topic]
SandboxProduction

Topics: environment (environment variables and config files), errors (error_code values and what to do), exit-codes, glossary. sepay <topic> prints one too. An unknown topic prints unknown help topic and exits 2.