Installation
Scaffolding Tool
To create a brand new ZendFi project from a template, use the companion scaffolding package:create command with interactive prompts. More details in the Init and Create reference.
Authentication
The CLI reads your API key from theZENDFI_API_KEY environment variable. Set it before running commands:
~/.bashrc, ~/.zshrc) for persistence. You can also store it in a .env file in your project root and the CLI will pick it up when running zendfi init.
The CLI detects whether your key is a test key (
zfi_test_) or live key (zfi_live_). If you run a payment command with a live key, it will prompt for confirmation before proceeding.Command Reference
Command Groups
Init and Create
Project scaffolding and framework detection. Add ZendFi to existing projects or start from a template.
Payments
Create test payments, check status, and watch payment lifecycle in real time.
Webhooks
Local webhook testing with automatic tunnel setup through ngrok or Cloudflare.
API Keys
List, create, and rotate API keys directly from the terminal.
Sub Accounts
Inspect sub-accounts, mint delegated credentials, and operate programmable controls.
Payment Intents
Two-phase payment flow management with create, confirm, and cancel operations.
PPP Pricing
Purchasing Power Parity tools for international pricing optimization.
Sub-Account Programmable Controls
The CLI includes full command parity for sub-account programmable controls.Global Options
Every command supports these flags:Environment Variables
Quick Start
1
Install the CLI
2
Set your API key
3
Create a test payment
4
Watch the payment
What’s Next
Init and Create
Set up new projects or add ZendFi to existing ones.
Test Payments
Create and monitor test payments from your terminal.