Easy Labs
SDKsPythonResources

Settlements

Settlements — methods, parameters, and examples for easy-sdk (pip).

A Settlement is a batched payout — the rolled-up record of transfers the processor has paid out (or will pay out) to your bank account. Use this resource to reconcile your books against actual deposits.

Namespace: client.settlements.

Methods

retrieve

settlement = client.settlements.retrieve("stl_123")

list

settlements = client.settlements.list(limit=50, offset=0)
batch = client.settlements.list(ids=["stl_1", "stl_2"])

Returns list[Settlement]. See Pagination.

close

settlement = client.settlements.close(
    "stl_123",
    idempotency_key="close-stl_123",
)

PATCHes the settlement to a closed state. Use when finalizing a manual settlement run.

Object shape

Settlement follows the canonical API shape. Common fields:

FieldNotes
idAlways present.
state"PENDING", "APPROVED", "PAID", etc.
amountInteger in the smallest currency unit.
currencyThree-letter ISO.
created_at, updated_atISO-8601 timestamps.

EasyModel allows extras, so any additional fields the API returns (processor identifiers, batch counts, etc.) come through on the model.

Examples

Reconcile against your accounting ledger

batch = client.settlements.list(limit=100)
for s in batch:
    record_settlement_in_ledger(
        external_id=s.id,
        state=s.state,
        amount=s.amount,
        currency=s.currency,
    )

Close a settlement after manual review

client.settlements.close("stl_123", idempotency_key="close-stl_123-final")

On this page