fintoc login, the CLI stores your secret key in ~/.fintoc/config.toml. The file uses mode 0600, so only the current operating system user can read it. You can also provide a key with --api-key or the FINTOC_API_KEY environment variable.
Key resolution order
The CLI resolves the API key in this order of precedence:- The inline
--api-keyflag. - The
FINTOC_API_KEYenvironment variable. - The key stored in
~/.fintoc/config.tomlbyfintoc login.
test mode key in your configuration file and override the key for each command. Use an override to switch between Fintoc organizations or between test and live modes.
View your active configuration
Switch keys
To change the persisted key, log out and log back in:Use the CLI in continuous integration
For continuous integration and delivery pipelines, setFINTOC_API_KEY as a secret environment variable in your provider. For example, you can configure the variable in GitHub Actions or CircleCI. Avoid persisting credentials to disk:
fintoc login flow and avoids writing the key to the configuration file.
Compare test and live modes
Each Fintoc API key is scoped to either test mode or live mode. The CLI infers the mode from the key prefix:
sk_test_...identifies atestmode key. Atestmode key never moves real money: the CLI creates no real payments or refunds.sk_live_...identifies alivemode key. Commands run with this key create real payments and refunds on your production organization.
test and live modes. Resource commands such as fintoc payment_intents list work with either key. Commands that simulate events, such as fintoc trigger, run only in test mode and return an error with a live key.
By default, fintoc login authenticates in test mode. To authenticate in live mode, pass --mode live: