GoCardless CLI#
gocardless is the official GoCardless command-line interface. It's simple to install, works on macOS, Windows, and Linux, and lets you:
- Create, retrieve, update, or delete GC resources in test mode (e.g. create a payment)
- Stream real-time API requests and events (webhooks) from your account
- Trigger events to test your webhooks integration
Installation#
- Download the latest
macOS.tar.gzfrom the releases page. - Unzip:
tar -xvf gc-cli_<version>_macOS_<arch>.tar.gz - Move
./gocardlessto a location on yourPATH(typically/usr/local/bin).
The arm64 build is for Apple Silicon (M1+), x86_64 is for Intel Macs.
- Download the latest
Windows.zipfrom the releases page. - Unzip and move
gocardless.exeto a directory on yourPATH.
- Download the latest
Linux.tar.gzfrom the releases page. - Unzip:
tar -xvf gc-cli_<version>_Linux_<arch>.tar.gz - Move
./gocardlessto a directory on yourPATH.
Pass commands as arguments. See the releases page for the latest version.
Log in#
After installing, run gocardless login to grant the CLI access to your merchant account. This opens a browser authorisation page.
For partner integrations, authenticate with an existing app using the --app flag:
Run your first command#
Fetch a list of resources using the list command. For example, to list mandates: