GoCardlessDeveloper Docs
Create a sandbox account

GoCardless CLI#

View as Markdown

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#

brew install gocardless/taps/cli
  1. Download the latest macOS .tar.gz from the releases page.
  2. Unzip: tar -xvf gc-cli_<version>_macOS_<arch>.tar.gz
  3. Move ./gocardless to a location on your PATH (typically /usr/local/bin).

The arm64 build is for Apple Silicon (M1+), x86_64 is for Intel Macs.

  1. Download the latest Windows .zip from the releases page.
  2. Unzip and move gocardless.exe to a directory on your PATH.
  1. Download the latest Linux .tar.gz from the releases page.
  2. Unzip: tar -xvf gc-cli_<version>_Linux_<arch>.tar.gz
  3. Move ./gocardless to a directory on your PATH.
docker run --rm -it gocardless/gc-cli:latest

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.

gocardless login

For partner integrations, authenticate with an existing app using the --app flag:

gocardless login --app AP0001

Run your first command#

Fetch a list of resources using the list command. For example, to list mandates:

gocardless list mandates
{
  "mandates": [
    {
      "id": "MD000JB824KAF6",
      "status": "consumed",
      "scheme": "faster_payments",
      "reference": "SOMEORGANISA-9M9NT"
    }
  ],
  "meta": {
    "cursors": { "after": null, "before": null },
    "limit": 50
  }
}

What's next?#