tehwave / quickpay-cli
A command-line client for the Quickpay API.
Requires
- php: ^8.4
Requires (Dev)
- larastan/larastan: ^3.10
- laravel-zero/framework: ^12.0.2
- laravel/pint: ^1.25.1
- mockery/mockery: ^1.6.12
- pestphp/pest: ^3.8.4|^4.1.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Quickpay CLI
Manage Quickpay payments, create payment links, and relay signed callbacks to localhost without a tunnel.
Features
- 🔁 Watch Quickpay payment activity and relay signed callbacks to localhost. No tunnel or public development server required.
- Create payments and hosted payment links.
- List, filter, and inspect payments and their operations.
- Capture, refund, and cancel payments.
- Call any Quickpay API v10 endpoint.
- Script- and agent-friendly, with JSON output and non-interactive options.
⭐ If you like Quickpay CLI, star it on GitHub. It helps a lot!
Install
Requires PHP 8.4 or newer.
composer global require tehwave/quickpay-cli
Authentication
Sign in to Quickpay Manager and select your merchant account. Open Settings > Integration and copy the API key under API User. Then run:
quickpay merchants:add "My Website"
Paste the key when prompted. Your input stays hidden, and the CLI saves the key in
~/.config/quickpay-cli/config.json. The first merchant becomes your default.
Merchants
quickpay merchants:add "My Other Website" quickpay merchants:select "My Other Website" quickpay merchants:active --check quickpay payments:list --merchant="My Website"
To use a different merchant for a project, run
quickpay merchants:select "My Website" --local from the project folder. Commands in
that folder and its subfolders will use My Website instead of your default merchant.
You can still choose another merchant for a single command with --merchant.
The .quickpay-cli.json file holds only the merchant name, never a key. Add it to
.gitignore when the choice is yours alone.
For scripts and CI, you can supply the API key through QUICKPAY_API_KEY
instead of saving a merchant. Use it outside folders with a project merchant
selected, and leave out --merchant.
Read-only merchants
Keep a merchant safe from changes by blocking its write requests. It can still
list and inspect payments, but it can't create, capture, refund or cancel them,
or send a raw POST, PUT, PATCH or DELETE:
quickpay merchants:access "My Website" --read-only quickpay merchants:access "My Website" --read-write quickpay merchants:add "My Shop" --read-only
A blocked request stops before anything reaches Quickpay. Replacing the key with
merchants:add --replace keeps the merchant read-only, but removing it and adding
it again saves it with full access unless you pass --read-only. --read-write
asks you to confirm in an interactive terminal, so an unattended script can't
lift the protection. It is a guardrail, not a lock: a tool that drives a
terminal can still answer the prompt. A key in QUICKPAY_API_KEY always has
full access.
Payments
quickpay payments:list quickpay payments:get <payment-id> --json quickpay payments:link <payment-id> 1000
Amounts are in minor units: 1000 is DKK 10.00 for a DKK payment.
Capture, refund, cancel, and non-GET raw API requests require confirmation
or --yes when running unattended.
Run quickpay list for all commands or quickpay <command> --help for options.
Local callbacks
quickpay callbacks:watch --to=http://127.0.0.1:8000/quickpay/callback
Leave it running while testing your payment flow. It forwards new operations for all payments in the selected merchant account. Add a payment ID to watch one payment. Existing operations are not replayed.
To send a payment's current resource once:
quickpay callbacks:replay <payment-id> --to=http://127.0.0.1:8000/quickpay/callback
Callbacks are signed with the merchant's private key, which the CLI fetches from
Quickpay. Set QUICKPAY_PRIVATE_KEY to use your own instead. Both commands warn
when it is set while a saved merchant is selected, because it may belong to
another merchant.
For agents
Install the bundled quickpay-cli skill:
skills add tehwave/quickpay-cli
If you installed the earlier quickpay skill, remove its folder from your agent's
skills directory first, so your agent stops using the removed login and auth
commands.
Contributing
See CONTRIBUTING.md, RELEASING.md, and SECURITY.md.
Created by Peter Jørgensen. Built with Laravel Zero and released under the MIT License. Independent of and not endorsed by Quickpay.