Developer Resources

Scenario simulators
GoCardless CLIInstallation Testing Webhooks (CLI) About CLI gocardless gocardless analytics gocardless analytics disable gocardless analytics enable gocardless analytics status gocardless cancel gocardless completion gocardless config gocardless config current-session gocardless create gocardless delete gocardless get gocardless get creditor gocardless get customer gocardless get customer_bank_account gocardless get customer_notification gocardless get event gocardless get mandate gocardless get mandate_import gocardless get payer_authorisation gocardless get payment gocardless get payout gocardless get refund gocardless get subscription gocardless get webhook gocardless list gocardless list creditors gocardless list customer_bank_accounts gocardless list customer_notifications gocardless list customers gocardless list events gocardless list mandate_imports gocardless list mandates gocardless list payer_authorisations gocardless list payments gocardless list payouts gocardless list refunds gocardless list subscriptions gocardless list webhooks gocardless listen gocardless login gocardless mcp gocardless mcp add gocardless mcp add claude gocardless mcp add codex gocardless mcp remove gocardless mcp remove claude gocardless mcp remove codex gocardless mcp run gocardless open gocardless trigger gocardless trigger billing_request_fulfilled gocardless trigger billing_request_fulfilled_payment_failed gocardless trigger billing_request_fulfilled_payment_paid_out gocardless trigger billing_request_pending gocardless trigger mandate_activated gocardless trigger mandate_expired gocardless trigger mandate_failed gocardless trigger mandate_pending_submission gocardless trigger mandate_transferred gocardless trigger payment_chargeback_settled gocardless trigger payment_charged_back gocardless trigger payment_confirmed gocardless trigger payment_failed gocardless trigger payment_paid_out gocardless trigger payment_pending_submission gocardless trigger payment_submitted gocardless update gocardless version
Test Bank Details Testing Webhooks (Dashboard) Viewing events in the dashboard Client Libraries Postman Collection Custom Payment Page Tools Bank ID Scenario simulators MCP New

Tools: GC CLI

GoCardless CLI

Build, test, and manage your GC integration from your terminal.

gocardless is the official GoCardless command-line interface (CLI).

The GC CLI is a developer tool to help you build, test and manage your integration with GC directly from your terminal.

It’s simple to install, works on macOS, Windows, and Linux, and offers a range of functionality to enhance your developer experience. You can use the GC CLI to:

  • Create, retrieve, update, or delete any of your GC resources in test mode (e.g. create a payment)

  • Stream real-time API requests and events (webhooks) happening in your account

  • Trigger events to test your webhooks integration

Installation

To check for the latest version, see our releases page.

Login to your GC Account

After you have the GC CLI installed, run gocardless login in the command line to grant the CLI access to your merchant account. This will open your browser to an authorisation page to login and authorise the merchant.

$ gocardless login Open browser to authenticate: https://connect-sandbox.gocardless.com/oauth/authorize?

If you are testing a partner integration and want to authenticate with an existing App, use the –app flag and specify your app’s ID:

$ gocardless login --app AP0001 You appear to be authorizing a new App. Ensure you have one of the apps OAuth redirect url set to http://localhost:8080/callback ? Enter your app's Client ID: **** ? Enter your app's Client Secret: ****** Open browser to authenticate: https://connect-sandbox.gocardless.com/oauth/authorize?client_id=ABcd

Run your first command

Now that gc is authorised to work with your merchant, try some test commands:

You can fetch a list of resources using the list command. For example, to fetch the list of mandates on the connected merchant's account:

$ gocardless list mandates

This should return a response similar to:

{ "mandates": [ { "created_at": "2022-02-15T15:31:56.532Z", "id": "MD000JB824KAF6", "links": { "creditor": "CR00006TSFRA16", "customer": "CU000JW1H9DV8J", "customer_bank_account": "BA000JB1YRVSNF" }, "metadata": {}, "next_possible_charge_date": null, "payments_require_approval": false, "reference": "SOMEORGANISA-9M9NT", "scheme": "faster_payments", "status": "consumed" } ], "meta": { "cursors": { "after": null, "before": null }, "limit": 50 } }

View the list command reference for a list of resources you can fetch. Also, you can view a list of all commands using the gocardless help command.

Next Steps