Skip to main content

Installation

Quick start

Parameters are snake_case. Request params mirror the API body exactly (external_id, submission_id), while responses come back camelCase (externalId, submissionId). This asymmetry is deliberate — the SDK passes your params through untouched.

Configuration

Pagination

Methods that list a collection return a PageIterator, an async iterable that fetches pages as you consume it.
Non-paginated methods (listLinked, listEventTypes, getGroups, …) return a plain array.

Resources

Submissions

Documents

Transactions

Analytics

Every calculation is keyed by submission ID and lives here — not on submissions.

Policies

Rules

Webhooks

See Webhooks for signature verification.

Merchants and categories

Funders

Integrations

Entities

ISO applications

Error handling

Every failure is a MoneylineError subclass carrying type, code, param, statusCode, requestId, and docUrl.
RateLimitError and ServerError are retried automatically up to maxRetries before they surface.

Webhook signature verification

constructEvent verifies the signature and returns the parsed event; verifySignature verifies without parsing and throws WebhookSignatureVerificationError on mismatch.
For Express and Fastify there are ready-made handlers that do the same thing:

Spec-accurate types

Alongside the hand-written types, the SDK re-exports types generated from the OpenAPI document (bun run gen:types):
Use these when you want the exact wire shape of an endpoint the hand-written resources do not cover.