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| Flag | Type | Description |
|---|---|---|
--insecure-storage | bool | Store the token in a 0600 file instead of the OS keychain |
--scopes | string | Capabilities to request (comma-separated); default read,webhook:write,bank-account:write,paycode:write,pg:read,einvoice:read |
--with-token | bool | Read an OAuth2 refresh token from stdin (no browser) |
auth logout
Log out and forget stored credentials.
$ sepay auth logout| Flag | Type | Description |
|---|---|---|
--all | bool | Log out of every stored profile |
--local | bool | Remove the stored credential without revoking it server-side |
auth refresh
Renew the token and adjust its scopes.
$ sepay auth refresh| Flag | Type | Description |
|---|---|---|
--remove-scopes | string | Scopes to drop (comma-separated) |
--reset-scopes | bool | Ignore current scopes; use only --scopes |
--scopes | string | Scopes to request; added to the current set unless --reset-scopes (comma-separated) |
auth revoke
Revoke a token server-side.
$ sepay auth revoke [profile]| Flag | Type | Description |
|---|---|---|
--all | bool | Revoke every session of the account |
--token | string | Revoke one session by id (see: sepay auth sessions) |
auth sessions
List your OAuth sessions held server-side.
$ sepay auth sessionsauth status
View stored profiles and the active one.
$ sepay auth statusstls| Flag | Type | Description |
|---|---|---|
--active | bool | Show only the active profile |
auth switch
Switch the active profile.
$ sepay auth switch <profile>swauth token
Print the stored OAuth2 refresh token.
$ sepay auth tokenlogin
Log in to SePay.
$ sepay login| Flag | Type | Description |
|---|---|---|
--insecure-storage | bool | Store the token in a 0600 file instead of the OS keychain |
--scopes | string | Capabilities to request (comma-separated); default read,webhook:write,bank-account:write,paycode:write,pg:read,einvoice:read |
--with-token | bool | Read an OAuth2 refresh token from stdin (no browser) |
logout
Log out and forget stored credentials.
$ sepay logout| Flag | Type | Description |
|---|---|---|
--all | bool | Log out of every stored profile |
--local | bool | Remove 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]listlsconfig set
Set a setting and persist it to config.yml.
$ sepay config set <key> <value>Webhooks
Group alias: wh. Guide with examples: Webhooks.
webhook create
Create a webhook.
$ sepay webhook createwebhook:writenew| Flag | Type | Description |
|---|---|---|
--auth-type | string | Auth scheme: none|apikey|hmac|oauth2 |
--bank-account | string[] | Bank account xid, repeat for multi (required for --bank-mode single|multi) |
--bank-config | string[] | What an account notifies: xid=on|off:all|list|none, account number on/off and which VAs (repeatable) |
--bank-mode | string | Targeting: single|multi|all (required on create when not prompting) |
--content-type | string | Request content type: json|form|multipart |
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--event-type | string | Which events: all|in|out; default all |
--listen-only | bool | No destination URL; watch events with "sepay webhook listen" (sandbox only) |
--name | string | Webhook name |
--oauth2-client-id | string | OAuth2 client id (auth-type oauth2) |
--oauth2-client-secret | string | OAuth2 client secret (auth-type oauth2), or - to read it from stdin |
--oauth2-token-url | string | OAuth2 access-token URL (auth-type oauth2) |
--only-va | bool | Only virtual-account transactions |
--prefix-filter | string[] | Only forward these pay code prefixes |
--secret | string | Shared secret for apikey/hmac auth, or - to read it from stdin |
--skip-if-no-code | bool | Skip events without a pay code |
--url | string | Destination URL (required unless --listen-only) |
--va-xid | string[] | Virtual account xid to target (repeatable) |
--verify-payment | bool | Only forward verified payments |
webhook delete
Delete a webhook.
$ sepay webhook delete <webhook-xid>webhook:writermdel| Flag | Type | Description |
|---|---|---|
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
webhook get
Show a webhook.
$ sepay webhook get <webhook-xid>webhook list
List webhooks.
$ sepay webhook listls| Flag | Type | Description |
|---|---|---|
--active | string | Filter by status: 0|1 |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
webhook listen
Stream events to a local handler over SSE (sandbox only)
$ sepay webhook listentail| Flag | Type | Description |
|---|---|---|
--events | string[] | Only forward these event types (comma-separated): payment_in, payment_out |
--forward | string | Local handler address, e.g. localhost:3000 (prompted when omitted) |
--forward-credentials | bool | Replay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default |
--forward-retries | int | Re-send a failed forward this many times on SePay's schedule (0 = never); default 7 |
--headers | bool | Show forwarded request headers |
--print | bool | Also print the full event payload |
--reconnect-max | int | Cap the reconnect backoff attempts (0 = unlimited) |
--skip-tls-verify | bool | Skip TLS verification for a loopback https handler (credential headers are then withheld) |
--webhook | string | Only forward deliveries of this webhook xid (see: sepay webhook list) |
webhook logs
List webhook delivery logs.
$ sepay webhook logs [webhook-xid]log| Flag | Type | Description |
|---|---|---|
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--since | string | Only logs from this point: a duration (24h) or a date/datetime |
--status | string | Filter by delivery status: success|failed|listen|skipped |
--transaction | string | Filter by transaction id |
--until | string | Only logs up to this date/datetime (a date means its end) |
--webhook | string | Filter by webhook xid |
webhook replay
Re-deliver a logged webhook event.
$ sepay webhook replay [transaction-id]webhook:write| Flag | Type | Description |
|---|---|---|
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--force | bool | Replay a delivery the handler already acknowledged |
--transaction | string | Transaction id of the delivery (same as the argument) |
--webhook | string | Webhook xid of the delivery |
webhook test
Fire an event and assert your handler responds (sandbox only)
$ sepay webhook test| Flag | Type | Description |
|---|---|---|
--amount | int64 | Amount in VND (required) |
--bank-account | string | Sandbox bank account xid to fire under |
--event | string | Event type to fire: payment_in, payment_out, va_credit; default payment_in |
--expect-status | int | HTTP status to assert (0 = any 2xx) |
--forward | string | Local handler address, e.g. localhost:3000 (required) |
--forward-credentials | bool | Replay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default |
--timeout | duration | How long to wait for the handler; default 10s |
--va | string | Virtual account number (for va_credit) |
--webhook | string | Judge 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>webhook:writeedit| Flag | Type | Description |
|---|---|---|
--auth-type | string | Auth scheme: none|apikey|hmac|oauth2 |
--bank-account | string[] | Bank account xid, repeat for multi (required for --bank-mode single|multi) |
--bank-config | string[] | What an account notifies: xid=on|off:all|list|none, account number on/off and which VAs (repeatable) |
--bank-mode | string | Targeting: single|multi|all (required on create when not prompting) |
--content-type | string | Request content type: json|form|multipart |
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--event-type | string | Which events: all|in|out; default all |
--listen-only | bool | No destination URL; watch events with "sepay webhook listen" (sandbox only) |
--name | string | Webhook name |
--oauth2-client-id | string | OAuth2 client id (auth-type oauth2) |
--oauth2-client-secret | string | OAuth2 client secret (auth-type oauth2), or - to read it from stdin |
--oauth2-token-url | string | OAuth2 access-token URL (auth-type oauth2) |
--only-va | bool | Only virtual-account transactions |
--prefix-filter | string[] | Only forward these pay code prefixes |
--secret | string | Shared secret for apikey/hmac auth, or - to read it from stdin |
--skip-if-no-code | bool | Skip events without a pay code |
--url | string | Destination URL (required unless --listen-only) |
--va-xid | string[] | Virtual account xid to target (repeatable) |
--verify-payment | bool | Only forward verified payments |
Transactions
Group alias: tx, txn. Guide with examples: Transactions.
transaction get
Show a transaction.
$ sepay transaction get <transaction-xid>transaction list
List transactions.
$ sepay transaction listls| Flag | Type | Description |
|---|---|---|
--amount-in-max | string | Maximum money-in amount |
--amount-in-min | string | Minimum money-in amount |
--amount-in-sort | string | Sort by money-in: asc|desc |
--amount-out-max | string | Maximum money-out amount |
--amount-out-min | string | Minimum money-out amount |
--amount-out-sort | string | Sort by money-out: asc|desc |
--bank | string | Filter by bank (e.g. ACB, BIDV) |
--bank-account | string | Filter by bank account xid |
--fields | string | Comma-separated fields to return |
--from | string | Start date, inclusive (YYYY-MM-DD) |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--reference-number | string | Filter by reference number (exact) |
--search | string | Search reference number, content, or code |
--since-id | string | Return transactions after this xid |
--to | string | End date, inclusive (YYYY-MM-DD) |
--transaction-content | string | Filter by content |
--transaction-date-sort | string | Sort by date: asc|desc |
--transfer-type | string | Filter by direction: in|out |
--va-xid | string | Filter by virtual account xid |
--webhook-success | string | Filter 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 createnew| Flag | Type | Description |
|---|---|---|
--account-type | string | individual|business_household|enterprise (required) |
--bank | string | Bank code, e.g. ACB (required) |
--connection | string | sms|api; sms only on plans that include it; default api |
--holder-name | string | Account holder name (auto-generated if empty) |
--label | string | Display label |
bank-account delete
Delete a bank account (sandbox only)
$ sepay bank-account delete <bank-account-xid>rmdelbank-account get
Show a bank account.
$ sepay bank-account get <bank-account-xid>bank-account list
List bank accounts.
$ sepay bank-account listls| Flag | Type | Description |
|---|---|---|
--accumulated-max | string | Maximum accumulated balance |
--accumulated-min | string | Minimum accumulated balance |
--accumulated-sort | string | Sort by balance: asc|desc |
--active | string | Filter by status: 0|1|true|false |
--bank | string | Filter by bank (e.g. ACB, BIDV) |
--created-at-sort | string | Sort by created date: asc|desc |
--last-transaction-from | string | Last transaction on or after this date (YYYY-MM-DD) |
--last-transaction-sort | string | Sort by last transaction: asc|desc |
--last-transaction-to | string | Last transaction on or before this date (YYYY-MM-DD) |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search holder name, label, or account number |
bank-account update
Update a bank account's label.
$ sepay bank-account update <bank-account-xid>bank-account:writeedit| Flag | Type | Description |
|---|---|---|
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--label | string | Display label |
Virtual accounts (VA)
Guide with examples: Payment codes.
va get
Show a virtual account.
$ sepay va get <va-xid>| Flag | Type | Description |
|---|---|---|
--bank-account | string | Bank account xid (VA is nested) |
va issue
Issue a virtual account on a bank account (sandbox only)
$ sepay va issue| Flag | Type | Description |
|---|---|---|
--bank-account | string | Bank account xid to issue under (required) |
--label | string | Display label |
--terminal-name | string | Terminal name (Vietcombank OneQR, auto-creates a terminal) |
--tid | string | Terminal id (Vietcombank OneQR) |
va list
List virtual accounts under a bank account.
$ sepay va listls| Flag | Type | Description |
|---|---|---|
--active | string | Filter by status: 0|1|true|false |
--bank-account | string | Bank account xid (VA is nested) |
--created-at-sort | string | Sort by created date: asc|desc |
--official | string | Filter by official VA: 0|1 |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search VA number or label |
--static | string | Filter by static VA: 0|1 |
va revoke
Revoke a virtual account (sandbox only)
$ sepay va revoke <va-xid|va-number>| Flag | Type | Description |
|---|---|---|
--bank-account | string | Bank 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]paycode:write| Flag | Type | Description |
|---|---|---|
--active | bool | Turn the structure on (--active) or off (--active=false) (required) |
--character-type | string | NumberOnly|NumberAndLetter (required) |
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--prefix | string | Pay 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-from | int | Shortest suffix length (1-30; equal to --suffix-to for a fixed length) (required) |
--suffix-to | int | Longest suffix length (1-30, not below --suffix-from) (required) |
paycode list
List pay code structures and whether detection is on.
$ sepay paycode listlspaycode update
Update a pay code structure or toggle pay code detection.
$ sepay paycode update [prefix]paycode:writeedit| Flag | Type | Description |
|---|---|---|
--active | bool | Turn this structure on (--active) or off (--active=false); default true |
--character-type | string | NumberOnly|NumberAndLetter |
--disable | bool | Turn pay code detection off |
--dry-run | bool | Show what would change without sending the write (the reads it makes still run) |
--enable | bool | Turn pay code detection on |
--prefix | string | Pay code prefix (2-5 letters), same as the argument; use it when the prefix reads as switch syntax (on|off|yes|no|true|false) |
--structure | string | Prefix of the structure to edit (default: ask on a terminal, else the first active one) |
--suffix-from | int | Shortest suffix length (1-30, unset keeps the stored bound; equal to --suffix-to for a fixed length) |
--suffix-to | int | Longest 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| Flag | Type | Description |
|---|---|---|
--bank | string | Bank code for the starter account (default ACB when the server offers it, else its first bank) |
--seed | int | Seed this many sample transactions (max 100) |
--with-va | bool | Also issue a virtual account |
--with-webhook | string | Also create a webhook to this URL |
--with-webhook-listen | bool | Also create a webhook with no URL, for "sepay webhook listen" |
sandbox reset
Clear this company's sandbox data (webhooks + bank accounts)
$ sepay sandbox resetsandbox seed
Add sample transactions to the sandbox.
$ sepay sandbox seed| Flag | Type | Description |
|---|---|---|
--bank-account | string | Bank account xid to seed under (required) |
--count | int | How many transactions to create, 1-100 (default 5) |
sandbox simulate
Fire a canned sandbox transaction.
$ sepay sandbox simulate [event]| Flag | Type | Description |
|---|---|---|
--amount | int64 | Amount in VND (required) |
--bank-account | string | Bank account xid (required) |
--code | string | Pay code (max 10 chars) |
--event | string | Event type (or pass as the positional arg): payment_in, payment_out, va_credit |
--override | string[] | Override a payload field, key=val (repeatable; only 'content') |
--va | string | Virtual 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 createnew| Flag | Type | Description |
|---|---|---|
--active | bool | Create the key enabled; default true |
--name | string | Key name (required) |
apikey delete
Delete an API key (sandbox only)
$ sepay apikey delete <api-key-xid>rmdelapikey get
Show an API key (sandbox only)
$ sepay apikey get <api-key-xid>apikey list
List API keys (sandbox only)
$ sepay apikey listlsapikey update
Update an API key's name or status (sandbox only)
$ sepay apikey update <api-key-xid>edit| Flag | Type | Description |
|---|---|---|
--active | bool | Enable (--active) or disable (--active=false) the key; default true |
--name | string | New key name |
Payment Gateway
Guide with examples: Payment Gateway.
pg auth
Show or refresh the sandbox Payment Gateway credential.
$ sepay pg auth| Flag | Type | Description |
|---|---|---|
--insecure-storage | bool | Store the credential in a 0600 file instead of the OS keychain |
--refresh | bool | Force a fresh credential from the broker |
pg checkout init
Start a checkout and return its payment page URL.
$ sepay pg checkout init| Flag | Type | Description |
|---|---|---|
--amount | string | Order amount (required) |
--cancel-url | string | Redirect URL on cancel |
--currency | string | Currency; default VND |
--customer | string | Customer id |
--description | string | Order description (required) |
--error-url | string | Redirect URL on error |
--invoice | string | Order code: letters, digits, - and _ (required for PURCHASE) |
--no-open | bool | Print the URL without opening a browser |
--operation | string | PURCHASE|VERIFY; default PURCHASE |
--payment-method | string | BANK\_TRANSFER`|CARD|`NAPAS\_BANK\_TRANSFER (optional) |
--success-url | string | Redirect URL on success |
pg ipn get
Show where gateway IPN is delivered.
$ sepay pg ipn getshowpg ipn listen
Stream gateway IPN to a local handler over SSE.
$ sepay pg ipn listentail| Flag | Type | Description |
|---|---|---|
--events | string[] | Only forward these event types (comma-separated): ORDER_PAID, TRANSACTION_VOID |
--forward | string | Local handler address, e.g. localhost:3000 (prompted when omitted) |
--forward-credentials | bool | Replay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default |
--forward-retries | int | Re-send a failed forward this many times on SePay's schedule (0 = never); default 7 |
--headers | bool | Show forwarded request headers |
--order | string | Only forward IPN for this pay code |
--print | bool | Also print the full event payload |
--reconnect-max | int | Cap the reconnect backoff attempts (0 = unlimited) |
--skip-tls-verify | bool | Skip 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>| Flag | Type | Description |
|---|---|---|
--active | bool | Turn delivery on (--active) or off (--active=false) |
--auth-type | string | Auth scheme: SECRET_KEY, or empty to turn auth off |
--content-type | string | Request content type: application/json |
--secret | string | Shared 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 getshowpg order cancel
Cancel an order (bank-transfer, not yet captured)
$ sepay pg order cancel <invoice-number>pg order get
Show an order and its transactions.
$ sepay pg order get <invoice-number>pg:readpg order list
List orders.
$ sepay pg order listpg:readls| Flag | Type | Description |
|---|---|---|
--customer | string | Filter by customer id |
--from | string | From date (YYYY-MM-DD) |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search by pay code or order code |
--status | string | Filter by order status, e.g. CAPTURED, CANCELLED, AUTHENTICATION_NOT_NEEDED (a wrong value lists the accepted set) |
--to | string | To date (YYYY-MM-DD) |
pg order void
Void a captured card transaction (before settlement)
$ sepay pg order void <invoice-number>Bank Hub
Group alias: bh. Guide with examples: Bank Hub.
bankhub auth
Show or refresh the sandbox Bank Hub credential.
$ sepay bankhub auth| Flag | Type | Description |
|---|---|---|
--insecure-storage | bool | Store the credential in a 0600 file instead of the OS keychain |
--refresh | bool | Force 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>bankhub bank-account list
List linked bank accounts.
$ sepay bankhub bank-account listls| Flag | Type | Description |
|---|---|---|
--bank | string | Filter by Bank Hub bank id (a number, not a bank code) |
--company | string | Filter by company xid |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search bank accounts |
bankhub company create
Create a company.
$ sepay bankhub company createnew| Flag | Type | Description |
|---|---|---|
--name | string | Company full name (required) |
--status | string | Initial status: Pending|Active (default Pending) |
bankhub company get
Show a company and its configuration.
$ sepay bankhub company get <company-xid>bankhub company list
List companies.
$ sepay bankhub company listls| Flag | Type | Description |
|---|---|---|
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search companies |
--status | string | Filter 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>edit| Flag | Type | Description |
|---|---|---|
--name | string | New full name |
--payment-code | string | Pay code matching: on|off |
--status | string | New status: Pending|Active|Suspended|Terminated|Cancelled|Fraud |
--transaction-amount | string | Max transaction amount: a whole amount in VND, or Unlimited |
bankhub ipn get
Show where Bank Hub IPN is delivered.
$ sepay bankhub ipn getshowbankhub ipn listen
Stream Bank Hub IPN to a local handler over SSE.
$ sepay bankhub ipn listentail| Flag | Type | Description |
|---|---|---|
--bank-account | string | Only forward IPN for this bank account xid |
--events | string[] | Only forward these event types (comma-separated): transaction_credit, transaction_debit |
--forward | string | Local handler address, e.g. localhost:3000 (prompted when omitted) |
--forward-credentials | bool | Replay credential headers (Authorization, X-Secret-Key) to a non-loopback handler; they are withheld by default |
--forward-retries | int | Re-send a failed forward this many times on SePay's schedule (0 = never); default 7 |
--headers | bool | Show forwarded request headers |
--print | bool | Also print the full event payload |
--reconnect-max | int | Cap the reconnect backoff attempts (0 = unlimited) |
--skip-tls-verify | bool | Skip 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>| Flag | Type | Description |
|---|---|---|
--api-key | string | Shared key sent in the Authorization: Apikey header, or - to read it from stdin (empty turns auth off) |
bankhub link-token create
Create an account-linking token (returns a hosted-link URL)
$ sepay bankhub link-token createnew| Flag | Type | Description |
|---|---|---|
--bank-account | string | Bank account xid (required for UNLINK_BANK_ACCOUNT) |
--company | string | Company xid the token is for (required) |
--language | string | Hosted-flow language: vi|en (default vi) |
--mobile | bool | Mark the token as a mobile-app flow |
--purpose | string | Purpose: LINK\_BANK\_ACCOUNT`|`UNLINK\_BANK\_ACCOUNT`|`CREATE\_VA`|`DELETE\_VA`|`INACTIVE\_VA`|`ACTIVE\_VA (required) |
--redirect-uri | string | URL to return to after the hosted flow |
--show-token | bool | Print the token value (masked by default); the only value "link-token get" accepts |
bankhub link-token get
Show a link token by its token value.
$ sepay bankhub link-token get <link-token>bankhub link-token revoke
Revoke a link token by its xid.
$ sepay bankhub link-token revoke <link-token-xid>bankhub sandbox simulate-transaction
Simulate an inbound transaction on a bank account (sandbox)
$ sepay bankhub sandbox simulate-transaction| Flag | Type | Description |
|---|---|---|
--amount | int64 | Amount in VND, greater than 0 (required) |
--bank-account | string | Bank account xid to credit/debit (required) |
--content | string | Transaction content (required) |
--reference | string | Reference number (optional) |
--type | string | Transfer type: credit|debit; default credit |
bankhub transaction get
Show a transaction.
$ sepay bankhub transaction get <transaction-id>bankhub transaction list
List transactions.
$ sepay bankhub transaction listls| Flag | Type | Description |
|---|---|---|
--bank-account | string | Filter by bank account xid |
--company | string | Filter by company xid |
--from | string | From transaction date (YYYY-MM-DD) |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search transactions |
--to | string | To transaction date (YYYY-MM-DD) |
--type | string | Filter by transfer type: credit|debit |
bankhub webhook list
Show the merchant webhook (one per merchant)
$ sepay bankhub webhook listlsgetshowbankhub webhook set
Create or replace the merchant webhook.
$ sepay bankhub webhook set <url>| Flag | Type | Description |
|---|---|---|
--active | bool | Whether the webhook is active; default true |
--events | string[] | Events to deliver: '*' or comma-separated event names; a new webhook without it receives none |
--secret | string | Signing 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>einvoice account list
List provider accounts.
$ sepay einvoice account listls| Flag | Type | Description |
|---|---|---|
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
einvoice auth
Show or refresh the sandbox E-Invoice credential.
$ sepay einvoice auth| Flag | Type | Description |
|---|---|---|
--insecure-storage | bool | Store the credential in a 0600 file instead of the OS keychain |
--refresh | bool | Force 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>neweinvoice invoice create-status
Poll a create submission to Success/Failed.
$ sepay einvoice invoice create-status <tracking-code>einvoice invoice get
Show an invoice and its line items.
$ sepay einvoice invoice get <reference-code>einvoice:readeinvoice invoice issue
Issue a drafted invoice (async); returns a tracking code.
$ sepay einvoice invoice issue <reference-code>einvoice invoice issue-status
Poll an issue submission to Success/Failed.
$ sepay einvoice invoice issue-status <tracking-code>einvoice invoice list
List invoices.
$ sepay einvoice invoice listeinvoice:readls| Flag | Type | Description |
|---|---|---|
--from | string | Invoice date from (YYYY-MM-DD) |
--page | int | Page number |
--per-page | int | Rows per page (max 100) |
--search | string | Search the series and number, reference code and buyer details |
--source | string | Filter by source: manual|api |
--status | string | Filter by status: draft|issued|failed|cancelled |
--to | string | Invoice date to (YYYY-MM-DD) |
--type | string | Filter 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 quotaCall the API directly
Guide with examples: Call the API directly.
api
Make an authenticated request to any SePay API endpoint.
$ sepay api <path>| Flag | Type | Description |
|---|---|---|
--dry-run | bool | Print the request without sending it, a GET included |
-f, --field | string[] | Add a body field (key=value, repeatable) |
-H, --header | string[] | Add a request header (repeatable) |
--input | string | Read the request body from a file, or - for stdin |
-X, --method | string | HTTP method; default GET |
Other commands
completion
Generate a shell completion script.
$ sepay completion <bash|zsh|fish|powershell>quota
Show your plan quota and usage.
$ sepay quotaOn 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 updateupgrade| Flag | Type | Description |
|---|---|---|
--check | bool | Report whether a newer release exists without installing it |
--version | string | Install this release instead of the latest, e.g. 0.2.0 |
version
Print version and build info.
$ sepay versionhelp
Help about any command or topic.
$ sepay help [command | topic]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.