Getting started

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:

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:

.env
export MANZA_API_KEY="sk_live_..."
Sandbox first
Start with a staging key against the sandbox base URL, then mint a production key and switch 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:

request.sh
curl "https://ma.manza.dev/api/entity" \
  -H "Authorization: Bearer $MANZA_API_KEY"

CLI#

GitHubView on GitHub

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:

install.sh
# Homebrew (macOS / Linux)
brew install getmanza/tap/manza

# or npm (thin shim that fetches the platform binary)
npm install -g @getmanza/cli

Authenticate once, then call any endpoint:

first-call.sh
# interactive login, or pipe a key in for CI:
printf '%s\n' "$MANZA_API_KEY" | manza login --api-key-stdin

manza accounts list

The 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):

listen.sh
manza listen --forward-to http://localhost:4242/webhooks

JavaScript / TypeScript#

GitHubView on GitHub

Runtime-agnostic (Node 20+, Bun, Deno, browsers, Workers). Install @getmanza/sdk with your package manager:

install.sh
bun add @getmanza/sdk    # or npm / pnpm / yarn
first-call.ts
import { 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#

GitHubView on GitHub

Published as manza on RubyGems. Add it to your Gemfile:

Gemfile
gem "manza"
first_call.rb
require "manza"

manza = Manza.new(api_key: ENV["MANZA_API_KEY"])

accounts = manza.accounts.list

Python#

GitHubView on GitHub

Requires Python 3.11+. Install manza from PyPI:

install.sh
pip install manza
first_call.py
from manza import Manza

# Picks up MANZA_API_KEY from the environment by default.
client = Manza()

accounts = client.accounts.list()

Go#

GitHubView on GitHub

Requires Go 1.24+; no runtime dependencies outside the standard library. Install with go get:

install.sh
go get github.com/getmanza/manza-go/v2
first_call.go
import 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#

GitHubView on GitHub

Add the manza crate from crates.io:

install.sh
cargo add manza
first_call.rs
// 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#

GitHubView on GitHub

Add :manza from Hex to the deps in your mix.exs:

mix.exs
{:manza, "~> 2.0"}
first_call.exs
# :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#

GitHubView on GitHub

Install manza as a GitHub dependency in your shard.yml:

shard.yml
dependencies:
  manza:
    github: getmanza/manza-crystal
first_call.cr
require "manza"

client = Manza::Client.new # reads MANZA_API_KEY

accounts = client.accounts.list

PHP#

GitHubView on GitHub

Requires PHP 8.2+. Install manza/manza-php with Composer:

install.sh
composer require manza/manza-php
first_call.php
use Manza\Client;

// apiKey defaults to the MANZA_API_KEY env var.
$client = new Client(apiKey: getenv('MANZA_API_KEY'));

$accounts = $client->accounts->list();