Easy Labs
SDKsNode.jsResources

Settlements

Settlements — methods, parameters, and examples for @easylabs/node.

A settlement bundles a batch of transfers into a single payout to your bank. The SDK exposes read-only listing plus a manual closeSettlement action used by platforms that drive their own batch boundaries.

Methods

easy.getSettlements(params?);          // GET   /settlements
easy.getSettlement(settlementId);      // GET   /settlements/:id
easy.closeSettlement(settlementId);    // PATCH /settlements/:id
const recent = await easy.getSettlements({ limit: 25 });
const { data: settlement } = await easy.getSettlement(recent.data[0].id);

// Manually close an open settlement for a same-day payout:
await easy.closeSettlement(settlement.id);

Object shape

SettlementData mirrors the underlying processor record (snake_case fields, _links, batch-level totals and counts). Refer to the API reference for the canonical schema; the SDK re-exports the type as SettlementData from @easylabs/node.

Examples

Reconcile a settlement against your ledger

const { data } = await easy.getSettlement(settlementId);
// Compare data.total_amount / data.fee_amount / data.transfer_count to your records.

Sweep recently closed settlements

const settlements = await easy.getSettlements({ limit: 100 });
for (const s of settlements.data) {
  // post each to your accounting system using s.id as the idempotency key
}

On this page