Use the Fintoc CLI
Build, test, and manage your Fintoc integration from the command line.
The Fintoc CLI lets you make API requests and listen to webhooks from the command line.
Available resources
Every command follows the pattern fintoc <resource> <action> [flags]. The CLI supports these resources and actions:
| Resource | Actions |
|---|---|
api_keys | list |
charges | create, get, list |
checkout_sessions | create, get, expire |
links | get, list, delete |
payment_intents | get, list |
subscriptions | get, list |
webhook_endpoints | create, get, list, delete |
v2 account_numbers | create, get, list, delete |
v2 account_verifications | create, get, list |
v2 accounts | get, list |
v2 movements | get, list |
v2 transfers | create, get, list |
Make an API request
The general form is fintoc <resource> <action> [flags]. Run fintoc --help to list available resources, or fintoc <resource> --help for the actions supported on that resource.
fintoc payment_intents list
fintoc charges create --amount 5000 --currency clp --subscription-id sub_test_abc123
fintoc charges create --from-json payload.jsonUse --json for machine-readable output:
fintoc payment_intents list --json
[
{
"id": "pi_test_a1b2c3d4e5f6g7h8",
"object": "payment_intent",
"amount": 100000,
"currency": "clp",
"status": "succeeded"
}
]
v2 transfers createrequires a JSON Web Signature (JWS) private key for signing. Provide it via the--jws-private-keyflag or setjws_private_keyin~/.fintoc/config.toml. To generate a key pair, see Generate JWS Keys.
fintoc v2 transfers create --amount 10000 --currency clp \
--account-id acc_test_abc123 \
--counterparty-account-number 12345678 \
--counterparty-institution-id cl_banco_estado \
--jws-private-key ~/path/to/private_key.pemPass a JSON payload
For create commands, pass a payload file with --from-json, or pipe one in with -:
fintoc charges create --from-json payload.json
cat payload.json | fintoc charges create --from-json -You can mix flags with --from-json. Flag values take precedence over JSON keys. Objects deep-merge, but the CLI replaces arrays wholesale.
Delete a resource
Delete commands ask for confirmation before removing the resource. Pass --yes to skip the prompt, which is useful in CI.
fintoc webhook_endpoints delete we_test_abc123
fintoc webhook_endpoints delete we_test_abc123 --yesTrigger test events
fintoc trigger fires a test event against your account, which exercises webhook handlers without producing real activity.
fintoc trigger payment_intent.succeeded
fintoc trigger payment_intent.succeeded --override amount=5000 --override currency=clp
fintoc trigger payment_intent.succeeded --from-json overrides.json--override accepts dot-notation (metadata.order_id=abc123) and is repeatable. The same precedence rules as --from-json apply.
Listen to webhooks on localhost
fintoc webhooks listen opens a WebSocket connection to Fintoc and forwards events to your local server. The CLI signs each forwarded request so your existing signature verification keeps working without a public tunnel.
fintoc webhooks listen --forward-to http://localhost:3000/webhooksFilter by event type:
fintoc webhooks listen --forward-to http://localhost:3000/webhooks --events payment_intent.succeeded,payment_intent.failed