Try SePay CLI with two terminals. Terminal 1 receives sandbox webhooks and forwards them to your handler on localhost:3000. Terminal 2 simulates an incoming payment of 50,000 VND with order code DH1709:
$ sepay webhook listen --forward localhost:3000env: sandbox Delivering for every bank account of this company.✓ Listening for sandbox events → http://localhost:3000/ (Ctrl+C to stop · retries+enter to manage)14:22:07 payment_in → http://localhost:3000/ 200 12ms txn=a41c9e02-xxxx-xxxx-xxxx-fa163e2f7c98 wh=5f0e2a7b-xxxx-xxxx-xxxx-3c9d81e04b6a$ sepay sandbox simulate payment_in --bank-account 832529c1-xxxx-xxxx-xxxx-fa163e2f7c98 --amount 50000 --code DH1709env: sandboxSimulated payment_in event.a41c9e02-xxxx-xxxx-xxxx-fa163e2f7c98Terminal 1 prints a line for the delivered webhook: 200 is the HTTP status your handler returned, txn= is the xid of the new transaction.
Commands by task
| Task | Command group | Environment | Docs |
|---|---|---|---|
| Create sample data and simulated transactions | sandbox | Sandbox | Sandbox |
| Receive webhooks on your machine and test your handler | webhook | Sandbox & production* | Webhooks |
| View and reconcile transactions | transaction | Sandbox & production | Transactions |
| Payment codes | paycode | Sandbox & production | Payment codes |
| Virtual accounts (VA) | va | Sandbox & production* | Virtual accounts (VA) |
| Payment Gateway | pg | Sandbox & production** | Payment Gateway |
| eInvoice | einvoice | Sandbox & production** | eInvoice |
| Bank Hub | bankhub | Sandbox | Bank Hub |
* Some commands are sandbox-only. See Environments.
** On production there are only read commands: pg order list, pg order get, einvoice invoice list, einvoice invoice get. The other commands of the two groups run on the sandbox only.
Sandbox and production
Commands run in the sandbox by default, on Test mode data with no real money. Add --env production to work with real transactions. On production, your token needs the scopes the command requires.
A command that changes data on production runs only when you confirm it on your own terminal. An AI does not confirm it for you: it hands you the command to run yourself. The command takes effect as soon as you confirm; some commands can't be undone (confirmation rule). Add --dry-run to preview what the command would send (Dry run).
Get started with SePay CLI
You need a my.sepay.vn account, with Test mode turned on for your company (see Test mode). Install the CLI, then follow the Quickstart to sign in with sepay login and get your first webhook on your machine.