For the complete documentation index, see llms.txt. This page is also available as Markdown.

Testing Settlement in the Test Environment

The Bead test environment includes settlement flow simulators for BTC, Lightning, PayPal, Venmo, and Klarna payments. These simulators advance the settlement lifecycle automatically so you can observe and validate the full status progression without waiting for production-equivalent timing.

How settlement progresses in the test environment

Settlement for all payment types follows the same lifecycle: payments are grouped into batches, batches roll into settlements, and settlements are funded via ACH. In the test environment, a nightly simulator advances each stage automatically.

The status progression you will observe is:

  1. Payments complete and are grouped into an open batch (batch.status = open).

  2. Batch closes overnight (batch.status = closed). A settlement record is created with status = cleared.

  3. The simulator runs. A simulated ACH event advances the settlement.

  4. Settlement status moves to dispatched, then paid. A deposit record is created and moves to paid.

Simulator schedule

The simulators run automatically on a nightly schedule. Plan your test flows accordingly:

  1. Process test payments.

  2. Confirm the batch has closed (batch.status = closed) — this happens at the nightly batch close.

  3. Check settlement status the following morning — the simulator will have advanced the settlement to dispatched or paid.

What to observe when testing

  • Use GET /Batches filtered by Type (crypto for BTC and Lightning, walletApps for PayPal, Venmo, and Klarna) to confirm batch status has moved to closed.

  • Use GET /Settlements filtered by MerchantIds and Type to retrieve the settlement record once the batch has closed.

  • Use GET /Settlements/{id} to review status, grossFundableAmount, totalTransactionFees, depositFees, and netFundableAmount.

  • Use GET /Settlements/{id}/deposits to confirm the deposit record status once settlement completes.

Expected end state after a full nightly cycle: batch status = closed, settlement status = paid, deposit status = paid.

Differences from production

Behavior
Production
Test environment

Batch close

Nightly (midnight ET)

Nightly (midnight ET)

Settlement funding

Real ACH event

Simulated ACH event

Timing to paid

Vendor-dependent (hours to next business day)

Advances overnight on test schedule

Next steps

Last updated