What’s Included
Account & Payments
Manage payment requests, charges, refunds, customers, invoices, subscriptions, beneficiaries, and transfers with a consistent
hitpay <resource> <action> syntax.Webhook Testing
hitpay listen tunnels your local server to the public internet and auto-registers a webhook endpoint. hitpay trigger simulates real events — no need to wait for live traffic.QR Codes in Terminal
hitpay qr create renders scannable QR codes directly in your terminal for PayNow, QRIS, PromptPay, GCash, DuitNow, and 50+ other methods across Southeast Asia.Installation
Log in
Interactive login (prompts for API key):Or provide the key directly for non-interactive environments like CI:Get your API key from Dashboard → Settings → Payment Gateway → API Keys.
Authentication & Config
Credentials are stored locally at~/.hitpay/config.json with 0600 permissions. Inspect or update them with the config command:
Environment variables
Override any stored config with env vars — useful for CI:| Variable | Description |
|---|---|
HITPAY_API_KEY | API key; overrides ~/.hitpay/config.json |
HITPAY_ENVIRONMENT | sandbox or production |
Global flags
Available on every command:| Flag | Description |
|---|---|
--env <environment> | One-shot environment override (e.g. --env production) |
--json | Output raw JSON for piping to jq, scripts, or CI |
--help | Show command help |
--version | Print CLI version |
Commands
| Category | Commands |
|---|---|
| Account | login, logout, whoami, config set/get/list |
| Payment Requests | payment create, payment get, payment list, payment cancel |
| Charges | charge list, charge get, charge export |
| Refunds | refund |
| Customers | customer create/list/get/update/delete |
| Invoices | invoice create/list/delete |
| Subscriptions | plan create/list/get/delete, subscription create/list/get/cancel |
| Payouts | beneficiary create/list/delete, transfer estimate/create/list/get |
| QR Codes | qr create, methods |
| Webhooks (dev) | listen, trigger |
hitpay <command> --help for full argument details on any command.
Webhook development flow
The CLI’s webhook tooling is the fastest way to build and test webhook handlers locally — no ngrok setup, no manual endpoint registration.Forward live events to localhost
Ctrl+C, the endpoint is cleaned up automatically.
Simulate events without live traffic
trigger posts a signed payload to whichever endpoint listen is currently forwarding, so you can exercise your handler’s signature verification, idempotency, and event routing without waiting for a real payment.Usage Examples
- Create a payment request
- List & filter charges
- Test a webhook handler
- Generate a QR code
--json to parse the result in a script.Prerequisites
- HitPay Account — Create an account or use the sandbox environment
- API Key — Found in Settings → Payment Gateway → API Keys
- Node.js 18 or later — Check with
node --version
Which AI developer tool should I use?
HitPay offers three developer tooling options. They complement each other — most teams use two or more.| Tool | Use when you want to… |
|---|---|
| Claude Code Plugin | Build payment integrations with Claude Code using live API access and auto-triggered skills |
| Agent Skills | Generate HitPay integration code with Cursor, Copilot, Windsurf, or any AI assistant |
| CLI (this page) | Drive the API from your terminal, scripts, and CI pipelines — especially for webhook testing |
Resources
GitHub Repository
View source, report issues, and contribute
Claude Code Plugin
Live API access from inside Claude Code
Agent Skills
Skills for Cursor, Copilot, and Windsurf
API Reference
Full API documentation
Webhook Events
Handle payment notifications
Sandbox Guide
Test your integration