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 events without waiting 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
1
Install the CLI
Install globally with npm:Or run without installing:Requires Node.js 18 or later.
2
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.
3
Verify
Check you’re logged in and on the right environment:Then run any command. For example, list recent charges:
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:Global flags
Available on every command:Commands
Run
hitpay <command> --help for full argument details on any command.
Webhook development flow
The CLI’s webhook tooling lets you build and test webhook handlers locally without ngrok setup or 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 tool should I use?
HitPay offers four AI tooling options that can be used together.Resources
GitHub Repository
View source, report issues, and contribute
HitPay MCP Server
Query your business data from an AI assistant
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