Skip to main content
The ZendFi CLI gives you full control over your payment infrastructure without leaving your terminal. Create payments, manage API keys, test webhooks locally, and scaffold new projects in seconds.

Installation

Verify the installation:

Scaffolding Tool

To create a brand new ZendFi project from a template, use the companion scaffolding package:
This is a separate entry point that wraps the create command with interactive prompts. More details in the Init and Create reference.

Authentication

The CLI reads your API key from the ZENDFI_API_KEY environment variable. Set it before running commands:
Or add it to your shell profile (~/.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

The CLI creates the payment, copies the checkout URL to your clipboard, and optionally opens it in your browser.
4

Watch the payment

See rich, formatted payment details including status, timeline, transaction signature, and wallet addresses.

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.