Skip to Content
Docs
pay CLI

CLI reference

Global flags, environment variables, and exit codes.

Run pay <resource> --help for a resource's commands, and pay <resource> <command> --help for one command's arguments and fields.

Global flags

Every command takes these flags.

--profilestring
The profile whose key and settings to use.

Default: default

--merchant-idstring
Target merchant ID for multi-workspace API keys.
--api-basestring
Custom API base URL for local mocks or tests. It can't point to the live environment.
--timeoutduration
How long each attempt can take, reading the response included, such as 30s or 5m.

Default: 1m

--verbose, -vboolean
Logs each request and response to standard error, with credentials redacted.

Environment variables

pay reads these variables from the environment.

PAY_COM_API_KEY
The sandbox key to use, before the stored one.
PAY_COM_MERCHANT_ID
Target merchant ID for multi-workspace API keys.
PAY_COM_API_BASE
Custom API base URL for local mocks or tests.
PAY_COM_RELAY_URL
The relay that pay listen uses.
PAY_COM_CLI_KEYRING
Set it to file to keep secrets in a file instead of the keychain.
XDG_CONFIG_HOME
The parent of the settings folder. On Windows, settings are in %AppData%\pay.

Default: ~/.config

Exit codes

pay exits with one of these codes.

0
The command succeeded.
1
The API returned an error, the key is missing or refused, or something else failed.
2
Invalid invocation, such as an unknown command or flag, an invalid value, or a missing argument.
Was this page helpful?