Skip to content

Developer CLI & Workflows

The zirzir CLI gives developers and AI agents terminal access to the full Zirzir orchestrator.


CLI Browser OAuth Loopback Flow

zirzir login stores your Zirzir API key. Provider keys (LakiPay, Chapa, …) live on the server project. Set them from the CLI:

Terminal window
export LAKIPAY_PUBLIC_KEY='pk_...'
export LAKIPAY_SECRET_KEY='sk_...'
zirzir provider set lakipay
# or explicitly:
zirzir provider set lakipay \
--public-key "$LAKIPAY_PUBLIC_KEY" \
--secret-key "$LAKIPAY_SECRET_KEY" \
--set default_medium=TELEBIRR
zirzir provider list

--env defaults to the environment from zirzir login (test or live). Secrets are stored on the server; provider list prints redacted values.

Terminal window
zirzir charge --amount 350 --currency ETB --provider lakipay --phone 0911223344
Terminal window
zirzir link create --amount 1250 --currency ETB --title "Freelance Consultation"
Terminal window
zirzir sub create --plan plan_pro_monthly --provider telebirr --phone 0911223344

5. Simulate Webhook Events (Zero Money Spent)

Section titled “5. Simulate Webhook Events (Zero Money Spent)”
Terminal window
zirzir trigger payment.succeeded --provider telebirr --amount 500.0
zirzir trigger payment.succeeded --provider mpesa --amount 1200.0
Terminal window
zirzir listen --forward-to http://localhost:3000/api/webhooks
Terminal window
zirzir ledger accounts
zirzir ledger postings --status failed
zirzir ledger retry <payment-id>

Balances, history, transfers, holds and failed postings: see the ledger guide.