Clients & SDKs
Talk to the Manza API from the terminal, a script, or your app. Every endpoint in these docs shows a request in all ten clients below — this page is how you install and authenticate each one.
The official clients#
Manza ships nine maintained clients plus plain curl. They all read the same MANZA_API_KEY / MANZA_BASE_URL environment variables and target the same REST API, so pick whichever fits your stack. Each is open source on GitHub:
- CLI — getmanza/cli
- JavaScript / TypeScript — getmanza/manza-ts
- Ruby — getmanza/manza-ruby
- Python — getmanza/manza-python
- Go — getmanza/manza-go
- Rust — getmanza/manza-rust
- Elixir — getmanza/manza-elixir
- Crystal — getmanza/manza-crystal
- PHP — getmanza/manza-php
Upgrading from 1.x. These docs show the 2.x SDKs, built for API version 2026-11-13. invoices.create_payment_link is gone: pass generate_payment_link when you create or update an invoice. The transfer-authorization signer builds manza.transfer-authorization.v2, which also signs the payment's transfer_method; a 1.x client signs v1 and must keep Manza-Version: 2026-03-27 on its authorize calls. In Go the module path is now github.com/getmanza/manza-go/v2. Each repo's CHANGELOG lists the rest.
New in 2.1. The 2.1.0 SDKs keep API version 2026-11-13 and add calls for webhook deliveries: list an endpoint's deliveries, get one, retry one, and retry everything that failed on an endpoint. In beta, they also open and close webhook listen sessions and read their event stream, the way manza listen does (see Testing locally). A 403 entity_restricted, answered to every call while Manza restricts your entity, raises its own EntityRestrictedError (named in each language's idiom), a kind of the SDK's forbidden error. The reversal webhooks and reversed_amount / transaction.reversals need no new call. Each repo's CHANGELOG lists the server behaviour changes.
Authentication#
Every client authenticates with an API key you generate from Settings → Developer → API Keys. Keep it in the MANZA_API_KEY environment variable rather than hardcoding it — all eight SDKs read it automatically:
export MANZA_API_KEY="sk_live_..."MANZA_BASE_URL when you go live. See the Sandbox & test cards guide.curl#
No install — every request is a signed HTTP call. Pass your key as a Bearer token:
curl "https://za.manza.finance/api/entity" \
-H "Authorization: Bearer $MANZA_API_KEY"CLI#
A single static Go binary. The Homebrew install and the binaries on the GitHub releases need no runtime; the npm package is a small Node shim that launches the binary. Install via Homebrew or npm:
# Homebrew (macOS / Linux)
brew install getmanza/tap/manza
# or npm (thin shim that fetches the platform binary)
npm install -g @getmanza/cliAuthenticate once, then call any endpoint:
# interactive login, or pipe a key in for CI:
printf '%s\n' "$MANZA_API_KEY" | manza login --api-key-stdin
manza accounts listThe login is stored in ~/.config/manza/config.json. The CLI also reads MANZA_API_KEY, MANZA_BASE_URL, MANZA_API_VERSION (the Manza-Version header) and MANZA_TIMEOUT_MS (default 30000). Run manza --help or manza <resource> --help for the command list, or manza request <method> <path> to call any endpoint directly.
manza listen (CLI 2.0.1 or later) forwards your webhooks to a server on your machine, without a tunnel (sandbox only; see Testing locally):
manza listen --forward-to http://localhost:4242/webhooksJavaScript / TypeScript#
Runtime-agnostic (Node 20+, Bun, Deno, browsers, Workers). Install @getmanza/sdk with your package manager:
bun add @getmanza/sdk # or npm / pnpm / yarnimport { Manza } from "@getmanza/sdk";
// Node/Bun: process.env is available. Browsers and Workers have no
// process.env, so pass apiKey explicitly there.
const manza = new Manza({ apiKey: process.env.MANZA_API_KEY });
const accounts = await manza.accounts.list();Ruby#
Published as manza on RubyGems. Add it to your Gemfile:
gem "manza"require "manza"
manza = Manza.new(api_key: ENV["MANZA_API_KEY"])
accounts = manza.accounts.listPython#
Requires Python 3.11+. Install manza from PyPI:
pip install manzafrom manza import Manza
# Picks up MANZA_API_KEY from the environment by default.
client = Manza()
accounts = client.accounts.list()Go#
Requires Go 1.24+; no runtime dependencies outside the standard library. Install with go get:
go get github.com/getmanza/manza-go/v2import manza "github.com/getmanza/manza-go/v2"
// Reads MANZA_API_KEY from the environment by default.
client, err := manza.New()
accounts, err := client.Accounts.List(ctx, manza.AccountListParams{})Rust#
Add the manza crate from crates.io:
cargo add manza// Falls back to the MANZA_API_KEY env var when api_key isn't set.
let client = manza::Client::builder()
.api_key(std::env::var("MANZA_API_KEY")?)
.build()?;
let accounts = client.accounts().list(Default::default())?;Elixir#
Add :manza from Hex to the deps in your mix.exs:
{:manza, "~> 2.0"}# :api_key defaults to the MANZA_API_KEY env var.
{:ok, client} = Manza.new(api_key: System.fetch_env!("MANZA_API_KEY"))
{:ok, accounts} = Manza.Accounts.list(client)Crystal#
Install manza as a GitHub dependency in your shard.yml:
dependencies:
manza:
github: getmanza/manza-crystalrequire "manza"
client = Manza::Client.new # reads MANZA_API_KEY
accounts = client.accounts.listPHP#
Requires PHP 8.2+. Install manza/manza-php with Composer:
composer require manza/manza-phpuse Manza\Client;
// apiKey defaults to the MANZA_API_KEY env var.
$client = new Client(apiKey: getenv('MANZA_API_KEY'));
$accounts = $client->accounts->list();