Skip to main content

Installation

Requires Node.js 18+

Quickstart

Configuration

Available Resources

Invoices

Requires v1.2.0 or later. Earlier published versions had no invoices resource.
Invoices are built from line items that each reference a merchant item (a fund or designation). Draft invoices can be edited; once sent they are locked. Identify the customer with customer_uuid, the same uuid every other resource uses, and the only identifier the customer endpoints return.

Statuses

invoice.status is one of draft, sent, viewed, partially_paid, paid, void or refunded, all lowercase. Compare against paid to detect settlement; partially_paid means a payment landed but a balance remains, which invoice.balance reports. There is no overdue status. Being overdue is a property of an open invoice past its due date and reads as invoice.isOverdue. overdue and all are accepted as filter values on list().

Recurring invoices

Chargebacks, documents and held funds

Requires v1.4.0 or later, as do authorize/capture, applicationStatus and the subscription resources.
A file is a Blob/File, or { content, filename }.

Retrying safely

Requires v1.5.0 or later. Charges, authorizations, captures, refunds and voids send an Idempotency-Key, so a call that timed out can be retried without charging twice. The SDK generates a key for each call and reuses it on its own retries. Pass your own key, the same one on every retry of that payment, to stay safe across restarts:
A key reused for a different request, or retried while the first is still running, throws IdempotencyException. See Retrying Safely.

Authorize and capture

An authorization can only be captured once, and a partial capture releases the rest. See Authorize and Capture.

Merchant onboarding status

Subscriptions

Error Handling