Skip to content

CLI

Install and use the SumUp command-line interface to interact with SumUp APIs from your terminal.

The SumUp CLI, sumup, lets you manage your SumUp account and call SumUp APIs from a terminal. Use it to explore API operations, run development workflows, or write scripts without setting up an SDK project.

The API reference includes a CLI sample for every operation supported by the tool.

Install the CLI with Homebrew(Opens in a new tab):

brew install sumup/cli/sumup

Alternatively, install it with Go:

go install github.com/sumup/sumup-cli/cmd/sumup

Confirm that the installation succeeded:

sumup version

Create a secret API key in the developer dashboard(Opens in a new tab), then expose it to the CLI through the SUMUP_API_KEY environment variable:

export SUMUP_API_KEY=sup_sk_your_api_key

You can also pass an API key with the global --api-key option. Avoid saving secret API keys in shell history or source control.

Commands that operate on a merchant accept the --merchant-code option. To avoid repeating it, select a merchant interactively and save it as your current context:

sumup context set

View or clear the saved context with:

sumup context get
sumup context unset

An explicit --merchant-code option overrides the saved context.

Create an online checkout:

sumup checkouts create \
--reference order-123 \
--amount 19.99 \
--currency EUR \
--merchant-code M123 \
--description "Ticket purchase"

List the readers paired with a merchant:

sumup readers list --merchant-code M123

Add the global --json option when a script needs machine-readable output:

sumup --json readers list --merchant-code M123

Use the built-in help to discover available resources, operations, and options:

sumup --help
sumup checkouts --help
sumup checkouts create --help

Generate and load a completion script for your shell:

# bash
source <(sumup completion bash)
# zsh
source <(sumup completion zsh)
# fish
sumup completion fish > ~/.config/fish/completions/sumup.fish

Release archives also include pre-generated completion scripts and a man page.