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.
Make an API request
The general form is fintoc <resource> <action> [args]. 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 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.
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.succeeded,payment.failedUpdated about 1 hour ago